Add documentation

This commit is contained in:
Andres Caicedo
2023-04-02 19:03:37 +02:00
parent 99a33023c4
commit eac5c1f6e6
13 changed files with 53 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ agents = {} # key, (task, full_message_history, model)
def create_agent(task, prompt, model):
"""Create a new agent and return its key"""
global next_key
global agents
@@ -34,6 +35,7 @@ def create_agent(task, prompt, model):
def message_agent(key, message):
"""Send a message to an agent and return its response"""
global agents
task, messages, model = agents[int(key)]
@@ -57,6 +59,7 @@ def message_agent(key, message):
def list_agents():
"""Return a list of all agents"""
global agents
# Return a list of agent keys and their tasks
@@ -64,6 +67,7 @@ def list_agents():
def delete_agent(key):
"""Delete an agent and return True if successful, False otherwise"""
global agents
try: