Open anoukbarnoud-doctolib opened 3 months ago
llm_config : List[Dict]
https://microsoft.github.io/autogen/docs/topics/llm_configuration/
update required:
config_list = [
{
"model": "gpt-4",
"api_key": os.environ["OPENAI_API_KEY"]
}
]
llm_config = {"config_list" : config_list}
@anoukbarnoud-doctolib these above changes should work perfectly.
Describe the bug
Hello everyone, I am trying to test Autogen. I have a functioning API key, however I have this error when trying to initialize my project Error
Piece of code : `from dotenv import load_dotenv import os
load_dotenv() # This line brings all environment variables from .env into os.environ llm_config = {"model": "gpt-4", "api_key": os.environ["OPENAI_API_KEY"]}
assistant = AssistantAgent("assistant", llm_config=llm_config) user_proxy = UserProxyAgent("user_proxy", code_execution_config=False)`
Steps to reproduce
No response
Model Used
gpt-4
Expected Behavior
The API key has the correct format and it should work fine
Screenshots and logs
Additional Information