-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7432f08
commit 09faf86
Showing
5 changed files
with
35 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from phi.agent import Agent | ||
|
||
|
||
def get_system_prompt(agent: Agent) -> str: | ||
return f"You are {agent.name}!" | ||
|
||
|
||
agent = Agent( | ||
name="AgentX", | ||
system_prompt=get_system_prompt, | ||
markdown=True, | ||
show_tool_calls=True, | ||
) | ||
agent.print_response("Who are you?", stream=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import List | ||
|
||
from phi.agent import Agent | ||
|
||
|
||
def get_instructions(agent: Agent) -> List[str]: | ||
return ["Talk in haiku's!", "Use poetry to answer questions."] | ||
|
||
|
||
agent = Agent( | ||
name="AgentX", | ||
instructions=get_instructions, | ||
markdown=True, | ||
show_tool_calls=True, | ||
) | ||
agent.print_response("Who are you?", stream=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters