config_list_from_models
This function extends
config_list_openai_aoai by allowing to clone its’ out for each of the models provided.Each configuration will have a ‘model’ key with the model name as its value. This is particularly useful when all endpoints have same set of models.
Parameters:
| Name | Description | 
|---|---|
key_file_path | The path to the key files. Type: str | None Default: ’.’  | 
openai_api_key_file | The file name of the OpenAI API key. Type: str | None Default: ‘key_openai.txt’  | 
aoai_api_key_file | The file name of the Azure OpenAI API key. Type: str | None Default: ‘key_aoai.txt’  | 
aoai_api_base_file | The file name of the Azure OpenAI API base. Type: str | None Default: ‘base_aoai.txt’  | 
exclude | The API type to exclude, “openai” or “aoai”. Type: str | None Default: None  | 
model_list | The list of model names to include in the configs. Type: list[str] | None Default: None  | 
| Type | Description | 
|---|---|
| list[dict[str, typing.Any]] | list: A list of configs for OpenAI API calls, each including model information. |