mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
fixing types and adding ability for nor using system prompts
This commit is contained in:
@@ -856,6 +856,31 @@ def test_interpolate_inputs():
|
||||
assert agent.backstory == "I am the master of nothing"
|
||||
|
||||
|
||||
def test_not_using_system_prompt():
|
||||
agent = Agent(
|
||||
role="{topic} specialist",
|
||||
goal="Figure {goal} out",
|
||||
backstory="I am the master of {role}",
|
||||
use_system_prompt=False,
|
||||
)
|
||||
|
||||
agent.create_agent_executor()
|
||||
assert not agent.agent_executor.prompt.get("user")
|
||||
assert not agent.agent_executor.prompt.get("system")
|
||||
|
||||
|
||||
def test_using_system_prompt():
|
||||
agent = Agent(
|
||||
role="{topic} specialist",
|
||||
goal="Figure {goal} out",
|
||||
backstory="I am the master of {role}",
|
||||
)
|
||||
|
||||
agent.create_agent_executor()
|
||||
assert agent.agent_executor.prompt.get("user")
|
||||
assert agent.agent_executor.prompt.get("system")
|
||||
|
||||
|
||||
def test_system_and_prompt_template():
|
||||
agent = Agent(
|
||||
role="{topic} specialist",
|
||||
|
||||
Reference in New Issue
Block a user