mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 06:49:02 +08:00
fix(prompts): standardize tool use example format to use 'A:' label consistently (#12313)
- Changed all 'Assistant:' labels to 'A:' in tool use examples for consistency - Added missing blank line before final response in both files - Affects promptToolUsePlugin.ts and prompt.ts - Resolves #12310
This commit is contained in:
parent
bb9b73557b
commit
af7896b900
@ -154,7 +154,8 @@ User: <tool_use_result>
|
||||
<name>search</name>
|
||||
<result>26 million (2019)</result>
|
||||
</tool_use_result>
|
||||
Assistant: The population of Shanghai is 26 million, while Guangzhou has a population of 15 million. Therefore, Shanghai has the highest population.`
|
||||
|
||||
A: The population of Shanghai is 26 million, while Guangzhou has a population of 15 million. Therefore, Shanghai has the highest population.`
|
||||
|
||||
/**
|
||||
* 构建可用工具部分(提取自 Cherry Studio)
|
||||
|
||||
@ -14,7 +14,7 @@ Here are a few examples using notional tools:
|
||||
---
|
||||
User: Generate an image of the oldest person in this document.
|
||||
|
||||
Assistant: I can use the document_qa tool to find out who the oldest person is in the document.
|
||||
A: I can use the document_qa tool to find out who the oldest person is in the document.
|
||||
<tool_use>
|
||||
<name>document_qa</name>
|
||||
<arguments>{"document": "document.pdf", "question": "Who is the oldest person mentioned?"}</arguments>
|
||||
@ -25,7 +25,7 @@ User: <tool_use_result>
|
||||
<result>John Doe, a 55 year old lumberjack living in Newfoundland.</result>
|
||||
</tool_use_result>
|
||||
|
||||
Assistant: I can use the image_generator tool to create a portrait of John Doe.
|
||||
A: I can use the image_generator tool to create a portrait of John Doe.
|
||||
<tool_use>
|
||||
<name>image_generator</name>
|
||||
<arguments>{"prompt": "A portrait of John Doe, a 55-year-old man living in Canada."}</arguments>
|
||||
@ -36,12 +36,12 @@ User: <tool_use_result>
|
||||
<result>image.png</result>
|
||||
</tool_use_result>
|
||||
|
||||
Assistant: the image is generated as image.png
|
||||
A: the image is generated as image.png
|
||||
|
||||
---
|
||||
User: "What is the result of the following operation: 5 + 3 + 1294.678?"
|
||||
|
||||
Assistant: I can use the python_interpreter tool to calculate the result of the operation.
|
||||
A: I can use the python_interpreter tool to calculate the result of the operation.
|
||||
<tool_use>
|
||||
<name>python_interpreter</name>
|
||||
<arguments>{"code": "5 + 3 + 1294.678"}</arguments>
|
||||
@ -52,12 +52,12 @@ User: <tool_use_result>
|
||||
<result>1302.678</result>
|
||||
</tool_use_result>
|
||||
|
||||
Assistant: The result of the operation is 1302.678.
|
||||
A: The result of the operation is 1302.678.
|
||||
|
||||
---
|
||||
User: "Which city has the highest population , Guangzhou or Shanghai?"
|
||||
|
||||
Assistant: I can use the search tool to find the population of Guangzhou.
|
||||
A: I can use the search tool to find the population of Guangzhou.
|
||||
<tool_use>
|
||||
<name>search</name>
|
||||
<arguments>{"query": "Population Guangzhou"}</arguments>
|
||||
@ -68,7 +68,7 @@ User: <tool_use_result>
|
||||
<result>Guangzhou has a population of 15 million inhabitants as of 2021.</result>
|
||||
</tool_use_result>
|
||||
|
||||
Assistant: I can use the search tool to find the population of Shanghai.
|
||||
A: I can use the search tool to find the population of Shanghai.
|
||||
<tool_use>
|
||||
<name>search</name>
|
||||
<arguments>{"query": "Population Shanghai"}</arguments>
|
||||
@ -78,7 +78,8 @@ User: <tool_use_result>
|
||||
<name>search</name>
|
||||
<result>26 million (2019)</result>
|
||||
</tool_use_result>
|
||||
Assistant: The population of Shanghai is 26 million, while Guangzhou has a population of 15 million. Therefore, Shanghai has the highest population.
|
||||
|
||||
A: The population of Shanghai is 26 million, while Guangzhou has a population of 15 million. Therefore, Shanghai has the highest population.
|
||||
`
|
||||
|
||||
export const AvailableTools = (tools: MCPTool[]) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user