microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
21.51k stars 3.17k forks source link

.NET: .Net Azure OpenAI 3.5-turbo (1106) : 'multi_tool_use.parallel' does not match '^[a-zA-Z0-9_-]{1,64}$' #4447

Closed ckpearson closed 2 months ago

ckpearson commented 9 months ago

Describe the bug Using a basic kernel, with native functions targeting Azure OpenAI gpt-35-turbo 1106 running into the following HttpOperationException:

'multi_tool_use.parallel' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.5.tool_calls.0.function.name'
Status: 400 (model_error)

Content:
{
  "error": {
    "message": "'multi_tool_use.parallel' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.5.tool_calls.0.function.name'",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

To Reproduce Steps to reproduce the behavior:

  1. Create a kernel
  2. Add Azure OpenAI chat completions for 3.5-turbo 1106 deployment
  3. Get IChatCompletionsService instance
  4. Call GetChatMessageContentAsync and pass execution settings with tool call behaviour set to AutoInvokeKernelFunctions

Expected behavior For no HTTP error to be thrown, looks like whatever SK is putting into the request is invalid.

Platform

ckpearson commented 9 months ago

Upon further digging (setting call behavior to EnableKernelFunctions) I think what's happening is the model is hallucinating a non-existent tool, and the name of the tool violates some sort of validation the model endpoint expects.

I can see the following tool call: name: multi_tool_use.parallel args: {"tool_uses":[{"recipient_name":"Sample.provideSampleInfo","parameters":{}},{"recipient_name":"Sample.provideSampleInfo","parameters":{}},{"recipient_name":"Sample.provideSampleInfo","parameters":{}}]}

The Sample.provideSampleInfo is vaguely related to the use-case, and other functions that are available.

Is there any way for SK to guard against this / do you have any advice for preventing this sort of tool-call hallucination?

ckpearson commented 9 months ago

Adding a system role message of:

 """
 Under no circumstances should you attempt to call functions / tools that are not available to you.
 Any functions / tools you do call must have the name satisfy the following regex: ^[a-zA-Z0-9_-]{1,64}$
 """

Seems to have mitigated the issue for now.

stephentoub commented 9 months ago

Interesting, thanks. We'll take a look. Can you share the exact code you're using (without api key of course)?

ckpearson commented 9 months ago

It's quite involved as it's a hand-rolled variation on the AgentChat repo but where it wraps SemanticKernel instead as well as some bespoke / proprietary stuff.

Essentially though it's:

var opts = app.Services.GetRequiredService<IOptions<AiOptions>>().Value;
var builder = Kernel.CreateBuilder();
builder.AddAzureOpenAIChatCompletion(opts.BaseDeployment, opts.Endpoint, opts.ApiKey);
var kernel = builder.Build();

var adminKernel = kernel.Clone();
adminKernel.ImportPluginFromObject(new GroupChatPlugin());
var adminAgent = new Agent(...) // agent instantiation

// repeat for other agents
 var group = new GroupChat(
     kernel,
     adminAgent,
     [sampleAgent, configAgent]
 );

var conversation = await group.CallAsync(
    conversationWithName: [
        adminAgent.CreateAgentMessage("Alright group. Let's get started, I think the first thing we should do is get an understanding of the sample."),
    ],
    maxRound: 10,
    throwExceptionWhenMaxRoundReached: false
);

Each of the agents have separate PromptExecutionSettings that can be provided, and I'm setting all of them to auto-call kernel functions. Each agent gets its own kernel so they can maintain isolated tool usage.

What seems to have "fixed" the hallucination is:

 group.AddInitialiseMessage(new ChatMessageContent(AuthorRole.System,
     """
     Under no circumstances should you attempt to call functions / tools that are not available to you.
     Any functions / tools you do call must have the name satisfy the following regex: ^[a-zA-Z0-9_-]{1,64}$
     """));
ckpearson commented 9 months ago

I imagine any use of the chat completions service where the model is given a problem to solve and not the right tools to do it with could very well lead to the hallucinatory behavior unless told explicitly to avoid it.

asabla commented 8 months ago

Seems like I'm able to reproduce the same thing when using Kernel Memory plugin while using gpt-35-turbo and text-embedding-ada-002. Your system prompt also seem to solve this for now @ckpearson

ckpearson commented 8 months ago

@asabla hurray for being able to tell them not to be naughty. An interesting thing I discovered that tripped me up initially was that when calling the completions service, you have to pass the kernel with the plugins imported as the kernel parameter. I assumed that the kernel the completions service was registered with would automatically know to use my plugins, but it doesn't seem to be the case.

Still, this mostly seems to be related to the model just hallucinating non-existent functions.

clemlesne commented 8 months ago

The error seems to come from OpenAI GPT-4 Turbo model. The model sometimes outputs wrong tools call API schema. See: https://community.openai.com/t/model-tries-to-call-unknown-function-multi-tool-use-parallel/490653.

In that case, I would suggest retrying the whole API call because that issue it temporary.

ckpearson commented 8 months ago

Ah @clemlesne that's good to know, looks like it is a training issue on OAI's side. Engineering the prompt does seem to help nudge it away from trying it, so it might be something semantic kernel can take care of, or something to put in the docs.

jichulu commented 5 months ago

I have the same error.

Steps to reproduce: I want to query the weather of a city that has more than 10 administrative regions.

  1. Input city parameters
  2. Get a list of administrative areas
  3. Query specific weather based on administrative areas

here are some log for debug

Trace: [2024/4/28 14:00:24] POST:https://jcaoai-fc.openai.azure.com/openai/deployments/g35t/chat/completions?api-version=2024-04-01-preview
x-ms-client-request-id: 400de6eb-c9c9-4b23-9e1c-2f772aa1346d
{"messages":[{"content":"你是一名智能助手

-------------------
当前时间:2024-04-28 14:00:24 +08:00 星期日
-------------------","role":"system"},{"content":"广州今天天气","role":"user"}],"max_tokens":2048,"temperature":0.7,"top_p":1,"n":1,"presence_penalty":0,"frequency_penalty":0,"model":"g35t","tools":[{"function":{"name":"BingSearchPlugin-Search","description":"Perform a web search.","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query"},"count":{"type":"integer","description":"Number of results (default value: 10)"},"offset":{"type":"integer","description":"Number of results to skip (default value: 0)"}}}},"type":"function"},{"function":{"name":"BingSearchPlugin-GetSearchResults","description":"Perform a web search and return complete results.","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Text to search for"},"count":{"type":"integer","description":"Number of results (default value: 3)"},"offset":{"type":"integer","description":"Number of results to skip (default value: 0)"}}}},"type":"function"},{"function":{"name":"WeatherPlugin-GetAddressCodes","description":"Obtain the codes of each subordinate area based on the city area code","parameters":{"type":"object","required":["cityCode"],"properties":{"cityCode":{"type":"string","description":"City area code. e.g. 010, 020..."}}}},"type":"function"},{"function":{"name":"WeatherPlugin-GetWeather","description":"Get city weather based on area code","parameters":{"type":"object","required":["addressCode"],"properties":{"addressCode":{"type":"string","description":"City area address code. e.g. 110000, 440100..."}}}},"type":"function"},{"function":{"name":"StockPlugin-GetStockQuote","description":"Batch get stock quote details by symbol list","parameters":{"type":"object","required":["symbols"],"properties":{"symbols":{"type":"string","description":"List of stock symbols, comma separated. e.g. MSFT"}}}},"type":"function"},{"function":{"name":"StockPlugin-QueryStock","description":"Query stock by keyword","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"query parameter. e.g. MSFT, 微软"}}}},"type":"function"}],"tool_choice":"auto"}
Trace: [2024/4/28 14:00:24] Response:https://jcaoai-fc.openai.azure.com/openai/deployments/g35t/chat/completions?api-version=2024-04-01-preview 200
client-request-id: 400de6eb-c9c9-4b23-9e1c-2f772aa1346d
{"choices":[{"content_filter_results":{},"finish_reason":"tool_calls","index":0,"logprobs":null,"message":{"content":null,"role":"assistant","tool_calls":[{"function":{"arguments":"{"cityCode":"020"}","name":"WeatherPlugin-GetAddressCodes"},"id":"call_QsaqTD2C5S0ELcfZqmbA2J2i","type":"function"}]}}],"created":1714284009,"id":"chatcmpl-9Irs1W82ITlHNd2T0CgV6hsGwUmIp","model":"gpt-35-turbo","object":"chat.completion","prompt_filter_results":[{"prompt_index":0,"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}],"system_fingerprint":"fp_2f57f81c11","usage":{"completion_tokens":20,"prompt_tokens":373,"total_tokens":393}}
Info: [2024/4/28 14:00:24] Prompt tokens: 373. Completion tokens: 20. Total tokens: 393.
Debug: [2024/4/28 14:00:24] Tool requests: 1
Trace: [2024/4/28 14:00:24] Function call requests: WeatherPlugin-GetAddressCodes({"cityCode":"020"})
Info: [2024/4/28 14:00:24] Function GetAddressCodes invoking.
Info: [2024/4/28 14:00:24] Function GetAddressCodes succeeded.
Info: [2024/4/28 14:00:24] Function completed. Duration: 0.0103175s
Trace: [2024/4/28 14:00:24] POST:https://jcaoai-fc.openai.azure.com/openai/deployments/g35t/chat/completions?api-version=2024-04-01-preview
x-ms-client-request-id: b3507fde-d357-41d8-817c-7239483b03df
{"messages":[{"content":"你是一名智能助手

-------------------
当前时间:2024-04-28 14:00:24 +08:00 星期日
-------------------","role":"system"},{"content":"广州今天天气","role":"user"},{"content":null,"tool_calls":[{"function":{"name":"WeatherPlugin-GetAddressCodes","arguments":"{"cityCode":"020"}"},"type":"function","id":"call_QsaqTD2C5S0ELcfZqmbA2J2i"}],"role":"assistant"},{"content":"AddressCodes: 广州市(440100)
荔湾区(440103)
越秀区(440104)
海珠区(440105)
天河区(440106)
白云区(440111)
黄埔区(440112)
番禺区(440113)
花都区(440114)
南沙区(440115)
从化区(440117)
增城区(440118)","tool_call_id":"call_QsaqTD2C5S0ELcfZqmbA2J2i","role":"tool"}],"max_tokens":2048,"temperature":0.7,"top_p":1,"n":1,"presence_penalty":0,"frequency_penalty":0,"model":"g35t","tools":[{"function":{"name":"BingSearchPlugin-Search","description":"Perform a web search.","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query"},"count":{"type":"integer","description":"Number of results (default value: 10)"},"offset":{"type":"integer","description":"Number of results to skip (default value: 0)"}}}},"type":"function"},{"function":{"name":"BingSearchPlugin-GetSearchResults","description":"Perform a web search and return complete results.","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Text to search for"},"count":{"type":"integer","description":"Number of results (default value: 3)"},"offset":{"type":"integer","description":"Number of results to skip (default value: 0)"}}}},"type":"function"},{"function":{"name":"WeatherPlugin-GetAddressCodes","description":"Obtain the codes of each subordinate area based on the city area code","parameters":{"type":"object","required":["cityCode"],"properties":{"cityCode":{"type":"string","description":"City area code. e.g. 010, 020..."}}}},"type":"function"},{"function":{"name":"WeatherPlugin-GetWeather","description":"Get city weather based on area code","parameters":{"type":"object","required":["addressCode"],"properties":{"addressCode":{"type":"string","description":"City area address code. e.g. 110000, 440100..."}}}},"type":"function"},{"function":{"name":"StockPlugin-GetStockQuote","description":"Batch get stock quote details by symbol list","parameters":{"type":"object","required":["symbols"],"properties":{"symbols":{"type":"string","description":"List of stock symbols, comma separated. e.g. MSFT"}}}},"type":"function"},{"function":{"name":"StockPlugin-QueryStock","description":"Query stock by keyword","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"query parameter. e.g. MSFT, 微软"}}}},"type":"function"}],"tool_choice":"auto"}
Trace: [2024/4/28 14:00:28] Response:https://jcaoai-fc.openai.azure.com/openai/deployments/g35t/chat/completions?api-version=2024-04-01-preview 200
client-request-id: b3507fde-d357-41d8-817c-7239483b03df
{"choices":[{"content_filter_results":{},"finish_reason":"tool_calls","index":0,"logprobs":null,"message":{"content":null,"role":"assistant","tool_calls":[{"function":{"arguments":"{"tool_uses":[{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440100"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440103"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440104"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440105"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440106"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440111"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440112"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440113"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440114"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440115"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440117"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440118"}}]}","name":"multi_tool_use.parallel"},"id":"call_lATY7F1t7DCeDdUZthe8PVt0","type":"function"}]}}],"created":1714284010,"id":"chatcmpl-9Irs2fSlWBYGLLr705yn9WYADtpDC","model":"gpt-35-turbo","object":"chat.completion","prompt_filter_results":[{"prompt_index":0,"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}],"system_fingerprint":"fp_2f57f81c11","usage":{"completion_tokens":256,"prompt_tokens":506,"total_tokens":762}}
Info: [2024/4/28 14:00:28] Prompt tokens: 506. Completion tokens: 256. Total tokens: 762.
Debug: [2024/4/28 14:00:28] Tool requests: 1
Trace: [2024/4/28 14:00:28] Function call requests: multi_tool_use.parallel({"tool_uses":[{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440100"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440103"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440104"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440105"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440106"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440111"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440112"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440113"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440114"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440115"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440117"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440118"}}]})
Debug: [2024/4/28 14:00:28] Failed to handle tool request (call_lATY7F1t7DCeDdUZthe8PVt0). Error: Function call request for a function that wasn't defined.
Trace: [2024/4/28 14:00:28] POST:https://jcaoai-fc.openai.azure.com/openai/deployments/g35t/chat/completions?api-version=2024-04-01-preview
x-ms-client-request-id: 76de9eaf-a5af-419a-8698-ce9861fd2277
{"messages":[{"content":"你是一名智能助手

-------------------
当前时间:2024-04-28 14:00:24 +08:00 星期日
-------------------","role":"system"},{"content":"广州今天天气","role":"user"},{"content":null,"tool_calls":[{"function":{"name":"WeatherPlugin-GetAddressCodes","arguments":"{"cityCode":"020"}"},"type":"function","id":"call_QsaqTD2C5S0ELcfZqmbA2J2i"}],"role":"assistant"},{"content":"AddressCodes: 广州市(440100)
荔湾区(440103)
越秀区(440104)
海珠区(440105)
天河区(440106)
白云区(440111)
黄埔区(440112)
番禺区(440113)
花都区(440114)
南沙区(440115)
从化区(440117)
增城区(440118)","tool_call_id":"call_QsaqTD2C5S0ELcfZqmbA2J2i","role":"tool"},{"content":null,"tool_calls":[{"function":{"name":"multi_tool_use.parallel","arguments":"{"tool_uses":[{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440100"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440103"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440104"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440105"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440106"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440111"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440112"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440113"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440114"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440115"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440117"}},{"recipient_name":"functions.WeatherPlugin-GetWeather","parameters":{"addressCode":"440118"}}]}"},"type":"function","id":"call_lATY7F1t7DCeDdUZthe8PVt0"}],"role":"assistant"},{"content":"Error: Function call request for a function that wasn't defined.","tool_call_id":"call_lATY7F1t7DCeDdUZthe8PVt0","role":"tool"}],"max_tokens":2048,"temperature":0.7,"top_p":1,"n":1,"presence_penalty":0,"frequency_penalty":0,"model":"g35t","tools":[{"function":{"name":"BingSearchPlugin-Search","description":"Perform a web search.","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query"},"count":{"type":"integer","description":"Number of results (default value: 10)"},"offset":{"type":"integer","description":"Number of results to skip (default value: 0)"}}}},"type":"function"},{"function":{"name":"BingSearchPlugin-GetSearchResults","description":"Perform a web search and return complete results.","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Text to search for"},"count":{"type":"integer","description":"Number of results (default value: 3)"},"offset":{"type":"integer","description":"Number of results to skip (default value: 0)"}}}},"type":"function"},{"function":{"name":"WeatherPlugin-GetAddressCodes","description":"Obtain the codes of each subordinate area based on the city area code","parameters":{"type":"object","required":["cityCode"],"properties":{"cityCode":{"type":"string","description":"City area code. e.g. 010, 020..."}}}},"type":"function"},{"function":{"name":"WeatherPlugin-GetWeather","description":"Get city weather based on area code","parameters":{"type":"object","required":["addressCode"],"properties":{"addressCode":{"type":"string","description":"City area address code. e.g. 110000, 440100..."}}}},"type":"function"},{"function":{"name":"StockPlugin-GetStockQuote","description":"Batch get stock quote details by symbol list","parameters":{"type":"object","required":["symbols"],"properties":{"symbols":{"type":"string","description":"List of stock symbols, comma separated. e.g. MSFT"}}}},"type":"function"},{"function":{"name":"StockPlugin-QueryStock","description":"Query stock by keyword","parameters":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"query parameter. e.g. MSFT, 微软"}}}},"type":"function"}],"tool_choice":"auto"}
Trace: [2024/4/28 14:00:28] Response:https://jcaoai-fc.openai.azure.com/openai/deployments/g35t/chat/completions?api-version=2024-04-01-preview 400
client-request-id: 76de9eaf-a5af-419a-8698-ce9861fd2277
{
  "error": {
    "message": "'multi_tool_use.parallel' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.4.tool_calls.0.function.name'",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}
Error: [2024/4/28 14:00:28] drawflowRunner.RunAsync
Microsoft.SemanticKernel.HttpOperationException: 'multi_tool_use.parallel' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.4.tool_calls.0.function.name'
Status: 400 (model_error)

Content:
{
  "error": {
    "message": "'multi_tool_use.parallel' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.4.tool_calls.0.function.name'",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

Headers:
Access-Control-Allow-Origin: REDACTED
X-Content-Type-Options: REDACTED
x-ratelimit-remaining-requests: REDACTED
apim-request-id: REDACTED
x-ratelimit-remaining-tokens: REDACTED
x-ms-rai-invoked: REDACTED
X-Request-ID: REDACTED
ms-azureml-model-error-reason: REDACTED
ms-azureml-model-error-statuscode: REDACTED
x-ms-client-request-id: 76de9eaf-a5af-419a-8698-ce9861fd2277
x-ms-region: REDACTED
azureml-model-session: REDACTED
Strict-Transport-Security: REDACTED
Date: Sun, 28 Apr 2024 06:00:13 GMT
Content-Length: 219
Content-Type: application/json

 ---> Azure.RequestFailedException: 'multi_tool_use.parallel' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.4.tool_calls.0.function.name'
Status: 400 (model_error)

Content:
{
  "error": {
    "message": "'multi_tool_use.parallel' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.4.tool_calls.0.function.name'",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

Headers:
Access-Control-Allow-Origin: REDACTED
X-Content-Type-Options: REDACTED
x-ratelimit-remaining-requests: REDACTED
apim-request-id: REDACTED
x-ratelimit-remaining-tokens: REDACTED
x-ms-rai-invoked: REDACTED
X-Request-ID: REDACTED
ms-azureml-model-error-reason: REDACTED
ms-azureml-model-error-statuscode: REDACTED
x-ms-client-request-id: 76de9eaf-a5af-419a-8698-ce9861fd2277
x-ms-region: REDACTED
azureml-model-session: REDACTED
Strict-Transport-Security: REDACTED
Date: Sun, 28 Apr 2024 06:00:13 GMT
Content-Length: 219
Content-Type: application/json

   at Azure.Core.HttpPipelineExtensions.ProcessMessageAsync(HttpPipeline pipeline, HttpMessage message, RequestContext requestContext, CancellationToken cancellationToken)
   at Azure.AI.OpenAI.OpenAIClient.GetChatCompletionsAsync(ChatCompletionsOptions chatCompletionsOptions, CancellationToken cancellationToken)
   at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.RunRequestAsync[T](Func`1 request)
   --- End of inner exception stack trace ---
   at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.RunRequestAsync[T](Func`1 request)
   at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.GetChatMessageContentsAsync(ChatHistory chat, PromptExecutionSettings executionSettings, Kernel kernel, CancellationToken cancellationToken)
   at Microsoft.SemanticKernel.ChatCompletion.ChatCompletionServiceExtensions.GetChatMessageContentAsync(IChatCompletionService chatCompletionService, ChatHistory chatHistory, PromptExecutionSettings executionSettings, Kernel kernel, CancellationToken cancellationToken)
eavanvalkenburg commented 4 months ago

I saw this in python as well, I was super confused where this multi use thing was coming from, thanks for investigating!

moonbox3 commented 2 months ago

Is there action that the SK team needs to take here? If so, please re-open.