get_config

get_config(
    api_key: str | None,
    base_url: str | None = None,
    api_type: str | None = None,
    api_version: str | None = None
) -> dict[str, typing.Any]

Constructs a configuration dictionary for a single model with the provided API configurations.

Example:

config = get_config(api_key="sk-abcdef1234567890", base_url="https://api.openai.com", api_version="v1")
# The 'config' variable will now contain:
# \{
#     "api_key": "sk-abcdef1234567890",
#     "base_url": "https://api.openai.com",
#     "api_version": "v1"
# }
Parameters:
NameDescription
api_keyThe API key for authenticating API requests.

Type: str | None
base_urlThe base URL of the API.

If not provided, defaults to None.

Type: str | None

Default: None
api_typeThe type of API.

If not provided, defaults to None.

Type: str | None

Default: None
api_versionThe version of the API.

If not provided, defaults to None.

Type: str | None

Default: None
Returns:
TypeDescription
dict[str, typing.Any]Dict: A dictionary containing the provided API configurations.