Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/ollama integration #194

Merged
merged 27 commits into from
Feb 17, 2024
Merged

Feat/ollama integration #194

merged 27 commits into from
Feb 17, 2024

Conversation

csgulati09
Copy link
Collaborator

@csgulati09 csgulati09 commented Feb 6, 2024

Title:

  • Provider: Ollama

Description: (optional)

  • Added Ollama as a provider
  • Covering 3 major features: Complete, chat and embed
  • Both, stream and non-stream functions are supported
  • Add support for custom_host setting in config and alss x-portkey-custom-host header.
  • Add support for forward_headers setting in config and also x-portkey-forward-headers headers.

Motivation: (optional)

  • This allows the users to use their self hosted Ollama via Portkey gateway.
  • To allow adding custom base url to use proxy instead of directly using provider base_url.
  • To allow users to add custom headers to LLM request without any overwrite from gateway.

Related Issues: (optional)

embed:"/api/embeddings",
getEndpoint: (fn: string, API_VERSION: string, url?: string) => {
let mappedFn = fn;
if (fn === "proxy" && url && url?.indexOf("/chat/completions") > -1) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required as /chat/completions will always point to the unified route.

src/utils.ts Outdated Show resolved Hide resolved
@VisargD VisargD merged commit 0047d92 into main Feb 17, 2024
@VisargD VisargD deleted the feat/ollama-integration branch February 17, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants