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(main.py): support calling text completione endpoint for openai compatible providers #2709

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

krrishdholakia
Copy link
Contributor

check if a text completion call is being made and route to correct endpoint

…ompatible providers

check if a text completion call is being made and route to correct endpoint
Copy link

vercel bot commented Mar 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2024 5:06am

@@ -602,6 +604,7 @@ def completion(
"cache",
"no-log",
"base_model",
"text_completion",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why text_completion ?

The health check does honor mode: completion already when set as below:

model_list:
 - model_name: starcoder2-3b
    litellm_params:
      api_base: https://vllm.example.com/v1
      api_key: "os.environ/API_KEY"
      model: openai/starcoder2-3b
      stream_timeout: 5
    model_info:
      mode: completion

Copy link
Contributor

Choose a reason for hiding this comment

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

I tested with text_completion: true:

    litellm_params:
      model: openai/mistral-7b-instruct
      api_base: https://api.siemens.com/llm/v1
      api_key: "os.environ/API_KEY"
      stream_timeout: 5
      text_completion: true

still the same

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.

2 participants