-
Notifications
You must be signed in to change notification settings - Fork 175
Description
When using OllamaSharp's OllamaApiClient.ChatAsyncto wrap the public Ollama WebAPI, unlike the advanced Chat class which automatically handles ToolCalls internally, I need to manually determine if the AI requires a ToolCall when the large language model returns a response, and then manually invoke the tool functions in the following way:
var toolInvoker = new DefaultToolInvoker();
foreach (var toolCall in toolCalls)
{
var toolResult = await toolInvoker.InvokeAsync(toolCall, Common.OllamaTools, cancellationToken).ConfigureAwait(false);
var result = RenderToolSignature(toolResult);
sb.Append(result);
}
With business growth, there will likely be a need to deploy server-side tools via Microsoft MCP Servers on a separate server, and then integrate these MCP Servers into this Ollama Web API project. However, I've found that the OllamaSharp SDK makes this integration quite difficult or offers no support for it.
Feature Request:
-
Would it be possible to add friendly support for Microsoft MCP Servers?
-
Are there any existing solutions? Could you provide a clear Demo example?