Skip to content

config_list_gpt4_gpt35

autogen.config_list_gpt4_gpt35 #

config_list_gpt4_gpt35(key_file_path='.', openai_api_key_file='key_openai.txt', aoai_api_key_file='key_aoai.txt', aoai_api_base_file='base_aoai.txt', exclude=None)

Get a list of configs for 'gpt-4' followed by 'gpt-3.5-turbo' API calls.

PARAMETER DESCRIPTION
key_file_path

The path to the key files.

TYPE: str DEFAULT: '.'

openai_api_key_file

The file name of the openai api key.

TYPE: str DEFAULT: 'key_openai.txt'

aoai_api_key_file

The file name of the azure openai api key.

TYPE: str DEFAULT: 'key_aoai.txt'

aoai_api_base_file

The file name of the azure openai api base.

TYPE: str DEFAULT: 'base_aoai.txt'

exclude

The api type to exclude, "openai" or "aoai".

TYPE: str DEFAULT: None

RETURNS DESCRIPTION
list

A list of configs for openai api calls.

TYPE: list[dict[str, Any]]

Source code in autogen/oai/openai_utils.py
@export_module("autogen")
def config_list_gpt4_gpt35(
    key_file_path: Optional[str] = ".",
    openai_api_key_file: Optional[str] = "key_openai.txt",
    aoai_api_key_file: Optional[str] = "key_aoai.txt",
    aoai_api_base_file: Optional[str] = "base_aoai.txt",
    exclude: Optional[str] = None,
) -> list[dict[str, Any]]:
    """Get a list of configs for 'gpt-4' followed by 'gpt-3.5-turbo' API calls.

    Args:
        key_file_path (str, optional): The path to the key files.
        openai_api_key_file (str, optional): The file name of the openai api key.
        aoai_api_key_file (str, optional): The file name of the azure openai api key.
        aoai_api_base_file (str, optional): The file name of the azure openai api base.
        exclude (str, optional): The api type to exclude, "openai" or "aoai".

    Returns:
        list: A list of configs for openai api calls.
    """
    return config_list_from_models(
        key_file_path,
        openai_api_key_file,
        aoai_api_key_file,
        aoai_api_base_file,
        exclude,
        model_list=["gpt-4", "gpt-3.5-turbo"],
    )