You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploy a IChatCompletionService Llama model locally with Ollama and validate that it works with Semantic Kernel and the existing IChatCompletionService interface.
changed the title [-]Test local modal with Semantic Kernel (i.e., Llama via Ollama)[/-][+].Net: Test local modal with Semantic Kernel (i.e., Llama via Ollama)[/+]on Dec 5, 2023
I tested our IChatCompletionService with Ollama using mistral. My conclusion is that our abstractions are good enough to allow this to work, but it does not currently work due to some implementation details in the Azure OpenAI SDK:
Ollama chat API uses the same interface as OpenAI however the Ollama response is streaming by default where the OpenAI response is not-streaming by default. This is a problem because the only way to disable streaming on Ollama is to set streaming=false in the request body, which is never done in the Azure OpenAI SDK, it's either true or null (missing).
Ollama streaming uses Server Sent Events just like OpenAI but Ollama uses named events, also known as multi-line events, see this and the Azure OpenAI SDK does not support this, it throws an exception.
Once these issues are fixed in the Azure OpenAI SDK, our IChatCompletionService will support Ollama.
SommerEngineering and gjactatSommerEngineeringSommerEngineering
Activity
[-]Test local modal with Semantic Kernel (i.e., Llama via Ollama)[/-][+].Net: Test local modal with Semantic Kernel (i.e., Llama via Ollama)[/+]madsbolaris commentedon Dec 12, 2023
Doesn't need to test function calling.
alliscode commentedon Dec 15, 2023
I tested our IChatCompletionService with Ollama using mistral. My conclusion is that our abstractions are good enough to allow this to work, but it does not currently work due to some implementation details in the Azure OpenAI SDK:
streaming=false
in the request body, which is never done in the Azure OpenAI SDK, it's eithertrue
ornull
(missing).Once these issues are fixed in the Azure OpenAI SDK, our IChatCompletionService will support Ollama.
stephentoub commentedon Jan 11, 2024
Are there issues open on that for Azure.AI.OpenAI? Is anyone working on it? Timeframe?
clement128 commentedon Jan 17, 2024
hello any update for this?