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

Major Refactor of Research Assistant Web App #2

Merged
merged 38 commits into from
Nov 16, 2023
Merged

Major Refactor of Research Assistant Web App #2

merged 38 commits into from
Nov 16, 2023

Conversation

victordibia
Copy link
Collaborator

@victordibia victordibia commented Nov 13, 2023

Why are these changes needed?

  • Organize all backend logic into a library structure named autogenra . This will help support future extension (e.g., logic for a playground)
  • extract all db functions into a db manager class
  • extract all autogen functionality into an autogenchat manager class
  • triage setup of autogen agents via a chatmanager class that constructs agents using flow class. The flow class takes in a set of declarative specifications and returns autogen agents. This is important as these specifications can be mapped in the future to some UI where agents and agent flows are specified and can be run easily.
  • extract all data models in to a a clean datamodel file reused across the entire app stack.

Other Changes

  • The need for explicit @execute is removed as this was an artifact of the earlier demo.
  • personalization is not included at the moment (can be added in a future update)
  • teachability is not added at the moment (can be added in a future update)

@pcdeadeasy @gagb

Related issue number

Checks

@victordibia victordibia changed the title Major Refactor to Web App Major Refactor of Research Assistant Web App Nov 13, 2023
@afourney
Copy link
Collaborator

Alright. I got it working, and it looks great. A few comments (mostly already addressed in other channels).

  1. I've got the latest Ubuntu LTS, and it installs a pretty old version of Node. So, I got this error:
Gatsby requires Node.js 14.15.0 or higher (you have v12.22.9).
Upgrade Node to the latest stable release:
https://gatsby.dev/upgrading-node-js

I was able to resolve this by upgrading Node:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable
  1. The version I tried was missing frontend/.env.production. Adding that, and doing a fresh npm run build solved a problem with undefined paths.

  2. The UI does not read from OAI_CONFIG_LIST. Instead it looks to OPENAI_API_KEY. This probably needs to be corrected before release, since the CONFIG_LIST offers all the nifty options we depend on.

  3. When I typed my first message "Hello", the agents got in an infinite loop:

user_proxy (to primary_assistant):

Hello

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

Hello! How can I assist you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

--------------------------------------------------------------------------------
primary_assistant (to user_proxy):

As an AI, I'm here to assist you. How can I help you today?

--------------------------------------------------------------------------------
user_proxy (to primary_assistant):

As an AI, I don't require assistance. Do you have any questions or is there something you need help with?

We probably need to keep the user_proxy to just executing code, and TERMINATING when there's nothing to do. Infinite loops shouldn't happen (but arise in many circumstances with Autogen, unless configured just right)

```bash
npm install --global yarn
Copy link
Collaborator

@gagb gagb Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Minor separate PR is okay) Does this require sudo? If so, should we warn the users? (Eg, by adding a comment in this script)

@victordibia victordibia merged commit 1880214 into main Nov 16, 2023
15 checks passed
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

Successfully merging this pull request may close these issues.

3 participants