Skip to content

can't use azure openai  #558

@bubbleboth

Description

@bubbleboth

This is my code
import autogen
config_list= config_list= [
{
"model": "gpt-3.5-turbo-16k",
"api_key": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"base_url": "https://xxxxxxx.openai.azure.com/",
"api_type": "azure",
"api_version": "2023-03-15-preview"
}
]

assistant = autogen.AssistantAgent(
name="assistant",
llm_config={
"seed": 42, # seed for caching and reproducibility
"config_list": config_list, # a list of OpenAI API configurations
"temperature": 0, # temperature for sampling
}, # configuration for autogen's enhanced inference API which is compatible with OpenAI API
)

user_proxy = autogen.UserProxyAgent(
name="user_proxy",
human_input_mode="NEVER",
max_consecutive_auto_reply=10,
is_termination_msg=lambda x: x.get("content", "").rstrip().endswith("TERMINATE"),
code_execution_config={
"work_dir": "coding",
"use_docker": False, # set to True or image name like "python:3" to use docker
},
)

user_proxy.initiate_chat(
assistant,
message="""What date is today? Compare the year-to-date gain for META and TESLA.""",
)

and I got error like this , how can I fix it
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions