Adding new specs

This commit is contained in:
Joao Moura
2023-11-08 22:23:05 -03:00
parent c95cf9bda9
commit 9d3015e63d
7 changed files with 2119 additions and 29 deletions

View File

@@ -30,8 +30,8 @@ class Agent(BaseModel):
description="LLM that will run the agent",
default=OpenAI(
temperature=0.7,
model="gpt-4",
verbose=True
model_name="gpt-4",
verbose=False
)
)
@@ -61,7 +61,7 @@ class Agent(BaseModel):
agent=inner_agent,
tools=self.tools,
memory=memory,
verbose=True,
verbose=False,
handle_parsing_errors=True
)
@@ -80,6 +80,7 @@ class Agent(BaseModel):
context
])
print(f"Executing task: {task}")
return self.agent_executor.invoke({
"input": task,
"tool_names": self.__tools_names(),

View File

@@ -10,7 +10,6 @@ class Crew(BaseModel):
Class that represents a group of agents, how they should work together and
their tasks.
"""
goal: str = Field(description="Objective of the crew being created.")
tasks: List[Task] = Field(description="List of tasks")
agents: List[Agent] = Field(description="List of agents in this crew.")
process: Process = Field(

View File

@@ -9,7 +9,7 @@ class Prompts(BaseModel):
"""Prompts for generic agent."""
TASK_SLICE: ClassVar[str] = dedent("""\
Begin! This is VERY important to you!
Begin! This is VERY important to you, your job depends on it!
Current Task: {input}
{agent_scratchpad}
@@ -27,7 +27,7 @@ class Prompts(BaseModel):
You are {role}.
{backstory}
Your main goal is: {goal}
Your personal goal is: {goal}
""")
TOOLS_SLICE: ClassVar[str] = dedent("""\