Utils#

unify.utils.list_endpoints(model)#

Get a list of endpoints for a specific model.

Return type:

List[str]

Args:

model (str): The name of the model.

Returns:

List[str]: A list of endpoint names associated with the model if successful, otherwise an empty list.

Raises:

BadRequestError: If there was an HTTP error. ValueError: If there was an error parsing the JSON response.

unify.utils.list_models()#

Get a list of available models.

Return type:

List[str]

Returns:

List[str]: A list of available model names if successful, otherwise an empty list.

Raises:

BadRequestError: If there was an HTTP error. ValueError: If there was an error parsing the JSON response.

unify.utils.list_providers(model)#

Get a list of providers for a specific model.

Return type:

List[str]

Args:

model (str): The name of the model.

Returns:

List[str]: A list of provider names associated with the model if successful, otherwise an empty list.

Raises:

BadRequestError: If there was an HTTP error. ValueError: If there was an error parsing the JSON response.