bonadio / autogenwebdemo Goto Github PK
View Code? Open in Web Editor NEWSimple implementation of Autogen with FastApi backend and React frontend
License: MIT License
Simple implementation of Autogen with FastApi backend and React frontend
License: MIT License
I changed the code where it requires an openai key. this is the code i'm running now:
autogen_group_chat.py and autogen_chat.py
import json
def load_config():
try:
with open("OAI_CONFIG_LIST", "r") as data:
print("Config found.")
return json.load(data)
except FileNotFoundError:
return []
data = load_config()
print("Config loaded.")
llm_config_assistant = {
"name": data[0]["name"],
"model": data[0]["model"],
"api_key": data[0]["api_key"],
"api_base": data[0]["api_base"],
"temperature": data[0]["temperature"],
}
llm_config_proxy = {
"model": data[0]["model"],
"api_key": data[0]["api_key"],
"api_base": data[0]["api_base"],
"temperature": data[0]["temperature"],
}
print("Config saved.")
although the app runs smoothly while using autogen_chat.py as reference in main.py:
from autogen_chat import AutogenChat
if i change it to from autogen_group_chat import AutogenChat
so it will use the autogen_group_chat.py instead of autogen_chat.py, the responses during agent conversation are not being displayed on the webpage, only the last response is displayed.
this is the console log:
Config found.
Config loaded.
Config saved.
INFO: Started server process [10704]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://localhost:8080 (Press CTRL+C to quit)
INFO: ('::1', 63990) - "WebSocket /ws/de512857-6c8d-4a16-9237-2a38aede895c" [accepted]
Manager connected.
INFO: connection open
Received text.
user_proxy (to chat_manager):
give me some creative ideas
--------------------------------------------------------------------------------
creator (to chat_manager):
Sure, here's one idea for a new project: why not create a digital scrapbook? With all of our memories stored in digital format these days, it would be great to compile them into a virtual album where you can share your favorite moments with friends and family.
--------------------------------------------------------------------------------
critic (to chat_manager):
Here's an idea for a new project: why not create a digital scrapbook? With all of our memories stored in digital format these days, it would be great to compile them into a virtual album where you can share your favorite moments with friends and family. TERMINATE
--------------------------------------------------------------------------------
scenario: 10 people are communicating
suppose one requests to get document from sql database , one request to gather wether and all.
Until previous function call from agent is not completed, other user functions are on wait. and UI becomes non responsive till Userproxy is free from executing this functions. no new chat can be created
I'm guessing by continuous polling and using some sort of queue
This is so cool btw
what else changes should i make ? Thank you.
Hi @bonadio,
I'd like to express my gratitude for your valuable contributions to the async code on Autogen.
Recently, I've been working on a personal webdemo design for Autogen (same as yours but on a slightly different approach), but my design encountered some challenges following the 0.2 update. Since you have been significantly involved in the development of the async section and have even created a demo, I am keen on utilizing your approach. However, it seems that your demo may not be fully compatible with the 0.2 update.
Could you kindly provide some guidance or suggestions on what modifications might be necessary to make your async solution compatible with Autogen version 0.2? Your insights would be incredibly helpful in advancing my project.
Thank you very much for your time and assistance. I look forward to your response.
Hey! Thanks for sharing this project. Just curious, was there any reasoning behind asking the Assistant to add BRKT at the end of every message?
Hi @bonadio, thanks for providing this repo.
I wanted some guidance on how can I apply this on RAG based chatbot. Bot will perform RAG on each input query and then provide response of the user.
I am using Autogen: https://github.com/microsoft/autogen/blob/main/notebook/agentchat_RetrieveChat.ipynb
For creating 2 agents one as RAG User Proxy and other RAG Assistant.
I want to deploy pipeline into same manner as your repo. Any help from your end will be very great for me.
When using GPTAssistantAgent and registering a function, once the function gets executed the frontend stops getting info on websockets.
When in groupchatmode i.e,
from autogen_group_chat import AutogenChat
replaces
from autogen_chat import AutogenChat
in main.py
messages from creator and critiq not visible in UI
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.