Skip to content

Conversation

dluc
Copy link
Collaborator

@dluc dluc commented Sep 5, 2024

Motivation and Context (Why the change? What's the scenario?)

Although Ollama service protocol seemingly follows OpenAI behavior, Azure Open AI/OpenAI/SK OpenAI C# connectors are not fully functional when pointed to Ollama service, leading to various errors.

This PR introduces a new connector dedicated to Ollama, allowing to use it for Text Generation and Text Embedding generation.

The Ollama connector can be used for service and serverless mode. The PR includes an example (212), I've also manually tested the service with the new connector, using "phi3:medium-128k" and "nomic-embed-text" on Apple Silicon.

High level description (Approach, Design)

  • New Ollama connector based on OllamaSharp
  • Bump version to 0.72
  • Other minor changes:
    • Switch from gpt4 to gpt4o tokenizer, when no tokenizer is specified.
    • Add SensitiveDataLogger, usable only on dev environments to log data that potentially includes PII.
    • Fix warning in service logs when using Anthropic

@dluc dluc merged commit b06084a into microsoft:main Sep 5, 2024
6 checks passed
@dluc dluc deleted the ollama branch September 5, 2024 05:37
@dluc dluc mentioned this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant