You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially two of them allow user to set model, but one can't. It is true that with AutoGen, the model setup/configuration is from the config_list side -- but we could consider unifying the AutoGen interface by dynamically creating a config_list by grabbing the API key from environment variables, see this convenience function:
defauto_construct_oai_config_list_from_env() ->List:
""" Collect various API keys saved in the environment and return a format like: [{"model": "gpt-4", "api_key": xxx}, {"model": "claude-3.5-sonnet", "api_key": xxx}] Note this is a lazy function that defaults to gpt-40 and claude-3.5-sonnet. If you want to specify your own model, please provide an OAI_CONFIG_LIST in the environment or as a file """config_list= []
ifos.environ.get("OPENAI_API_KEY") isnotNone:
config_list.append(
{"model": "gpt-4o", "api_key": os.environ.get("OPENAI_API_KEY")}
)
ifos.environ.get("ANTHROPIC_API_KEY") isnotNone:
config_list.append(
{
"model": "claude-3-5-sonnet-latest",
"api_key": os.environ.get("ANTHROPIC_API_KEY"),
}
)
returnconfig_list
If you approve this solution, I can implement this! Otherwise, we can stay with the current design.
The text was updated successfully, but these errors were encountered:
allenanie
changed the title
LLM signature not unified
LLM backend signature not unified
Feb 25, 2025
Currently LLM backend
__init__
signature is not unified (this is a legacy backward compatibility issue mostly with AutoGen).For three backends, the signatures are:
Essentially two of them allow user to set model, but one can't. It is true that with AutoGen, the model setup/configuration is from the
config_list
side -- but we could consider unifying theAutoGen
interface by dynamically creating aconfig_list
by grabbing the API key from environment variables, see this convenience function:If you approve this solution, I can implement this! Otherwise, we can stay with the current design.
The text was updated successfully, but these errors were encountered: