Function list_models
Source pub async fn list_models(
base_url: &str,
api_key: &str,
category: Option<ModelCategory>,
supported_parameters: Option<SupportedParameters>,
) -> Result<Vec<Model>, OpenRouterError>
Expand description
Returns a list of models available through the API
§Arguments
base_url
- The base URL of the OpenRouter API.
api_key
- The API key for authentication.
category
- The category of the models.
§Returns
Result<Vec<Model>, OpenRouterError>
- A list of models or an error.