Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

RULER + Litellm with Ollama: `ollama_chat` recommended, but `/api/chat` cannot generate required JSON schema

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

Maintainer thường phản hồi trong vòng 3 ngày

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
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
ollama, python
Lĩnh vực
ai

Hướng nghiên cứu

Không có tệp, bài kiểm thử hoặc điểm vào nào được nêu. Hãy xác định cấu hình judge LiteLLM/Ollama của RULER và tái hiện lỗi xác thực schema với ollama_chat; hoàn thành có nghĩa là либо cấu hình được hỗ trợ cùng các giới hạn của nó được ghi lại, либо hỗ trợ structured output hoạt động cho /api/chat.

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

Mô tả

bug

Description

When configuring Ollama via Litellm, the Litellm docs recommend using:

ollama_chat for better responses

This uses Ollama’s /api/chat endpoint.

However, in ART’s RULER integration, the judge model needs to:

  • Produce JSON-structured outputs (e.g. match a Pydantic schema / tool schema) so RULER can parse correctness, reasoning, etc.

The problem:

  • With Ollama’s /api/chat (via ollama_chat), the responses are not reliably:

    • Valid JSON matching the expected schema, or
    • Tool-call-compatible in the way RULER expects.
  • As a result:

    • The judge’s responses often fail schema validation.
    • RULER cannot extract the required fields, and the scoring fails.

Because of that, I’m forced to fall back to the older /api/generate endpoint (ollama), even though:

  • Litellm explicitly recommends ollama_chat over ollama.
  • /api/chat is the more modern endpoint.

What I expect

  • Either:

    • Official support / documentation for using Ollama’s /api/chat (ollama_chat) as a RULER judge with JSON-schema / tool-call style responses; or
    • Clear guidance that for RULER’s JSON-schema needs, we must currently use /api/generate and ollama.

What actually happens

  • Using ollama_chat:

    • The /api/chat endpoint does not produce the JSON / tool-call schema RULER expects.
    • Judge calls fail schema validation.
  • Using ollama:

    • RULER works better, but we lose out on the newer /api/chat behavior Litellm recommends.

Request

  • Please:

    • Document the supported Ollama configuration for RULER (which engine, which endpoint, any special settings).

    • If possible, add direct support for ollama_chat + /api/chat that:

      • Ensures JSON-mode / tool-call style output works with RULER’s structured response expectations.
    • Or provide example configs + templates that make Ollama’s /api/chat usable with RULER.

Ngôn ngữ chính
Python
Star
10.8k
Fork
989
Merge trung bình
11 giờ 38 phút
Pull request đã merge (30 ngày)
104

Chuẩn bị môi trường

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 OpenPipe/ART

Tất cả issue của OpenPipe/ART

Issue tương tự

Thêm issue về Python

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.