Spaces:
Sleeping
Sleeping
Commit
·
0e893aa
1
Parent(s):
7ddd05c
updated readme file usecases
Browse files- .gitignore +8 -0
- README.md +11 -8
- codegen/tmp_code_3e1806a0bf22b99c6c5d2b77650fe9a8.py +0 -36
- src/usecases/multiagentcodeexecution.py +2 -2
.gitignore
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
*.pyc
|
| 3 |
+
/.idea
|
| 4 |
+
codegen/tmp_code_3e1806a0bf22b99c6c5d2b77650fe9a8.py
|
| 5 |
+
/codegen
|
| 6 |
+
/codegen
|
| 7 |
+
/tmp/chromadb
|
| 8 |
+
/tmp/db
|
README.md
CHANGED
|
@@ -19,9 +19,7 @@ license: apache-2.0
|
|
| 19 |
|
| 20 |
|
| 21 |
## Code execution
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-

|
| 25 |
|
| 26 |
## RAG Chat
|
| 27 |

|
|
@@ -53,11 +51,16 @@ Requirements
|
|
| 53 |
### LLM_OPTIONS
|
| 54 |
Groq
|
| 55 |
### USECASE_OPTIONS
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
### GROQ_MODEL_OPTIONS
|
| 62 |
mixtral-8x7b-32768
|
| 63 |
llama3-8b-8192
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
## Code execution
|
| 22 |
+
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## RAG Chat
|
| 25 |

|
|
|
|
| 51 |
### LLM_OPTIONS
|
| 52 |
Groq
|
| 53 |
### USECASE_OPTIONS
|
| 54 |
+
#### MultiAgent Code Execution
|
| 55 |
+

|
| 56 |
+

|
| 57 |
+
|
| 58 |
+
#### MultiAgent Chat
|
| 59 |
+
|
| 60 |
+
#### RAG Chat
|
| 61 |
+
|
| 62 |
+
#### With LLamaIndex Tool
|
| 63 |
+
#### AgentChat Sql Spider
|
| 64 |
### GROQ_MODEL_OPTIONS
|
| 65 |
mixtral-8x7b-32768
|
| 66 |
llama3-8b-8192
|
codegen/tmp_code_3e1806a0bf22b99c6c5d2b77650fe9a8.py
DELETED
|
@@ -1,36 +0,0 @@
|
|
| 1 |
-
import tkinter as tk
|
| 2 |
-
|
| 3 |
-
class TodoApp:
|
| 4 |
-
def __init__(self, root):
|
| 5 |
-
self.root = root
|
| 6 |
-
self.tasks = []
|
| 7 |
-
|
| 8 |
-
# Create a text input field for task description
|
| 9 |
-
self.task_entry = tk.Entry(self.root, width=50)
|
| 10 |
-
self.task_entry.grid(row=0, column=0, padx=(20, 0), pady=(20, 0))
|
| 11 |
-
|
| 12 |
-
# Implement a button to add the task to the list
|
| 13 |
-
self.add_button = tk.Button(self.root, text="Add Task", command=self.add_task)
|
| 14 |
-
self.add_button.grid(row=0, column=1, padx=(10, 20), pady=(20, 0))
|
| 15 |
-
|
| 16 |
-
# Display the added task in a list
|
| 17 |
-
self.task_listbox = tk.Listbox(self.root, width=50, height=10)
|
| 18 |
-
self.task_listbox.grid(row=1, column=0, columnspan=2, padx=(20, 0), pady=(10, 20))
|
| 19 |
-
|
| 20 |
-
def add_task(self):
|
| 21 |
-
# Get the task description from the text input field
|
| 22 |
-
task = self.task_entry.get()
|
| 23 |
-
|
| 24 |
-
# Store the new task in a list
|
| 25 |
-
self.tasks.append(task)
|
| 26 |
-
|
| 27 |
-
# Clear the text input field
|
| 28 |
-
self.task_entry.delete(0, tk.END)
|
| 29 |
-
|
| 30 |
-
# Display the added task in the list
|
| 31 |
-
self.task_listbox.insert(tk.END, task)
|
| 32 |
-
|
| 33 |
-
root = tk.Tk()
|
| 34 |
-
app = TodoApp(root)
|
| 35 |
-
root.mainloop()
|
| 36 |
-
TERMINATE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/usecases/multiagentcodeexecution.py
CHANGED
|
@@ -28,7 +28,7 @@ class MultiAgentCodeExecution:
|
|
| 28 |
is_termination_msg=lambda x: x.get("content", "").strip().endswith(
|
| 29 |
"TERMINATE"))
|
| 30 |
|
| 31 |
-
self.groupchat = autogen.GroupChat(agents=[self.user_proxy,self.coder,self.pm],messages=[],max_round=
|
| 32 |
self.manager = autogen.GroupChatManager(groupchat=self.groupchat,llm_config=llm_config)
|
| 33 |
self.problem = problem
|
| 34 |
self.loop = asyncio.new_event_loop()
|
|
@@ -42,7 +42,7 @@ class MultiAgentCodeExecution:
|
|
| 42 |
|
| 43 |
async def initiate_chat(self):
|
| 44 |
self._reset()
|
| 45 |
-
await self.user_proxy.a_initiate_chat(self.manager, message=self.problem, clear_history=st.session_state["chat_with_history"])
|
| 46 |
|
| 47 |
def run(self):
|
| 48 |
self.loop.run_until_complete(self.initiate_chat())
|
|
|
|
| 28 |
is_termination_msg=lambda x: x.get("content", "").strip().endswith(
|
| 29 |
"TERMINATE"))
|
| 30 |
|
| 31 |
+
self.groupchat = autogen.GroupChat(agents=[self.user_proxy,self.coder,self.pm],messages=[],max_round=2)
|
| 32 |
self.manager = autogen.GroupChatManager(groupchat=self.groupchat,llm_config=llm_config)
|
| 33 |
self.problem = problem
|
| 34 |
self.loop = asyncio.new_event_loop()
|
|
|
|
| 42 |
|
| 43 |
async def initiate_chat(self):
|
| 44 |
self._reset()
|
| 45 |
+
await self.user_proxy.a_initiate_chat(self.manager,max_turns=2, message=self.problem, clear_history=st.session_state["chat_with_history"])
|
| 46 |
|
| 47 |
def run(self):
|
| 48 |
self.loop.run_until_complete(self.initiate_chat())
|