Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[bot] Add Outlines integration for structured-generation execution instrumentation (648,297 weekly downloads)

未關閉
#598 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
python

研究方向

從 py/src/braintrust/integrations/instructor/ 開始,檢查周圍的整合與 wrapper 模式,然後查看 py/src/braintrust/wrappers/、py/pyproject.toml 和 py/noxfile.py。當 Outlines 呼叫或 generate 的執行、受支援的串流、輸出型別以及 backend/model 身分都完成 instrument,且該整合已在矩陣和 nox session 中呈現時,工作就完成了。

由索引模型根據 Issue 內容生成。

描述

bot-automation new-integration

Summary

outlines (dottxt-ai) is a widely used structured-generation library: it wraps a model object and constrains decoding so the output matches a requested type (JSON schema, Pydantic model, regex, CFG, Literal, function signature, etc.) via model(prompt, output_type). It supports many backends (OpenAI, Ollama, vLLM, transformers, llama.cpp) and is actively released (latest 1.3.2, July 20, 2026; PyPI: https://pypi.org/project/outlines/). This repository has zero instrumentation for it — no integration directory, no wrapper, no nox session, no matrix entry.

This is a distinct execution surface from the instructor package this repo already instruments (py/src/braintrust/integrations/instructor/): Instructor layers structured output on top of a provider client (e.g. instructor.from_openai(...)), whereas Outlines is itself the model-calling layer and controls token-level decoding directly against local/self-hosted backends (transformers, vLLM, llama.cpp) in addition to hosted APIs — a meaningfully different, provider-agnostic generation call site that Instructor-style patching does not cover.

What needs to be instrumented

  • Model.__call__(prompt, output_type, **kwargs) (or generate(...) in the current API) — the core structured-generation execution entrypoint; should log the prompt, the requested output type/schema, and the returned (parsed) value.
  • Streaming variants (model.stream(...)) where supported by the backend.
  • The output_type used (JSON schema / Pydantic model / regex / CFG / Literal) is worth capturing in span metadata since it materially changes what "correct" output means for eval purposes.
  • Backend/model identification (which underlying model class — outlines.models.openai, outlines.models.transformers, outlines.models.vllm, etc. — is in use) so spans carry accurate provider/model metadata.

Braintrust docs status

not_found — https://www.braintrust.dev/docs/guides/tracing/integrations lists tracing integrations (OpenTelemetry, Temporal, Vercel AI SDK, OpenRouter SDK, LangChain, LangSmith, LlamaIndex, Agno, Apollo GraphQL, Cloudflare Workers AI, DSPy, Instructor, LiteLLM, Ruby LLM, Traceloop, TrueFoundry) and agent frameworks — Outlines is not present in either list.

Upstream sources

Local repo files inspected

  • py/src/braintrust/integrations/ — no outlines/ directory (only instructor/, a distinct package/surface)
  • py/src/braintrust/wrappers/ — no Outlines wrapper
  • py/pyproject.toml [tool.braintrust.matrix] — no outlines entry
  • py/noxfile.py — no test_outlines session
  • Repo-wide case-insensitive grep for outlines under py/ — zero matches
主要語言
Python
星號
22
分支
27
平均合併
14 小時 49 分鐘
30 天內合併 PR
126

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

braintrustdata/braintrust-sdk-python 的其他 Issue

查看 braintrustdata/braintrust-sdk-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。