Open
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>
</>;
Activity