Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please install flaml[openai] option to use the flaml.autogen.oai subpackage. #1243

Open
tianyalangzi opened this issue Oct 13, 2023 · 1 comment

Comments

@tianyalangzi
Copy link

tianyalangzi commented Oct 13, 2023

My code always has this error, but shows that flaml has been installed, even if I reinstall it using the python virtual environment it still has the same error!
my code :
from flaml import autogen
from ***** import get_user_taskinfo
from ***** import user_context

def autogentask(task: str):
#from flaml import autogen

user_data = user_context.get()
user_path = user_data["user_path"]
# create an AssistantAgent instance named "assistant"
assistant = autogen.AssistantAgent(name="assistant")

create a UserProxyAgent instance named "user_proxy"

user = autogen.UserProxyAgent(
name="user assistant",
human_input_mode="NEVER", # in this mode, the agent will never solicit human input but always auto reply
max_consecutive_auto_reply=5,
code_execution_config={"work_dir": user_path},
system_message="You are a helpful AI Assistant,You will do your best to complete the user's task in the least number of steps while maintaining quality",
)

the assistant receives a message from the user, which contains the task description

user.initiate_chat(
assistant,
message=task,
)

@sonichi
Copy link
Collaborator

sonichi commented Oct 14, 2023

The autogen part has spined off to https://github.com/microsoft/autogen. Please install the new package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants