ollama: attaching a file does not work/results in error 500/400 Bad request

Aperta
#11 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, ollama
Ambito
api, backend

Direzione di ricerca

Start with the OllamaProvider path used by the --serve web UI and inspect the POST request to /v1/chat/completions shown in the logs. Reproduce with a text, shell, or Python attachment and compare the file content payload with Ollama's accepted format. Done means the attached document is summarized without the provider returning HTTP 400 or the server returning HTTP 500.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Steps to reproduce:

  • llms --serve 8080 --verbose, access web UI
  • select ollama provider (tested with multiple models)
  • attach a file (tested with multiple text files/shell/python scripts) with a promt su chas Please summarize this document and submit the query
  • the web UI displays an error and not response is returned
HTTP 500 Internal Server Error
{
  "error": "HTTP 400 Bad Request"
}

Logs:

provider: ollama OllamaProvider
POST http://localhost:11434/v1/chat/completions
{
  "model": "deepseek-r1:14b",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "file",
          "file": {
            "filename": "test.xml",
            "file_data": "data:text/xml;base64,(1325)"
          }
        },
        {
          "type": "text",
          "text": "Summarize the file\n\n[\ud83d\udcce test.xml]"
        }
      ]
    }
  ],
  "enable_thinking": true,
  "metadata": {
    "threadId": "1765739448549"
  },
  "stream": false
}
Provider ollama failed: HTTP 400 Bad Request
Lingua principale
JavaScript
Stelle
629
Fork
31
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ServiceStack/llms

Tutte le issue di ServiceStack/llms

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.