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

Đang mở
#11 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, ollama
Lĩnh vực
api, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
JavaScript
Star
629
Fork
31
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ServiceStack/llms

Tất cả issue của ServiceStack/llms

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.