-
Notifications
You must be signed in to change notification settings - Fork 589
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I am using GitHub Copilot Business in VS Code.
When i run the example csharp-sdk\samples\AspNetCoreSseServer and try call SampleLlmTool.SampleLLM via. GitHub Copilot Business in VS Code in agent mode. I get the following exception in the MCP server:
Exception has occurred: CLR/System.ArgumentException
An exception of type 'System.ArgumentException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'Client connected to the server does not support sampling.'
at ModelContextProtocol.Server.McpServerExtensions.AsSamplingChatClient(IMcpServer server) in C:\Projects\csharp-sdk\src\ModelContextProtocol\Server\McpServerExtensions.cs:line 169
at TestServerWithHosting.Tools.SampleLlmTool.<SampleLLM>d__0.MoveNext() in C:\Projects\csharp-sdk\samples\AspNetCoreSseServer\Tools\SampleLlmTool.cs:line 32
at Microsoft.Extensions.AI.AIFunctionFactory.ReflectionAIFunctionDescriptor.<>c__DisplayClass32_1.<<GetReturnParameterMarshaller>b__10>d.MoveNext()
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
at Microsoft.Extensions.AI.AIFunctionFactory.ReflectionAIFunction.<InvokeCoreAsync>d__26.MoveNext()
How do i ensure that my client, in this case GitHub Copilot Business in VS Code, can support sampling?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working