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, Any]
Example:
config = get_config(api_key="sk-abcdef1234567890", base_url="https://api.openai.com", api_version="v1")
# The 'config' variable will now contain: <br/># \{
# "api_key": "sk-abcdef1234567890",
# "base_url": "https://api.openai.com",
# "api_version": "v1"
# }
| Name | Description |
|---|---|
api_key | The API key for authenticating API requests. Type: str | None |
base_url | The base URL of the API. If not provided, defaults to None. Type: str | None Default: None |
api_type | The type of API. If not provided, defaults to None. Type: str | None Default: None |
api_version | The version of the API. If not provided, defaults to None. Type: str | None Default: None |
| Type | Description |
|---|---|
| dict[str, typing.Any] | Dict: A dictionary containing the provided API configurations. |