microsoft / microsoft/vscode-docs
Document that, for the copilot models, the final prompt must end with a non-tool-result `UserMessage`
@ntrogh is already working on this.
Since Feb 24, 2025.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 5.8k
- Avg merge
- 11h 43m
- Merged PRs (30d)
- 123
Description
When implementing a chat participant that uses tool calls with the copilot models, the last message sent to the copilot models after invoking a tool should not be the result of the tool call. A prompt like "Above is the result of calling one or more tools. The user cannot see the results, so you should explain them to the user if referencing them in your answer" is required after the tool call result. This behavior differs from that of the OpenAI Chat API.
Since this is only written as a comment in the chat-sample, it should also be included in the documentation.
// Note- for the copilot models, the final prompt must end with a non-tool-result UserMessage
return <>
{this.props.toolCallRounds.map(round => this.renderOneToolCallRound(round))}
<UserMessage>Above is the result of calling one or more tools. The user cannot see the results, so you should explain them to the user if referencing them in your answer.</UserMessage>
</>;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.