Skip to content

Commit d2543f2

Browse files
committed
change role to description
1 parent 5074ad2 commit d2543f2

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

templates/types/multiagent/fastapi/app/agents/multi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async def schema_call(input: str) -> str:
2525
name=name,
2626
description=(
2727
f"Use this tool to delegate a sub task to the {agent.name} agent."
28-
+ (f" The agent is an {agent.role}." if agent.role else "")
28+
+ (f" The agent is an {agent.description}." if agent.description else "")
2929
),
3030
fn_schema=fn_schema,
3131
)

templates/types/multiagent/fastapi/app/examples/choreography.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ def create_choreography(chat_history: Optional[List[ChatMessage]] = None):
1212
publisher = create_publisher(chat_history)
1313
reviewer = FunctionCallingAgent(
1414
name="reviewer",
15-
role="expert in reviewing blog posts",
15+
description="expert in reviewing blog posts, need a written post to review",
1616
system_prompt="You are an expert in reviewing blog posts. You are given a task to review a blog post. Review the post for logical inconsistencies, ask critical questions, and provide suggestions for improvement. Furthermore, proofread the post for grammar and spelling errors. If the post is good, you can say 'The post is good.'",
1717
chat_history=chat_history,
1818
verbose=True,
1919
)
2020
return AgentCallingAgent(
2121
name="writer",
2222
agents=[researcher, reviewer, publisher],
23-
role="expert in writing blog posts",
23+
description="expert in writing blog posts, need provided information and images to write a blog post",
2424
system_prompt="""You are an expert in writing blog posts. You are given a task to write a blog post. Before starting to write the post, consult the researcher agent to get the information you need. Don't make up any information yourself.
2525
After creating a draft for the post, send it to the reviewer agent to receive some feedback and make sure to incorporate the feedback from the reviewer.
2626
You can consult the reviewer and researcher maximal two times. Your output should just contain the blog post.

templates/types/multiagent/fastapi/app/examples/orchestrator.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def create_orchestrator(chat_history: Optional[List[ChatMessage]] = None):
1111
researcher = create_researcher(chat_history)
1212
writer = FunctionCallingAgent(
1313
name="writer",
14-
role="expert in writing blog posts, need information and images to write a post",
14+
description="expert in writing blog posts, need information and images to write a post",
1515
system_prompt="""You are an expert in writing blog posts.
1616
You are given a task to write a blog post. Don't make up any information yourself.
1717
If you don't have the necessary information to write a blog post, reply "I need information about the topic to write the blog post".
@@ -21,7 +21,7 @@ def create_orchestrator(chat_history: Optional[List[ChatMessage]] = None):
2121
)
2222
reviewer = FunctionCallingAgent(
2323
name="reviewer",
24-
role="expert in reviewing blog posts, need a written blog post to review",
24+
description="expert in reviewing blog posts, need a written blog post to review",
2525
system_prompt="""You are an expert in reviewing blog posts. You are given a task to review a blog post. Review the post and fix the issues found yourself. You must output a final blog post.
2626
A post must include at lease one valid image, if not, reply "I need images about the topic to write the blog post". An image URL start with example or your website is not valid.
2727
Especially check for logical inconsistencies and proofread the post for grammar and spelling errors.""",

templates/types/multiagent/fastapi/app/examples/publisher.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ def create_publisher(chat_history: List[ChatMessage]):
1212
return FunctionCallingAgent(
1313
name="publisher",
1414
tools=[artifact_tool],
15-
role="expert in publishing, need to specify the type of artifact (pdf, html, or markdown)",
15+
description="expert in publishing, need to specify the type of artifact use a file (pdf, html) or just reply the content directly",
1616
system_prompt="""You are a publisher that help publish the blog post.
17-
For a normal request, you should choose the type of artifact either pdf or html or just reply to the user the markdown content directly with out generating any artifact file.
17+
For a normal request, you should choose the type of artifact either pdf or html or just reply to the user directly without generating any artifact file.
1818
""",
1919
chat_history=chat_history,
2020
verbose=True,

templates/types/multiagent/fastapi/app/examples/researcher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def create_researcher(chat_history: List[ChatMessage]):
3535
return FunctionCallingAgent(
3636
name="researcher",
3737
tools=[get_query_engine_tool(), *duckduckgo_search_tools],
38-
role="expert in retrieving any unknown content or searching for images from the internet",
38+
description="expert in retrieving any unknown content or searching for images from the internet",
3939
system_prompt="You are a researcher agent. You are given a researching task. You must use tools to retrieve information from the knowledge base and search for needed images from the internet for the post.",
4040
chat_history=chat_history,
4141
)

templates/types/multiagent/fastapi/app/examples/workflow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ def create_workflow(chat_history: Optional[List[ChatMessage]] = None):
2323
)
2424
writer = FunctionCallingAgent(
2525
name="writer",
26-
role="expert in writing blog posts",
26+
description="expert in writing blog posts, need information and images to write a post",
2727
system_prompt="""You are an expert in writing blog posts. You are given a task to write a blog post. Don't make up any information yourself.""",
2828
chat_history=chat_history,
2929
)
3030
reviewer = FunctionCallingAgent(
3131
name="reviewer",
32-
role="expert in reviewing blog posts",
32+
description="expert in reviewing blog posts, need a written blog post to review",
3333
system_prompt="You are an expert in reviewing blog posts. You are given a task to review a blog post. Review the post for logical inconsistencies, ask critical questions, and provide suggestions for improvement. Furthermore, proofread the post for grammar and spelling errors. Only if the post is good enough for publishing, then you MUST return 'The post is good.'. In all other cases return your review.",
3434
chat_history=chat_history,
3535
)

0 commit comments

Comments
 (0)