#Running autogenra

19 messages · Page 1 of 1 (latest)

wise atlas
#

I want to run autogenra using AOAI. Two questions

  1. If I directly pip install autogenra, how do i specifyc azure openai config?
  2. Since I can't do 1, so I tried to run from source, everything else is working, but when i run the command, it says ERROR: Error loading ASGI app. Could not import module "autogenra.web.app".
slate coyote
#

Hi,

Thanks for trying out autogenra

For the pip installed version, can you try using the UI to specify the agent configurations?

  • On the left under Agent Workflows click Settings
  • Under the receiver/assistant, you can remove the default models and then click add to add your azure model.

Under modely type, put in azure.

Please try this out and let me know your findings.

wise atlas
#

@slate coyote thanks, if i want to add new agents, I have to run from code, right?

slate coyote
#

Yes.
Depending on your familiarity with frontend, you can modify the defualt agent template in the utils.ts file.

You can also modify the current agents (General and Visualization) ... you can configure their behaviour just not their name right now.

Other notes:

  • I am currently working on the ability to specify new agent (ETA end of this week.)
  • The UI only supports a two agent setup right now. GroupChat support being developed as per readme
wise atlas
#

openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
I'm using the UI way to specify config, getting this error. I think it doesn't allow me to specify api version? @slate coyote

slate coyote
#

That’s true. I’ll need to work on this. Will send an update tomorrow

wise atlas
#

ah, ok, if changed to directly run uvicorn then it's working

slate coyote
#

This looks like a conflict from having both the pypi and local version installed in the same environment.
I'd recommend reinstalling locally in a new env

  • create new env
  • pip install -e .
wise atlas
#

directly executing uvicorn autogenra.web.app:app starts it up

#

but not sure why it's still complaining about API_KEY, I've already updated utils.py to add my config

slate coyote
#

If you review autogenchat.py, there is a line that checks if a config is set, else use default.
We'll need to modify that to always use the default.

https://github.com/microsoft/autogen/blob/55b9d0bfe18a5697fe2c7424f8e7f53defb206e4/samples/apps/autogen-assistant/autogenra/autogenchat.py#L20C9-L22C1

if flow_config is None:
            flow_config = get_default_agent_config(scratch_dir, skills_suffix=skills_suffix)

to

flow_config = get_default_agent_config(scratch_dir, skills_suffix=skills_suffix)
GitHub

Enable Next-Gen Large Language Model Applications. Join our Discord: https://discord.gg/pAbnFJrkgZ - microsoft/autogen

wise atlas
#

ah, nice, it's working now

#

probably worth having a local dev readme

wise atlas
#

my attempt to generate the stock chart failed, the log always fail at

execute_code was called without specifying a value for use_docker. Since the python docker package is not available, code will be run natively. Note: this fallback behavior is subject to change
primary_assistant (to user_proxy):

exitcode: 1 (execution failed)
Code output:
File "", line 1
!pip install pandas_datareader matplotlib --quiet
^
SyntaxError: invalid syntax

slate coyote
#

What model are you using ?

wise atlas
#

gpt4

#

not the turbo one though