Closed benmcmorran closed 1 month ago
I've seen similar behavior, and have been experimenting with this. I think there are two things that I need to do
I've been looking at the API part but I just realized this morning that the second point seems pretty impactful, so I will include the list of functions that have been used in the conversation thread, with function_call: 'none'
, that seems to give better results.
And yes internally we're also still on OpenAI's deprecated "functions" API, we will move to the "tools" API soon, maybe that will help too.
I tried using a user message instead of a role=function message
Request: [
{
"role": "user",
"content": "What compiler does this C++ project use?"
},
{
"role": "assistant",
"content": "This C++ project uses the GCC compiler."
},
{
"role": "user",
"content": "This C++ project uses the GCC compiler."
},
{
"role": "user",
"content": "What compiler does this C++ project use?"
}
]
RESPONSE:
[
{
"index": 0,
"message": {
"role": "assistant",
"content": "I can find out the compiler being used for this project. Please hold on for a moment while I retrieve the information.",
"refusal": null
},
"logprobs": null,
"finish_reason": "stop"
}
]
?????
Anyway, we already label context messages for the old variables API, I had just hoped I could get away from that, but something like this is still needed.
Request: [
{
"role": "user",
"content": "What compiler does this C++ project use?"
},
{
"role": "assistant",
"content": "This C++ project uses the GCC compiler."
},
{
"role": "user",
"content": "C/C++ Configuration Context:\nThis C++ project uses the GCC compiler."
},
{
"role": "user",
"content": "What compiler does this C++ project use?"
}
]
RESPONSE:
[
{
"index": 0,
"message": {
"role": "assistant",
"content": "Based on the provided configuration context, this C++ project uses the GCC compiler.",
"refusal": null
},
"logprobs": null,
"finish_reason": "stop"
}
]
And another reason I won't go the function_call: 'none'
route with function messages is that this is leading to the responses like I can find out the compiler being used for this project. Please hold on for a moment while I retrieve the information.
claiming that it will call a tool when that's not allowed.
Does this issue occur when all extensions are disabled?: No, depends on Copilot Chat and another extension to use the lmTools API proposal
Steps to Reproduce:
npx --package yo --package generator-code -- yo code
and accept all prompts to create a new TypeScript extension.npx vscode-dts dev
.Note that with verbose logging enabled, it's clear that GitHub Copilot did run the registered tool and include the tool response in the request.
cc @isidorn @lukka @spebl @sinemakinci1 @esweet431