Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Completion returns either a 404 or 500 server error #3642

Closed
jkirkcaldy opened this issue Jul 5, 2024 · 0 comments
Closed

Completion returns either a 404 or 500 server error #3642

jkirkcaldy opened this issue Jul 5, 2024 · 0 comments

Comments

@jkirkcaldy
Copy link

Bug Report

Description

Bug Summary:
When using Complete with VSCode, using the apiBase as "https://< url >/ollama/v1" returns an error 404 in the open-webui logs

using "https://< url >/ollama/v1/chat" gives a 500 server error.

Chat functions in Continue work fine, it's just the completions that give the error.

Steps to Reproduce:
Follow the quick setup guide to install and set up continue in vscode.

Environment

  • Open WebUI Version: 0.3.7
  • Ollama (if applicable): latest
  File "/app/backend/main.py", line 523, in dispatch
    prompt = get_last_user_message(data["messages"])
                                   ~~~~^^^^^^^^^^^^
KeyError: 'messages'
INFO:     :0 - "POST /ollama/v1/chat/completions HTTP/1.1" 500 Internal Server Error

vscode config:

{
  "models": [
    {
      "title": "Deepseek-Coder",
      "model": "deepseek-coder:latest",
      "apiBase": "https://ollama<url>/ollama/v1",
      "apiKey": "sk-<key>",
      "provider": "openai"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Deepseek-Coder",
    "model": "deepseek-coder:latest",
    "apiBase": "https://ollama.<url>/ollama/v1",
    "apiKey": "sk-<key>",
    "provider": "openai"
  }
}
@open-webui open-webui locked and limited conversation to collaborators Jul 5, 2024
@tjbck tjbck converted this issue into discussion #3645 Jul 5, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant