microsoft / semantic-kernel

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

.Net: Update Ollama Client in Ollama Connector to use OllamaSharp #5993

Open luisquintanilla opened 2 months ago

luisquintanilla commented 2 months ago

Currently, the Ollama connector implements its own client.

Consider replacing the current implementation with OllamaSharp.

Related samples

feiyun0112 commented 2 months ago

nuget OllamaSharp only support net5.0, can not install in project

Package OllamaSharp 1.1.1 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package OllamaSharp 1.1.1 supports: net5.0 (.NETCoreApp,Version=v5.0)
matthewbolanos commented 2 months ago

Now that Ollama supports the OpenAI API standard, we may not even need a specialized Ollama connector (since a user will simply be able to use the OpenAI connector, when we pick this issue up, we will validate that this is the case and proceed accordingly

SteveSandersonMS commented 1 week ago

Now that Ollama supports the OpenAI API standard, we may not even need a specialized Ollama connector (since a user will simply be able to use the OpenAI connector, when we pick this issue up, we will validate that this is the case and proceed accordingly

FYI even though Ollama does have that feature, it's currently buggy, so unless the external issues are fixed it's still necessary to use the native Ollama protocol. Longer term there is also no reason to assume the OpenAI API spec will cover all possible future Ollama features, so it would be a bit of a gamble to rely on the OpenAI protocol exclusively.