<p align="center">
    <img alt="OpenInference" src="https://raw.githubusercontent.com/Arize-ai/phoenix-assets/main/logos/OpenInference/Full%20color/OI-full-horiz.svg" width="40%" height="100%" />
</p>
<p align="center">
    <a href="../../README.md">🇺🇸 English</a> • <b>🇨🇳 中文</b> • <a href="README.zh-TW.md">🇹🇼 繁體中文</a> • <a href="README.ja.md">🇯🇵 日本語</a> • <a href="README.pt-PT.md">🇵🇹 Português</a> • <a href="README.pt-BR.md">🇧🇷 Português</a> • <a href="README.ko.md">🇰🇷 한국어</a> • <a href="README.es.md">🇪🇸 Español</a> • <a href="README.de.md">🇩🇪 Deutsch</a> • <a href="README.fr.md">🇫🇷 Français</a> • <a href="README.he.md">🇮🇱 עברית</a> • <a href="README.ar.md">🇸🇦 العربية</a> • <a href="README.ru.md">🇷🇺 Русский</a> • <a href="README.pl.md">🇵🇱 Polski</a> • <a href="README.cs.md">🇨🇿 Čeština</a> • <a href="README.nl.md">🇳🇱 Nederlands</a> • <a href="README.tr.md">🇹🇷 Türkçe</a> • <a href="README.uk.md">🇺🇦 Українська</a> • <a href="README.vi.md">🇻🇳 Tiếng Việt</a> • <a href="README.tl.md">🇵🇭 Tagalog</a> • <a href="README.id.md">🇮🇩 Indonesia</a> • <a href="README.th.md">🇹🇭 ไทย</a> • <a href="README.hi.md">🇮🇳 हिन्दी</a> • <a href="README.bn.md">🇧🇩 বাংলা</a> • <a href="README.ur.md">🇵🇰 اردو</a> • <a href="README.ro.md">🇷🇴 Română</a> • <a href="README.sv.md">🇸🇪 Svenska</a> • <a href="README.it.md">🇮🇹 Italiano</a> • <a href="README.el.md">🇬🇷 Ελληνικά</a> • <a href="README.hu.md">🇭🇺 Magyar</a> • <a href="README.fi.md">🇫🇮 Suomi</a> • <a href="README.da.md">🇩🇰 Dansk</a> • <a href="README.no.md">🇳🇴 Norsk</a>
</p>
<p align="center">
    <a href="https://arize-ai.github.io/openinference/spec/">
        <img src="https://img.shields.io/static/v1?message=Spec&logo=data:image/png;base64,iVBORw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IoHoJSYe4dIK/t4HX1ULFEACkPCm8e8wXFJvZ6y1EWhJkDcWxw7RINzLc74auGrgg8e4oIm9Sh/CA7LwkvHqaIJ9pLI6Lmy1BigDy2EV8tjdzh+8XB6MGSLKH4INsZXDJ8MGhIBK+Mrpo+GnRIBO+MrZjFAFxoTNBwCvj6u4qvSZJiM3iNX4yvmHoA9Sh4PF0QAzBEBMEcEwBwRAHNEAMwRATBGKfUfr5hKvglRfO4AAAAASUVORK5CYII=&labelColor=grey&color=blue&logoColor=white&label=%20"/>
    </a>
    <a target="_blank" href="https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q">
        <img src="https://img.shields.io/static/v1?message=Community&logo=slack&labelColor=grey&color=blue&logoColor=white&label=%20"/>
    </a>
</p>

