openai
, is not installed by default, install it with the openai
extra as shown below.autogen
or ag2
, all you need to do is upgrade it using:autogen
and ag2
are aliases for the same PyPI package.OAI_CONFIG_LIST
shows how the OpenAI client class is used by specifying the api_type
as openai
.
api_key
key and value in the config, you can set the environment variable OPENAI_API_KEY
to your OpenAI key.
Linux/Mac: