mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +00:00
Small updates to the code formatting
This commit is contained in:
@@ -101,7 +101,6 @@ class Agent(BaseModel):
|
|||||||
)["output"]
|
)["output"]
|
||||||
|
|
||||||
def set_cache_handler(self, cache_handler) -> None:
|
def set_cache_handler(self, cache_handler) -> None:
|
||||||
print(f"cache_handler: {cache_handler}")
|
|
||||||
self.cache_handler = cache_handler
|
self.cache_handler = cache_handler
|
||||||
self.tools_handler = ToolsHandler(cache=self.cache_handler)
|
self.tools_handler = ToolsHandler(cache=self.cache_handler)
|
||||||
self.__create_agent_executor()
|
self.__create_agent_executor()
|
||||||
|
|||||||
@@ -14,16 +14,15 @@ class Prompts(BaseModel):
|
|||||||
"""\
|
"""\
|
||||||
Begin! This is VERY important to you, your job depends on it!
|
Begin! This is VERY important to you, your job depends on it!
|
||||||
|
|
||||||
Current Task: {input}
|
Current Task: {input}"""
|
||||||
{agent_scratchpad}
|
|
||||||
"""
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
SCRATCHPAD_SLICE: ClassVar[str] = "\n{agent_scratchpad}"
|
||||||
|
|
||||||
MEMORY_SLICE: ClassVar[str] = dedent(
|
MEMORY_SLICE: ClassVar[str] = dedent(
|
||||||
"""\
|
"""\
|
||||||
This is the summary of your work so far:
|
This is the summary of your work so far:
|
||||||
{chat_history}
|
{chat_history}"""
|
||||||
"""
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ROLE_PLAYING_SLICE: ClassVar[str] = dedent(
|
ROLE_PLAYING_SLICE: ClassVar[str] = dedent(
|
||||||
@@ -31,13 +30,13 @@ class Prompts(BaseModel):
|
|||||||
You are {role}.
|
You are {role}.
|
||||||
{backstory}
|
{backstory}
|
||||||
|
|
||||||
Your personal goal is: {goal}
|
Your personal goal is: {goal}"""
|
||||||
"""
|
|
||||||
)
|
)
|
||||||
|
|
||||||
TOOLS_SLICE: ClassVar[str] = dedent(
|
TOOLS_SLICE: ClassVar[str] = dedent(
|
||||||
"""\
|
"""\
|
||||||
|
|
||||||
|
|
||||||
TOOLS:
|
TOOLS:
|
||||||
------
|
------
|
||||||
You have access to the following tools:
|
You have access to the following tools:
|
||||||
@@ -58,8 +57,7 @@ class Prompts(BaseModel):
|
|||||||
```
|
```
|
||||||
Thought: Do I need to use a tool? No
|
Thought: Do I need to use a tool? No
|
||||||
Final Answer: [your response here]
|
Final Answer: [your response here]
|
||||||
```
|
```"""
|
||||||
"""
|
|
||||||
)
|
)
|
||||||
|
|
||||||
VOTING_SLICE: ClassVar[str] = dedent(
|
VOTING_SLICE: ClassVar[str] = dedent(
|
||||||
@@ -70,18 +68,17 @@ class Prompts(BaseModel):
|
|||||||
{format_instructions}
|
{format_instructions}
|
||||||
|
|
||||||
These are your co-workers and their roles:
|
These are your co-workers and their roles:
|
||||||
{coworkers}
|
{coworkers}"""
|
||||||
"""
|
|
||||||
)
|
)
|
||||||
|
|
||||||
TASK_EXECUTION_WITH_MEMORY_PROMPT: ClassVar[str] = PromptTemplate.from_template(
|
TASK_EXECUTION_WITH_MEMORY_PROMPT: ClassVar[str] = PromptTemplate.from_template(
|
||||||
ROLE_PLAYING_SLICE + TOOLS_SLICE + MEMORY_SLICE + TASK_SLICE
|
ROLE_PLAYING_SLICE + TOOLS_SLICE + MEMORY_SLICE + TASK_SLICE + SCRATCHPAD_SLICE
|
||||||
)
|
)
|
||||||
|
|
||||||
TASK_EXECUTION_PROMPT: ClassVar[str] = PromptTemplate.from_template(
|
TASK_EXECUTION_PROMPT: ClassVar[str] = PromptTemplate.from_template(
|
||||||
ROLE_PLAYING_SLICE + TOOLS_SLICE + TASK_SLICE
|
ROLE_PLAYING_SLICE + TOOLS_SLICE + TASK_SLICE + SCRATCHPAD_SLICE
|
||||||
)
|
)
|
||||||
|
|
||||||
CONSENSUNS_VOTING_PROMPT: ClassVar[str] = PromptTemplate.from_template(
|
CONSENSUNS_VOTING_PROMPT: ClassVar[str] = PromptTemplate.from_template(
|
||||||
ROLE_PLAYING_SLICE + VOTING_SLICE + TASK_SLICE
|
ROLE_PLAYING_SLICE + VOTING_SLICE + TASK_SLICE + SCRATCHPAD_SLICE
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user