OpenInference 是一套与 [OpenTelemetry](https://opentelemetry.io/) 互补的约定和插件，
用于实现 AI 应用的链路追踪。OpenInference 已获得
[Arize Phoenix](https://github.com/Arize-ai/phoenix) 和 [Arize AX](https://arize.com/products/ax?utm_source=docs&utm_medium=web&utm_content=openinference) 的原生支持，同时也可以与任何兼容 OpenTelemetry 的后端
配合使用。

## 规范

OpenInference 规范以 Markdown 文件形式编写，位于 [spec 目录](../../spec/) 中。它旨在
提供对 LLM 调用及其周边应用上下文的洞察，例如从向量数据库中进行检索，
以及调用搜索引擎或 API 等外部工具。该规范与传输协议和文件格式无关，
旨在与 JSON、ProtoBuf 和 DataFrames 等其他规范结合使用。

## 插桩

OpenInference 为多种编程语言中的主流机器学习 SDK 和框架提供了一系列
插桩库。

## Python

### 库

| 软件包                                                                                                                       | 描述                                                                      | 版本                                                                                                                                                                            |
|-------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`openinference-semantic-conventions`](../../python/openinference-semantic-conventions)                                           | 用于 LLM 应用链路追踪的语义约定。                                    | [![PyPI Version](https://img.shields.io/pypi/v/openinference-semantic-conventions.svg)](https://pypi.python.org/pypi/openinference-semantic-conventions)                           |
| [`openinference-instrumentation`](../../python/openinference-instrumentation)                                                     | 可复用的插桩工具函数、装饰器、配置与辅助工具。 | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation.svg)](https://pypi.python.org/pypi/openinference-instrumentation)                                     |
| [`openinference-instrumentation-agno`](../../python/instrumentation/openinference-instrumentation-agno)                           | 适用于 Agno Agents 的 OpenInference 插桩。                                   | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-agno.svg)](https://pypi.python.org/pypi/openinference-instrumentation-agno)                           |
| [`openinference-instrumentation-ag2`](../../python/instrumentation/openinference-instrumentation-ag2)                             | 适用于 AG2 的 OpenInference 插桩。                                           | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-ag2.svg)](https://pypi.python.org/pypi/openinference-instrumentation-ag2)                             |
| [`openinference-instrumentation-openai`](../../python/instrumentation/openinference-instrumentation-openai)                       | 适用于 OpenAI SDK 的 OpenInference 插桩。                                    | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-openai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-openai)                       |
| [`openinference-instrumentation-openai-agents`](../../python/instrumentation/openinference-instrumentation-openai-agents)         | 适用于 OpenAI Agents SDK 的 OpenInference 插桩。                             | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-openai-agents.svg)](https://pypi.python.org/pypi/openinference-instrumentation-openai-agents)         |
| [`openinference-instrumentation-claude-agent-sdk`](../../python/instrumentation/openinference-instrumentation-claude-agent-sdk)   | 适用于 Claude Agent SDK 的 OpenInference 插桩。                             | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-claude-agent-sdk.svg)](https://pypi.python.org/pypi/openinference-instrumentation-claude-agent-sdk)         |
| [`openinference-instrumentation-llama-index`](../../python/instrumentation/openinference-instrumentation-llama-index)             | 适用于 LlamaIndex 的 OpenInference 插桩。                                    | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-llama-index.svg)](https://pypi.python.org/pypi/openinference-instrumentation-llama-index)             |
| [`openinference-instrumentation-dspy`](../../python/instrumentation/openinference-instrumentation-dspy)                           | 适用于 DSPy 的 OpenInference 插桩。                                          | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-dspy.svg)](https://pypi.python.org/pypi/openinference-instrumentation-dspy)                           |
| [`openinference-instrumentation-bedrock`](../../python/instrumentation/openinference-instrumentation-bedrock)                     | 适用于 AWS Bedrock 的 OpenInference 插桩。                                   | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-bedrock.svg)](https://pypi.python.org/pypi/openinference-instrumentation-bedrock)                     |
| [`openinference-instrumentation-langchain`](../../python/instrumentation/openinference-instrumentation-langchain)                 | 适用于 LangChain 的 OpenInference 插桩。                                     | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-langchain.svg)](https://pypi.python.org/pypi/openinference-instrumentation-langchain)                 |
| [`openinference-instrumentation-mcp`](../../python/instrumentation/openinference-instrumentation-mcp)                             | 适用于 MCP 的 OpenInference 插桩。                                           | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-mcp.svg)](https://pypi.python.org/pypi/openinference-instrumentation-mcp)                             |
| [`openinference-instrumentation-mistralai`](../../python/instrumentation/openinference-instrumentation-mistralai)                 | 适用于 MistralAI 的 OpenInference 插桩。                                     | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-mistralai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-mistralai)                 |
| [`openinference-instrumentation-portkey`](../../python/instrumentation/openinference-instrumentation-portkey)                     | 适用于 Portkey 的 OpenInference 插桩。                                       | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-portkey.svg)](https://pypi.python.org/pypi/openinference-instrumentation-portkey)                     |
| [`openinference-instrumentation-guardrails`](../../python/instrumentation/openinference-instrumentation-guardrails)               | 适用于 Guardrails 的 OpenInference 插桩。                                    | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-guardrails.svg)](https://pypi.python.org/pypi/openinference-instrumentation-guardrails)               |
| [`openinference-instrumentation-vertexai`](../../python/instrumentation/openinference-instrumentation-vertexai)                   | 适用于 VertexAI 的 OpenInference 插桩。                                      | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-vertexai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-vertexai)                   |
| [`openinference-instrumentation-crewai`](../../python/instrumentation/openinference-instrumentation-crewai)                       | 适用于 CrewAI 的 OpenInference 插桩。                                        | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-crewai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-crewai)                       |
| [`openinference-instrumentation-haystack`](../../python/instrumentation/openinference-instrumentation-haystack)                   | 适用于 Haystack 的 OpenInference 插桩。                                      | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-haystack.svg)](https://pypi.python.org/pypi/openinference-instrumentation-haystack)                   |
| [`openinference-instrumentation-litellm`](../../python/instrumentation/openinference-instrumentation-litellm)                     | 适用于 liteLLM 的 OpenInference 插桩。                                       | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-litellm.svg)](https://pypi.python.org/pypi/openinference-instrumentation-litellm)                     |
| [`openinference-instrumentation-groq`](../../python/instrumentation/openinference-instrumentation-groq)                           | 适用于 Groq 的 OpenInference 插桩。                                          | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-groq.svg)](https://pypi.python.org/pypi/openinference-instrumentation-groq)                           |
| [`openinference-instrumentation-instructor`](../../python/instrumentation/openinference-instrumentation-instructor)               | 适用于 Instructor 的 OpenInference 插桩。                                    | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-instructor.svg)](https://pypi.python.org/pypi/openinference-instrumentation-instructor)               |
| [`openinference-instrumentation-anthropic`](../../python/instrumentation/openinference-instrumentation-anthropic)                 | 适用于 Anthropic 的 OpenInference 插桩。                                     | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-anthropic.svg)](https://pypi.python.org/pypi/openinference-instrumentation-anthropic)                 |
| [`openinference-instrumentation-beeai`](../../python/instrumentation/openinference-instrumentation-beeai)                         | 适用于 BeeAI 的 OpenInference 插桩。                                         | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-beeai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-beeai)                         |
| [`openinference-instrumentation-google-genai`](../../python/instrumentation/openinference-instrumentation-google-genai)           | 适用于 Google GenAI 的 OpenInference 插桩。                                  | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-google-genai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-google-genai)           |
| [`openinference-instrumentation-google-adk`](../../python/instrumentation/openinference-instrumentation-google-adk)               | 适用于 Google ADK 的 OpenInference 插桩。                                    | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-google-adk.svg)](https://pypi.python.org/pypi/openinference-instrumentation-google-adk)               |
| [`openinference-instrumentation-autogen-agentchat`](../../python/instrumentation/openinference-instrumentation-autogen-agentchat) | 适用于 Microsoft Autogen AgentChat 的 OpenInference 插桩。                   | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-autogen-agentchat.svg)](https://pypi.python.org/pypi/openinference-instrumentation-autogen-agentchat) |
| [`openinference-instrumentation-pydantic-ai`](../../python/instrumentation/openinference-instrumentation-pydantic-ai)             | 适用于 PydanticAI 的 OpenInference 插桩。                                    | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-pydantic-ai.svg)](https://pypi.python.org/pypi/openinference-instrumentation-pydantic-ai)             |
| [`openinference-instrumentation-smolagents`](../../python/instrumentation/openinference-instrumentation-smolagents)               | 适用于 smolagents 的 OpenInference 插桩。                                    | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-smolagents.svg)](https://pypi.python.org/pypi/openinference-instrumentation-smolagents)               |
| [`openinference-instrumentation-pipecat`](../../python/instrumentation/openinference-instrumentation-pipecat)                     | 适用于 Pipecat 的 OpenInference 插桩。                                       | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-pipecat.svg)](https://pypi.python.org/pypi/openinference-instrumentation-pipecat)                     |
| [`openinference-instrumentation-agentspec`](../../python/instrumentation/openinference-instrumentation-agentspec)                 | 适用于 Open Agent Specification 的 OpenInference 插桩。                      | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-agentspec.svg)](https://pypi.python.org/pypi/openinference-instrumentation-agentspec)                 |
| [`openinference-instrumentation-strands-agents`](../../python/instrumentation/openinference-instrumentation-strands-agents)       | 适用于 Strands Agents 的 OpenInference 插桩。                                | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-strands-agents.svg)](https://pypi.python.org/pypi/openinference-instrumentation-strands-agents)       |
| [`openinference-instrumentation-together`](../../python/instrumentation/openinference-instrumentation-together)                   | 适用于 Together AI 的 OpenInference 插桩。                                   | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-together.svg)](https://pypi.python.org/pypi/openinference-instrumentation-together)                   |
| [`openinference-instrumentation-typesafe`](../../python/instrumentation/openinference-instrumentation-typesafe)                   | 适用于 TypeSafe AI 的 OpenInference 插桩。                                   | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-typesafe.svg)](https://pypi.python.org/pypi/openinference-instrumentation-typesafe)                   |
| [`openinference-instrumentation-ollama`](../../python/instrumentation/openinference-instrumentation-ollama)                       | 适用于 Ollama 的 OpenInference 插桩。                                        | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-ollama.svg)](https://pypi.python.org/pypi/openinference-instrumentation-ollama)                       |
| [`openinference-instrumentation-cohere`](../../python/instrumentation/openinference-instrumentation-cohere)                       | 适用于 Cohere 的 OpenInference 插桩。                                        | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-cohere.svg)](https://pypi.python.org/pypi/openinference-instrumentation-cohere)                       |

## Span 处理器

通过添加用于统一数据的 Span 处理器，对来自其他插桩库的数据进行规范化和转换。

| 软件包                                                                                                           | 描述                                                      | 版本                                                                                                                                                                |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`openinference-instrumentation-openlit`](../../python/instrumentation/openinference-instrumentation-openlit)         | 适用于 OpenLIT 链路追踪数据的 OpenInference Span 处理器。                 | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-openlit.svg)](https://pypi.python.org/pypi/openinference-instrumentation-openlit)         |
| [`openinference-instrumentation-openllmetry`](../../python/instrumentation/openinference-instrumentation-openllmetry) | 适用于 OpenLLMetry (Traceloop) 链路追踪数据的 OpenInference Span 处理器。 | [![PyPI Version](https://img.shields.io/pypi/v/openinference-instrumentation-openllmetry.svg)](https://pypi.python.org/pypi/openinference-instrumentation-openllmetry) |

### 示例

| 名称                                                                                                  | 描述                                                                                  | 难度 |
| ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ---------------- |
| [Agno](../../python/instrumentation/openinference-instrumentation-agno/examples/)                           | Agno 智能体示例                                                                          | 入门         |
| [OpenAI SDK](../../python/instrumentation/openinference-instrumentation-openai/examples/)                   | OpenAI Python SDK，包括聊天补全与嵌入                                 | 入门         |
| [Claude Agent SDK](../../python/instrumentation/openinference-instrumentation-claude-agent-sdk/examples/)   | Claude Agent SDK                                                                             | 入门         |
| [MistralAI SDK](../../python/instrumentation/openinference-instrumentation-mistralai/examples/)             | MistralAI Python SDK                                                                         | 入门         |
| [VertexAI SDK](../../python/instrumentation/openinference-instrumentation-vertexai/examples/)               | VertexAI Python SDK                                                                          | 入门         |
| [LlamaIndex](../../python/instrumentation/openinference-instrumentation-llama-index/examples/)              | LlamaIndex 查询引擎                                                                     | 入门         |
| [DSPy](../../python/instrumentation/openinference-instrumentation-dspy/examples/)                           | DSPy 基础组件与自定义 RAG 模块                                                       | 入门         |
| [Boto3 Bedrock Client](../../python/instrumentation/openinference-instrumentation-bedrock/examples/)        | Boto3 Bedrock 客户端                                                                         | 入门         |
| [LangChain](../../python/instrumentation/openinference-instrumentation-langchain/examples/)                 | LangChain 基础组件与简单 Chain                                                       | 入门         |
| [LiteLLM](../../python/instrumentation/openinference-instrumentation-litellm/)                              | 轻量级 LiteLLM 框架                                                              | 入门         |
| [LiteLLM Proxy](../../python/instrumentation/openinference-instrumentation-litellm/examples/litellm-proxy/) | 使用 LiteLLM Proxy 记录 OpenAI、Azure、Vertex、Bedrock 调用                                          | 入门         |
| [Groq](../../python/instrumentation/openinference-instrumentation-groq/examples/)                           | Groq 与 AsyncGroq 聊天补全                                                          | 入门         |
| [Together AI](../../python/instrumentation/openinference-instrumentation-together/examples/)                | Together 与 AsyncTogether 聊天补全、流式输出与工具调用                       | 入门         |
| [TypeSafe AI](../../python/instrumentation/openinference-instrumentation-typesafe/examples/)                | TypeSafeClient 与 AsyncTypeSafeClient 的 System One 调用（Noul、Choice、Score）                | 入门         |
| [Anthropic](../../python/instrumentation/openinference-instrumentation-anthropic/examples/)                 | Anthropic Messages 客户端                                                                    | 入门         |
| [BeeAI](../../python/instrumentation/openinference-instrumentation-beeai/examples/)                         | BeeAI 框架中的智能体插桩                                               | 入门         |
| [Haystack](../../python/instrumentation/openinference-instrumentation-haystack/examples/)                   | Haystack 问答 RAG 应用                                                                | 进阶     |
| [OpenAI Agents](../../python/instrumentation/openinference-instrumentation-openai-agents/examples/)         | 支持交接（handoff）的 OpenAI Agents                                                                  | 进阶     |
| [Autogen AgentChat](../../python/instrumentation/openinference-instrumentation-autogen-agentchat/examples/) | Microsoft Autogen Assistant Agent 与 Team Chat                                              | 进阶     |
| [AG2](../../python/instrumentation/openinference-instrumentation-ag2/examples/)                             | AG2 工具调用、群聊与顺序对话                                          | 进阶     |
| [PydanticAI](../../python/instrumentation/openinference-instrumentation-pydantic-ai/examples/)              | PydanticAI 智能体示例                                                                    | 进阶     |
| [Pipecat](../../python/instrumentation/openinference-instrumentation-pipecat/examples/)                     | Pipecat 应用示例                                                                 | 进阶     |
| [Ollama](../../python/instrumentation/openinference-instrumentation-ollama/examples/)                       | Ollama 聊天、流式输出与工具调用                                                       | 入门         |
| [Cohere](../../python/instrumentation/openinference-instrumentation-cohere/examples/)                       | Cohere ClientV2 聊天补全                                                             | 入门         |

## JavaScript

 <a href="https://arize-ai.github.io/openinference/js/">
        <img src="https://img.shields.io/static/v1?message=JavaScript%20Documentation&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAG4ElEQVR4nO2d4XHjNhCFcTf+b3ZgdWCmgmMqOKUC0xXYrsBOBVEqsFRB7ApCVRCygrMriFQBM7h5mNlwKBECARLg7jeDscamSQj7sFgsQfBL27ZK4MtXsT1vRADMEQEwRwTAHBEAc0QAzBEBMEcEwBwRAHNEAMwRATBnjAByFGE+MqVUMcYOY24GVUqpb/h8VErVKAf87QNFcEcbd4WSw+D6803njHscO5sATmGEURGBiCj6yUlv1uX2gv91FsDViArbcA2RUKF8QhAV8RQc0b15DcOt0VaTE1oAfWj3dYdCBfGGsmSM0XX5HsP3nEMAXbqCeCdiOERQPx9og5exGJ0S4zRQN9KrUupfpdQWjZciure/YIj7K0bjqwTyAHdovA805iqCOg2xgnB1nZ97IvaoSCURdIPG/IHGjTH/YAz/A8KdJai7lBQzgbpx/0Hg6DT18UzWMXxSjMkDrElPNEmKfAbl6znwI3IMU/OCa0/1nfckwWaSbvWYYDnEsvCMJDNckhqu7GCMKWYOBXp9yPGd5kvqUAKf6rkAk7M2SY9QDXdEr9wEOr9x96EiejMFnixBNteDISsyNw7hHRqc22evWcP4vt39O85bzZH30AKg4+eo8cQRI4bHAJ7hyYM3CNHrG9RrimSXuZmUkZjN/O6nAPpcwCcJNmipAle2QM/1GU3vITCXhvY91u9geN/jOY27VuTnYL1PCeAcRhwh7/Bl8Ai+IuxPiOCShtfX/sPDtY8w+sZjby86dw6dBeoigD7obd/Ko6fI4BF8DA9HnGdrcU0fLt+n4dfE6H5jpjYcVdu2L23b5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gl0z2qx5B8OPCuB8EIMADBlEEOV79j1whNE3c/X2PmISAGUNr7CEmUSUhjfEKgBDAY+QohCiNrwhdgEYzPv7UxkadvBg0RrekMrNoAozh3vLN4DPhc7S/WL52vkoSO1u4BZC+DOCulC0KJ/gqWaP7C8hlSGgjxyCmDuPsEePT/KuasrrAcyr4H+f6fq01yd7Sz1lD0CZ2hs06PVJufs+lrIiyLwufjfBtXYpjvWnWIoHoJSYe4dIK/t4HX1ULFEACkPCm8e8wXFJvZ6y1EWhJkDcWxw7RINzLc74auGrgg8e4oIm9Sh/CA7LwkvHqaIJ9pLI6Lmy1BigDy2EV8tjdzh+8XB6MGSLKH4INsZXDJ8MGhIBK+Mrpo+GnRIBO+MrZjFAFxoTNBwCvj6u4qvSZJiM3iNX4yvmHoA9Sh4PF0QAzBEBMEcEwBwRAHNEAMwRATBGKfUfr5hKvglRfO4AAAAASUVORK5CYII=&labelColor=grey&color=blue&logoColor=white&label=%20"/>
    </a>

### 库

| 软件包                                                                                                                             | 描述                                                         | 版本                                                                                                                                                                                                 |
| ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@arizeai/openinference-semantic-conventions`](../../js/packages/openinference-semantic-conventions)                                   | 用于 LLM 应用链路追踪的语义约定。                       | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-semantic-conventions.svg)](https://www.npmjs.com/package/@arizeai/openinference-semantic-conventions)                               |
| [`@arizeai/openinference-core`](../../js/packages/openinference-core)                                                                   | 可复用的插桩工具函数、配置与辅助工具。 | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-core.svg)](https://www.npmjs.com/package/@arizeai/openinference-core)                                                               |
| [`@arizeai/openinference-instrumentation-bedrock`](../../js/packages/openinference-instrumentation-bedrock)                             | 适用于 AWS Bedrock 的 OpenInference 插桩。                      | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-bedrock)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-bedrock)                             |
| [`@arizeai/openinference-instrumentation-bedrock-agent-runtime`](../../js/packages/openinference-instrumentation-bedrock-agent-runtime) | 适用于 AWS Bedrock Agent Runtime 的 OpenInference 插桩。        | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-bedrock-agent-runtime)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-bedrock-agent-runtime) |
| [`@arizeai/openinference-instrumentation-beeai`](../../js/packages/openinference-instrumentation-beeai)                                 | 适用于 BeeAI 的 OpenInference 插桩。                            | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-beeai)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-beeai)                                 |
| [`@arizeai/openinference-instrumentation-langchain`](../../js/packages/openinference-instrumentation-langchain)                         | 适用于 LangChain.js 的 OpenInference 插桩。                     | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-langchain)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-langchain)                         |
| [`@arizeai/openinference-instrumentation-mcp`](../../js/packages/openinference-instrumentation-mcp)                                     | 适用于 MCP 的 OpenInference 插桩。                              | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-mcp)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-mcp)                                     |
| [`@arizeai/openinference-instrumentation-openai`](../../js/packages/openinference-instrumentation-openai)                               | 适用于 OpenAI SDK 的 OpenInference 插桩。                       | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-openai)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-openai)                               |
| [`@arizeai/openinference-instrumentation-anthropic`](../../js/packages/openinference-instrumentation-anthropic)                         | 适用于 Anthropic SDK 的 OpenInference 插桩。                | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-anthropic)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-anthropic)                         |
| [`@arizeai/openinference-instrumentation-claude-agent-sdk`](../../js/packages/openinference-instrumentation-claude-agent-sdk)           | 适用于 Claude Agent SDK 的 OpenInference 插桩。                 | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-claude-agent-sdk)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-claude-agent-sdk)           |
| [`@arizeai/openinference-vercel`](../../js/packages/openinference-vercel)                                                               | OpenInference 对 Vercel AI SDK 的支持。                            | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-vercel)](https://www.npmjs.com/package/@arizeai/openinference-vercel)                                                               |
| [`@arizeai/openinference-tanstack-ai`](../../js/packages/openinference-tanstack-ai)                                                     | 适用于 TanStack AI 的 OpenInference 中间件。                           | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-tanstack-ai)](https://www.npmjs.com/package/@arizeai/openinference-tanstack-ai)                                                     |
| [`@arizeai/openinference-genai`](../../js/packages/openinference-genai)                                                                 | OpenInference 对 GenAI 约定的支持                         | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-genai)](https://www.npmjs.com/package/@arizeai/openinference-genai)                                                                 |
| [`@arizeai/openinference-instrumentation-typesafe`](../../js/packages/openinference-instrumentation-typesafe) | 适用于 TypeSafe AI SDK 的 OpenInference 插桩。 | [![NPM Version](https://img.shields.io/npm/v/@arizeai/openinference-instrumentation-typesafe)](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-typesafe) |

### 示例

| 名称 | 描述 | 难度 |
| --- | --- | --- |
| [TypeSafe AI](../../js/packages/openinference-instrumentation-typesafe/examples/) | 分类、结构化问题，以及基于置信度阈值路由至 LLM | 入门 |

## Java

### 库

| 软件包                                                                                                         | 描述                                    | 版本                                                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`openinference-semantic-conventions`](../../java/openinference-semantic-conventions)                               | 用于 LLM 应用链路追踪的语义约定。  | [![Maven Central Version](https://img.shields.io/maven-central/v/com.arize/openinference-semantic-conventions)](https://central.sonatype.com/artifact/com.arize/openinference-semantic-conventions)               |
| [`openinference-instrumentation`](../../java/openinference-instrumentation)                                         | 基础插桩工具。                | [![Maven Central Version](https://img.shields.io/maven-central/v/com.arize/openinference-instrumentation)](https://central.sonatype.com/artifact/com.arize/openinference-instrumentation)                         |
| [`openinference-instrumentation-langchain4j`](../../java/instrumentation/openinference-instrumentation-langchain4j) | 适用于 LangChain4j 的 OpenInference 插桩。 | [![Maven Central Version](https://img.shields.io/maven-central/v/com.arize/openinference-instrumentation-langchain4j)](https://central.sonatype.com/artifact/com.arize/openinference-instrumentation-langchain4j) |
| [`openinference-instrumentation-springAI`](../../java/instrumentation/openinference-instrumentation-springAI)       | 适用于 Spring AI 的 OpenInference 插桩。   | [![Maven Central Version](https://img.shields.io/maven-central/v/com.arize/openinference-instrumentation-springAI)](https://central.sonatype.com/artifact/com.arize/openinference-instrumentation-springAI)       |
| [`openinference-instrumentation-annotation`](../../java/instrumentation/openinference-instrumentation-annotation) | 基于 ByteBuddy 的注解式手动链路追踪。 | [![Maven Central Version](https://img.shields.io/maven-central/v/com.arize/openinference-instrumentation-annotation)](https://central.sonatype.com/artifact/com.arize/openinference-instrumentation-annotation) |
| [`openinference-instrumentation-adk-java`](../../java/instrumentation/openinference-instrumentation-adk-java) | 适用于 Google ADK Java (`-javaagent`) 的 OpenInference 插桩。 | [![Maven Central Version](https://img.shields.io/maven-central/v/com.arize/openinference-instrumentation-adk-java)](https://central.sonatype.com/artifact/com.arize/openinference-instrumentation-adk-java) |

### 示例

| 名称                                                     | 描述                                    | 难度 |
| -------------------------------------------------------- | ---------------------------------------------- | ---------------- |
| [LangChain4j 示例](../../java/examples/langchain4j-example) | 结合 OpenAI 使用 LangChain4j 的简单示例   | 入门         |
| [Spring AI 示例](../../java/examples/spring-ai-example)     | 结合 OpenAI 与工具调用的 Spring AI 示例 | 入门         |
| [注解示例](../../java/examples/annotation-example) | 基于注解的链路追踪，使用 `@Chain`, `@LLM`, `@Tool`, `@Agent` | 入门         |
| [编程式示例](../../java/examples/programmatic-example) | 使用带类型的 Span 类进行手动链路追踪 (`LLMSpan`, `AgentSpan`, 等) | 入门         |
| [ADK Java 示例](../../java/examples/adk-java-example) | 带有函数工具的 Google ADK for Java 智能体，由 ADK `-javaagent` 追踪 | 入门         |

## Go

### 库

| 软件包 | 描述 | 版本 |
| --- | --- | --- |
| [`openinference-semantic-conventions`](../../go/openinference-semantic-conventions) | 用于 LLM 应用链路追踪的语义约定。 | `go get github.com/Arize-ai/openinference/go/openinference-semantic-conventions` |
| [`openinference-instrumentation`](../../go/openinference-instrumentation) | 追踪抑制、上下文属性传播以及 `TraceConfig` 脱敏。支持 `OPENINFERENCE_HIDE_*` 环境变量。 | `go get github.com/Arize-ai/openinference/go/openinference-instrumentation` |
| [`openinference-instrumentation-anthropic-sdk-go`](../../go/openinference-instrumentation-anthropic-sdk-go) | 适用于 Anthropic Go SDK (`anthropics/anthropic-sdk-go`) 的 OpenInference 插桩。 | `go get github.com/Arize-ai/openinference/go/openinference-instrumentation-anthropic-sdk-go` |
| [`openinference-instrumentation-openai-go`](../../go/openinference-instrumentation-openai-go) | 适用于官方 OpenAI Go SDK ([`openai/openai-go`](https://github.com/openai/openai-go)) 的 OpenInference 插桩。 | `go get github.com/Arize-ai/openinference/go/openinference-instrumentation-openai-go` |

需要 Go 1.25+。可搭配 [`arize-otel-go`](https://github.com/Arize-ai/arize-otel-go) 一行代码完成到 [Arize AX](https://arize.com/products/ax?utm_source=docs&utm_medium=web&utm_content=openinference) 的 OTLP/HTTP 配置，或接入任意 OTel 导出器（例如位于 `http://localhost:6006/v1/traces` 的 [Phoenix](https://github.com/Arize-ai/phoenix)）。

## 支持的目标端

OpenInference 支持以下目标端作为 Span 收集器。

- ✅ [Arize Phoenix](https://github.com/Arize-ai/phoenix)
- ✅ [Arize AX](https://arize.com/products/ax?utm_source=docs&utm_medium=web&utm_content=openinference)
- ✅ 任何兼容 OTEL 的收集器

## 社区与交流

加入我们的社区，与数千名机器学习从业者和 LLM 可观测性爱好者交流！

- 🌍 加入我们的 [Slack 社区](https://join.slack.com/t/arize-ai/shared_invite/zt-3lqwr2oc3-7rhdyYEh82zJL_UhPKrb0A)。
- 💡 在 _#phoenix-support_ 频道提问与反馈。
- 🌟 在 [GitHub](https://github.com/Arize-ai/openinference) 上为我们点亮 Star。
- 🐞 通过 [GitHub Issues](https://github.com/Arize-ai/openinference/issues) 报告缺陷。
- 𝕏 在 [X](https://twitter.com/ArizePhoenix) 上关注我们。
- 🗺️ 查看我们的 [路线图](https://github.com/orgs/Arize-ai/projects/45)，了解未来的发展方向。
