import{s as _t,n as $t,o as Nt}from"../chunks/scheduler.1f027d5a.js";import{S as At,i as qt,e as i,s as l,c as r,h as Pt,a as p,d as s,b as n,f as Ft,g as c,j as o,k as ce,q as ct,l as Ot,m as a,n as m,t as M,o as h,p as y}from"../chunks/index.6117a65d.js";import{C as Dt}from"../chunks/CopyLLMTxtMenu.0ff8411a.js";import{D as Kt,C as re}from"../chunks/DocNotebookDropdown.316c3715.js";import{H as he,E as es}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.0eecd2bb.js";function ts(mt){let u,ye,me,ge,U,ue,J,be,T,de,f,Mt='<em>作者：<a href="https://huggingface.co/andrewrreed" rel="nofollow">Andrew Reed</a></em>',je,v,ht='<a href="https://docs.arize.com/phoenix" rel="nofollow">Phoenix</a> 是由 <a href="https://arize.com/" rel="nofollow">Arize AI</a> 开发的开源观察性库，旨在进行实验、评估和故障排除。它允许 AI 工程师和数据科学家快速可视化他们的数据、评估性能、追踪问题，并导出数据以进行改进。',we,g,yt='<div style="width: 32%; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;"><img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/phoenix-tracing.png" style="width: 100%; height: 200px; object-fit: contain;"/> <p style="margin-top: 10px; margin-bottom: 0;">追踪</p></div> <div style="width: 32%; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;"><img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/phoenix-datasets.png" style="width: 100%; height: 200px; object-fit: contain;"/> <p style="margin-top: 10px; margin-bottom: 0;">数据集</p></div> <div style="width: 32%; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;"><img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/phoenix-experiments.png" style="width: 100%; height: 200px; object-fit: contain;"/> <p style="margin-top: 10px; margin-bottom: 0;">实验</p></div>',Ue,I,gt='在本 Notebook 中，我们将展示如何在 <a href="https://huggingface.co/spaces" rel="nofollow">Hugging Face Spaces</a> 上部署 Phoenix 观察性仪表板，并配置它以自动追踪 LLM 调用，从而全面了解 LLM 应用程序的内部工作原理。',Je,B,Te,Z,ut='虽然 Phoenix 提供了一个用于本地开发的 <a href="https://docs.arize.com/phoenix/deployment/environments#notebooks" rel="nofollow">Notebook 高级选项</a>，它也可以通过 <a href="https://docs.arize.com/phoenix/deployment/environments#container" rel="nofollow">Docker 作为独立仪表板部署</a>。长时间运行的托管仪表板是提供 LLM 应用行为集中视图的好方法，并且有助于团队协作。Hugging Face Spaces 提供了一种简单的方式来托管 ML 应用，并支持可选的持久存储，且它对自定义 Docker 镜像的支持使其成为托管 Phoenix 的理想平台——我们来看看它是如何工作的！',fe,C,bt='首先，我们将 <a href="https://huggingface.co/spaces/andrewrreed/phoenix-arize-observability-demo?duplicate=true" rel="nofollow">复制示例空间</a>',ve,k,dt='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/duplicate.png"/>',Ie,x,jt="我们可以将空间配置为私有或公开，并且它可以位于我们的用户命名空间或组织命名空间中。我们可以使用默认的免费 CPU 配置，并且重要的是，我们可以指定要为该空间附加一个持久磁盘。",Be,b,wt="<p>为了使追踪数据在 Space 重启后保持持久，我们 <em>必须</em> 配置持久磁盘，否则所有数据将在 Space 重启时丢失。配置持久磁盘是付费功能，并会产生 Space 存续期间的费用。在本例中，我们将使用小型 - 20GB 磁盘选项，每小时 $0.01。</p>",Ze,W,Ut="点击“复制空间”后，Docker 镜像将开始构建。这将需要几分钟时间完成，之后我们将看到一个空的 Phoenix 仪表板。",Ce,L,Jt='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/empty-dashboard.png"/>',ke,G,xe,S,Tt='现在我们已经有了一个运行中的 Phoenix 仪表板，可以使用 <a href="https://docs.arize.com/phoenix/quickstart#connect-your-app-to-phoenix" rel="nofollow">OpenTelemetry TracerProvider</a> 配置应用程序，以自动追踪 LLM 调用。在这个例子中，我们将使用 OpenAI 客户端库来给应用程序加上监控，并追踪从 <code>openai</code> Python 包发出的 LLM 调用，这些调用会被发送到 <a href="https://huggingface.co/docs/api-inference/en/index" rel="nofollow">Hugging Face 的 Serverless 推理 API</a> 上运行的 LLM。',We,d,ft='<p>Phoenix 支持对 <a href="https://docs.arize.com/phoenix/tracing/integrations-tracing" rel="nofollow">多种 LLM 框架</a> 进行追踪，包括 LangChain、LlamaIndex、AWS Bedrock 等。</p>',Le,R,vt="首先，我们需要安装必要的库：",Ge,H,Se,E,It="接下来，我们将使用 <code>huggingface_hub</code> 库登录到 Hugging Face。这将允许我们生成所需的身份验证，以便为我们的 Space 和 Serverless 推理 API 提供认证。请确保用于身份验证的 Hugging Face 令牌具有正确的权限，以便访问存放你 Space 的组织。",Re,X,He,Q,Bt='现在，我们可以将 <a href="https://docs.arize.com/phoenix/deployment/configuration#client-configuration" rel="nofollow">Phoenix 客户端配置</a> 为连接到我们运行中的 Phoenix 仪表板：',Ee,V,Zt="<li>注册 Phoenix 追踪提供者：<ul><li>指定我们选择的 <code>project_name</code></li> <li>将 <code>endpoint</code> 设置为我们 Space 的主机名（可以通过仪表板 UI 中的“设置”标签找到，如下图所示）</li> <li>将 <code>headers</code> 设置为访问 Space 所需的 Hugging Face 头信息</li></ul></li> <li>在我们的应用代码中，使用 OpenAI 追踪提供者进行监控</li>",Xe,Y,Ct='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/settings.png"/>',Qe,z,Ve,F,kt=`🔭 OpenTelemetry Tracing Details 🔭
|  Phoenix Project: test
|  Span Processor: SimpleSpanProcessor
|  Collector Endpoint: https://andrewrreed-phoenix-arize-observability-demo.hf.space/v1/traces
|  Transport: HTTP
|  Transport Headers: &#123;'user-agent': '****', 'authorization': '****'}
|  
|  Using a default SpanProcessor. \`add_span_processor\` will overwrite this default.
|  
|  \`register\` has set this TracerProvider as the global OpenTelemetry default.
|  To disable this behavior, call \`register\` with \`set_global_tracer_provider=False\`.
`,Ye,_,ze,$,xt="现在，我们可以调用 LLM 并在 Phoenix 仪表板中查看追踪。我们使用 OpenAI 客户端向 Hugging Face 的 Serverless 推理 API 发起调用，该 API 已经配置为与 Phoenix 配合工作。在这个例子中，我们使用的是 <code>meta-llama/Llama-3.1-8B-Instruct</code> 模型。",Fe,N,_e,A,Wt=`Llamas are intelligent and social animals, and they do have ways to entertain themselves and have fun. While we can't directly ask a llama about its personal preferences, we can observe their natural behaviors and make some educated guesses. Here are some things that might bring a llama joy and excitement:

1. **Socializing**: Llamas are herd animals and they love to interact with each other. They'll often engage in play-fighting, neck-wrestling, and other activities to establish dominance and strengthen social bonds. When llamas have a strong social network, it can make them feel happy and content.
2. **Exploring new environments**: Llamas are naturally curious creatures, and they love to explore new surroundings. They'll often investigate their surroundings, sniffing and investigating new sights, sounds, and smells.
3. **Playing with toys**: While llamas don't need expensive toys, they do enjoy playing with objects that stimulate their natural behaviors. For example, a ball or a toy that mimics a target can be an entertaining way to engage them.
4. **Climbing and jumping**: Llamas are agile and athletic animals, and they enjoy using their limbs to climb and jump over obstacles. Providing a safe and stable area for them to exercise their physical abilities can be a fun and engaging experience.
5. **Browsing and foraging**: Llamas have a natural instinct to graze and browse, and they enjoy searching for tasty plants and shrubs. Providing a variety of plants to munch on can keep them engaged and entertained.
6. **Mentally stimulating activities**: Llamas are intelligent animals, and they can benefit from mentally stimulating activities like problem-solving puzzles or learning new behaviors (like agility training or obedience training).

Some fun activities you can try with a llama include:

* Setting up an obstacle course or agility challenge
* Creating a "scavenger hunt" with treats and toys
* Introducing new toys or objects to stimulate their curiosity
* Providing a variety of plants and shrubs to browse and graze on
* Engaging in interactive games like "follow the leader" or "find the treat"

Remember to always prioritize the llama's safety and well-being, and to consult with a veterinarian or a trained llama handler before attempting any new activities or introducing new toys.
`,$e,q,Lt="如果我们返回到 Phoenix 仪表板，我们可以看到从 LLM 调用捕获并显示的追踪信息！如果你在配置 Space 时使用了持久磁盘，那么每次重启 Space 时，所有的追踪信息都会被保存。",Ne,P,Gt='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/test-trace.png"/>',Ae,O,qe,D,St='观察性的真正优势在于能够追踪和检查复杂的 LLM 工作流。在这个例子中，我们将安装并使用 <a href="https://www.crewai.com/" rel="nofollow">CrewAI</a> 来追踪一个多智能体应用程序。',Pe,j,Rt="<p><code>openinference-instrumentation-crewai</code> 包目前要求 Python 3.10 或更高版本。安装 <code>crewai</code> 库后，你可能需要重启 Notebook 内核以避免出现错误。</p>",Oe,K,De,ee,Ht="和之前一样，我们将注册 Phoenix 追踪提供者并给应用代码加上监控，但这次我们还需要取消现有 OpenAI 追踪提供者的监控，以避免冲突。",Ke,te,et,se,Et=`🔭 OpenTelemetry Tracing Details 🔭
|  Phoenix Project: crewai
|  Span Processor: SimpleSpanProcessor
|  Collector Endpoint: https://andrewrreed-phoenix-arize-observability-demo.hf.space/v1/traces
|  Transport: HTTP
|  Transport Headers: &#123;'user-agent': '****', 'authorization': '****'}
|  
|  Using a default SpanProcessor. \`add_span_processor\` will overwrite this default.
|  
|  \`register\` has set this TracerProvider as the global OpenTelemetry default.
|  To disable this behavior, call \`register\` with \`set_global_tracer_provider=False\`.
`,tt,ae,Xt="现在，我们将使用 CrewAI 定义一个多智能体应用程序，研究并撰写一篇关于观察性和追踪在 LLM 应用中的重要性的博客。",st,w,Qt='<p>这个例子借鉴并修改自 <a href="https://docs.arize.com/phoenix/tracing/integrations-tracing/crewai" rel="nofollow">此处</a>。</p>',at,le,lt,ne,Vt=`\x1B[1m\x1B[95m# Agent:\x1B[00m \x1B[1m\x1B[92mResearcher\x1B[00m
\x1B[95m## Task:\x1B[00m \x1B[92mConduct comprehensive research and analysis of the importance of observability and tracing in LLM applications.
  Identify key trends, breakthrough technologies, and potential industry impacts.\x1B[00m


\x1B[1m\x1B[95m# Agent:\x1B[00m \x1B[1m\x1B[92mResearcher\x1B[00m
\x1B[95m## Using tool:\x1B[00m \x1B[92mSearch the internet\x1B[00m
\x1B[95m## Tool Input:\x1B[00m \x1B[92m
"&#123;\\"search_query\\": \\"importance of observability and tracing in LLM applications\\"}"\x1B[00m
\x1B[95m## Tool Output:\x1B[00m \x1B[92m

Search results: Title: LLM Observability: The 5 Key Pillars for Monitoring Large Language ...
Link: https://arize.com/blog-course/large-language-model-monitoring-observability/
Snippet: Why leveraging the five pillars of LLM observability is essential for ensuring performance, reliability, and seamless LLM applications.
---
Title: Observability of LLM Applications: Exploration and Practice from the ...
Link: https://www.alibabacloud.com/blog/observability-of-llm-applications-exploration-and-practice-from-the-perspective-of-trace_601604
Snippet: This article clarifies the technical challenges of observability by analyzing LLM application patterns and different concerns.
---
Title: What is LLM Observability? - The Ultimate LLM Monitoring Guide
Link: https://www.confident-ai.com/blog/what-is-llm-observability-the-ultimate-llm-monitoring-guide
Snippet: Observability tools collect and correlate logs, real-time evaluation metrics, and traces to understand the context of unexpected outputs or ...
---
Title: An Introduction to Observability for LLM-based applications using ...
Link: https://opentelemetry.io/blog/2024/llm-observability/
Snippet: Why Observability Matters for LLM Applications · It's vital to keep track of how often LLMs are being used for usage and cost tracking. · Latency ...
---
Title: Understanding LLM Observability - Key Insights, Best Practices ...
Link: https://signoz.io/blog/llm-observability/
Snippet: LLM Observability is essential for maintaining reliable, accurate, and efficient AI applications. Focus on the five pillars: evaluation, tracing ...
---
Title: LLM Observability Tools: 2024 Comparison - lakeFS
Link: https://lakefs.io/blog/llm-observability-tools/
Snippet: LLM observability is the process that enables monitoring by providing full visibility and tracing in an LLM application system, as well as newer ...
---
Title: From Concept to Production with Observability in LLM Applications
Link: https://hadijaveed.me/2024/03/05/tracing-and-observability-in-llm-applications/
Snippet: Traces are essential to understanding the full “path” a request takes in your application, e.g, prompt, query-expansion, RAG retrieved top-k ...
---
Title: The Importance of LLM Observability: A Technical Deep Dive
Link: https://www.linkedin.com/pulse/importance-llm-observability-technical-deep-dive-patrick-carroll-trlqe
Snippet: LLM observability is crucial for any technical team that wants to maintain and improve the reliability, security, and performance of their AI- ...
---
Title: Observability and Monitoring of LLMs - TheBlue.ai
Link: https://theblue.ai/blog/llm-observability-en/
Snippet: LLM-Observability is crucial to maximize the performance and reliability of Large Language Models (LLMs). By systematically capturing and ...
---
\x1B[00m
`,nt,ie,Yt="返回 Phoenix 仪表板后，我们可以在新项目 “crewai” 中看到来自我们多智能体应用程序的追踪信息！",it,pe,zt='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/crew-ai-trace.png"/>',pt,oe,ot,Me,rt;return U=new Kt({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/zh-CN/phoenix_observability_on_hf_spaces.ipynb"}]}}),J=new Dt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),T=new he({props:{title:"在 Hugging Face Spaces 上设置 Phoenix 观察性仪表板以进行 LLM 应用程序追踪",local:"在-hugging-face-spaces-上设置-phoenix-观察性仪表板以进行-llm-应用程序追踪",headingTag:"h1"}}),B=new he({props:{title:"第一步：在 Hugging Face Spaces 上部署 Phoenix",local:"第一步在-hugging-face-spaces-上部署-phoenix",headingTag:"h2"}}),G=new he({props:{title:"第二步：配置应用追踪",local:"第二步配置应用追踪",headingTag:"h2"}}),H=new re({props:{code:"IXBpcCUyMGluc3RhbGwlMjAtcSUyMGFyaXplLXBob2VuaXglMjBhcml6ZS1waG9lbml4LW90ZWwlMjBvcGVuaW5mZXJlbmNlLWluc3RydW1lbnRhdGlvbi1vcGVuYWklMjBvcGVuYWklMjBodWdnaW5nZmFjZS1odWI=",highlighted:"!pip install -q arize-phoenix arize-phoenix-otel openinference-instrumentation-openai openai huggingface-hub",wrap:!1}}),X=new re({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGludGVycHJldGVyX2xvZ2luJTBBJTBBaW50ZXJwcmV0ZXJfbG9naW4oKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> interpreter_login

interpreter_login()`,wrap:!1}}),z=new re({props:{code:"ZnJvbSUyMHBob2VuaXgub3RlbCUyMGltcG9ydCUyMHJlZ2lzdGVyJTBBZnJvbSUyMGh1Z2dpbmdmYWNlX2h1Yi51dGlscyUyMGltcG9ydCUyMGJ1aWxkX2hmX2hlYWRlcnMlMEFmcm9tJTIwb3BlbmluZmVyZW5jZS5pbnN0cnVtZW50YXRpb24ub3BlbmFpJTIwaW1wb3J0JTIwT3BlbkFJSW5zdHJ1bWVudG9yJTBBJTBBJTIzJTIwMS4lMjBSZWdpc3RlciUyMHRoZSUyMFBob2VuaXglMjB0cmFjZXIlMjBwcm92aWRlciUwQXRyYWNlcl9wcm92aWRlciUyMCUzRCUyMHJlZ2lzdGVyKCUwQSUyMCUyMCUyMCUyMHByb2plY3RfbmFtZSUzRCUyMnRlc3QlMjIlMkMlMEElMjAlMjAlMjAlMjBlbmRwb2ludCUzRCUyMmh0dHBzJTNBJTJGJTJGYW5kcmV3cnJlZWQtcGhvZW5peC1hcml6ZS1vYnNlcnZhYmlsaXR5LWRlbW8uaGYuc3BhY2UlMjIlMEElMjAlMjAlMjAlMjAlMkIlMjAlMjIlMkZ2MSUyRnRyYWNlcyUyMiUyQyUwQSUyMCUyMCUyMCUyMGhlYWRlcnMlM0RidWlsZF9oZl9oZWFkZXJzKCklMkMlMEEpJTBBJTBBJTIzJTIwMi4lMjBJbnN0cnVtZW50JTIwb3VyJTIwYXBwbGljYXRpb24lMjBjb2RlJTIwdG8lMjB1c2UlMjB0aGUlMjBPcGVuQUklMjB0cmFjZXIlMjBwcm92aWRlciUwQU9wZW5BSUluc3RydW1lbnRvcigpLmluc3RydW1lbnQodHJhY2VyX3Byb3ZpZGVyJTNEdHJhY2VyX3Byb3ZpZGVyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> phoenix.otel <span class="hljs-keyword">import</span> register
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub.utils <span class="hljs-keyword">import</span> build_hf_headers
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> openinference.instrumentation.openai <span class="hljs-keyword">import</span> OpenAIInstrumentor

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># 1. Register the Phoenix tracer provider</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tracer_provider = register(
<span class="hljs-meta">... </span>    project_name=<span class="hljs-string">&quot;test&quot;</span>,
<span class="hljs-meta">... </span>    endpoint=<span class="hljs-string">&quot;https://andrewrreed-phoenix-arize-observability-demo.hf.space&quot;</span>
<span class="hljs-meta">... </span>    + <span class="hljs-string">&quot;/v1/traces&quot;</span>,
<span class="hljs-meta">... </span>    headers=build_hf_headers(),
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># 2. Instrument our application code to use the OpenAI tracer provider</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)`,wrap:!1}}),_=new he({props:{title:"第三步：发起调用并在 Phoenix 仪表板中查看追踪",local:"第三步发起调用并在-phoenix-仪表板中查看追踪",headingTag:"h2"}}),N=new re({props:{code:"ZnJvbSUyMG9wZW5haSUyMGltcG9ydCUyME9wZW5BSSUwQWZyb20lMjBodWdnaW5nZmFjZV9odWIlMjBpbXBvcnQlMjBnZXRfdG9rZW4lMEElMEFjbGllbnQlMjAlM0QlMjBPcGVuQUkoJTBBJTIwJTIwJTIwJTIwYmFzZV91cmwlM0QlMjJodHRwcyUzQSUyRiUyRmFwaS1pbmZlcmVuY2UuaHVnZ2luZ2ZhY2UuY28lMkZ2MSUyRiUyMiUyQyUwQSUyMCUyMCUyMCUyMGFwaV9rZXklM0RnZXRfdG9rZW4oKSUyQyUwQSklMEElMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMldoYXQlMjBkb2VzJTIwYSUyMGxsYW1hJTIwZG8lMjBmb3IlMjBmdW4lM0YlMjIlN0QlNUQlMEElMEFyZXNwb25zZSUyMCUzRCUyMGNsaWVudC5jaGF0LmNvbXBsZXRpb25zLmNyZWF0ZSglMEElMjAlMjAlMjAlMjBtb2RlbCUzRCUyMm1ldGEtbGxhbWElMkZMbGFtYS0zLjEtOEItSW5zdHJ1Y3QlMjIlMkMlMEElMjAlMjAlMjAlMjBtZXNzYWdlcyUzRG1lc3NhZ2VzJTJDJTBBJTIwJTIwJTIwJTIwbWF4X3Rva2VucyUzRDUwMCUyQyUwQSklMEElMEFwcmludChyZXNwb25zZS5jaG9pY2VzJTVCMCU1RC5tZXNzYWdlLmNvbnRlbnQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> openai <span class="hljs-keyword">import</span> OpenAI
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> get_token

<span class="hljs-meta">&gt;&gt;&gt; </span>client = OpenAI(
<span class="hljs-meta">... </span>    base_url=<span class="hljs-string">&quot;https://api-inference.huggingface.co/v1/&quot;</span>,
<span class="hljs-meta">... </span>    api_key=get_token(),
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>messages = [{<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;What does a llama do for fun?&quot;</span>}]

<span class="hljs-meta">&gt;&gt;&gt; </span>response = client.chat.completions.create(
<span class="hljs-meta">... </span>    model=<span class="hljs-string">&quot;meta-llama/Llama-3.1-8B-Instruct&quot;</span>,
<span class="hljs-meta">... </span>    messages=messages,
<span class="hljs-meta">... </span>    max_tokens=<span class="hljs-number">500</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(response.choices[<span class="hljs-number">0</span>].message.content)`,wrap:!1}}),O=new he({props:{title:"奖励部分：使用 CrewAI 追踪多代理应用程序",local:"奖励部分使用-crewai-追踪多代理应用程序",headingTag:"h2"}}),K=new re({props:{code:"IXBpcCUyMGluc3RhbGwlMjAtcSUyMG9wZW5pbmZlcmVuY2UtaW5zdHJ1bWVudGF0aW9uLWNyZXdhaSUyMGNyZXdhaSUyMGNyZXdhaS10b29scw==",highlighted:"!pip install -q openinference-instrumentation-crewai crewai crewai-tools",wrap:!1}}),te=new re({props:{code:"ZnJvbSUyMG9wZW50ZWxlbWV0cnklMjBpbXBvcnQlMjB0cmFjZSUwQWZyb20lMjBvcGVuaW5mZXJlbmNlLmluc3RydW1lbnRhdGlvbi5jcmV3YWklMjBpbXBvcnQlMjBDcmV3QUlJbnN0cnVtZW50b3IlMEElMEElMjMlMjAwLiUyMFVuaW5zdHJ1bWVudCUyMGV4aXN0aW5nJTIwdHJhY2VyJTIwcHJvdmlkZXIlMjBhbmQlMjBjbGVhciUyMHRoZSUyMGdsb2JhbCUyMHRyYWNlciUyMHByb3ZpZGVyJTBBT3BlbkFJSW5zdHJ1bWVudG9yKCkudW5pbnN0cnVtZW50KCklMEFpZiUyMHRyYWNlLmdldF90cmFjZXJfcHJvdmlkZXIoKSUzQSUwQSUyMCUyMCUyMCUyMHRyYWNlLmdldF90cmFjZXJfcHJvdmlkZXIoKS5zaHV0ZG93bigpJTBBJTIwJTIwJTIwJTIwdHJhY2UuX1RSQUNFUl9QUk9WSURFUiUyMCUzRCUyME5vbmUlMjAlMjAlMjMlMjBSZXNldCUyMHRoZSUyMGdsb2JhbCUyMHRyYWNlciUyMHByb3ZpZGVyJTBBJTBBJTIzJTIwMS4lMjBSZWdpc3RlciUyMHRoZSUyMFBob2VuaXglMjB0cmFjZXIlMjBwcm92aWRlciUwQXRyYWNlcl9wcm92aWRlciUyMCUzRCUyMHJlZ2lzdGVyKCUwQSUyMCUyMCUyMCUyMHByb2plY3RfbmFtZSUzRCUyMmNyZXdhaSUyMiUyQyUwQSUyMCUyMCUyMCUyMGVuZHBvaW50JTNEJTIyaHR0cHMlM0ElMkYlMkZhbmRyZXdycmVlZC1waG9lbml4LWFyaXplLW9ic2VydmFiaWxpdHktZGVtby5oZi5zcGFjZSUyMiUwQSUyMCUyMCUyMCUyMCUyQiUyMCUyMiUyRnYxJTJGdHJhY2VzJTIyJTJDJTBBJTIwJTIwJTIwJTIwaGVhZGVycyUzRGJ1aWxkX2hmX2hlYWRlcnMoKSUyQyUwQSklMEElMEElMjMlMjAyLiUyMEluc3RydW1lbnQlMjBvdXIlMjBhcHBsaWNhdGlvbiUyMGNvZGUlMjB0byUyMHVzZSUyMHRoZSUyME9wZW5BSSUyMHRyYWNlciUyMHByb3ZpZGVyJTBBQ3Jld0FJSW5zdHJ1bWVudG9yKCkuaW5zdHJ1bWVudCh0cmFjZXJfcHJvdmlkZXIlM0R0cmFjZXJfcHJvdmlkZXIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> opentelemetry <span class="hljs-keyword">import</span> trace
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> openinference.instrumentation.crewai <span class="hljs-keyword">import</span> CrewAIInstrumentor

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># 0. Uninstrument existing tracer provider and clear the global tracer provider</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>OpenAIInstrumentor().uninstrument()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">if</span> trace.get_tracer_provider():
<span class="hljs-meta">... </span>    trace.get_tracer_provider().shutdown()
<span class="hljs-meta">... </span>    trace._TRACER_PROVIDER = <span class="hljs-literal">None</span>  <span class="hljs-comment"># Reset the global tracer provider</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># 1. Register the Phoenix tracer provider</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tracer_provider = register(
<span class="hljs-meta">... </span>    project_name=<span class="hljs-string">&quot;crewai&quot;</span>,
<span class="hljs-meta">... </span>    endpoint=<span class="hljs-string">&quot;https://andrewrreed-phoenix-arize-observability-demo.hf.space&quot;</span>
<span class="hljs-meta">... </span>    + <span class="hljs-string">&quot;/v1/traces&quot;</span>,
<span class="hljs-meta">... </span>    headers=build_hf_headers(),
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># 2. Instrument our application code to use the OpenAI tracer provider</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>CrewAIInstrumentor().instrument(tracer_provider=tracer_provider)`,wrap:!1}}),le=new re({props:{code:" ",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> os
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> get_token
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> crewai_tools <span class="hljs-keyword">import</span> SerperDevTool
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> crewai <span class="hljs-keyword">import</span> LLM, Agent, Task, Crew, Process

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Define our LLM using HF&#x27;s Serverless Inference API</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>llm = LLM(
<span class="hljs-meta">... </span>    model=<span class="hljs-string">&quot;huggingface/meta-llama/Llama-3.1-8B-Instruct&quot;</span>,
<span class="hljs-meta">... </span>    api_key=get_token(),
<span class="hljs-meta">... </span>    max_tokens=<span class="hljs-number">1024</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Define a tool for searching the web</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>os.environ[<span class="hljs-string">&quot;SERPER_API_KEY&quot;</span>] = (
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;YOUR_SERPER_API_KEY&quot;</span>  <span class="hljs-comment"># must set this value in your environment</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>search_tool = SerperDevTool()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Define your agents with roles and goals</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>researcher = Agent(
<span class="hljs-meta">... </span>    role=<span class="hljs-string">&quot;Researcher&quot;</span>,
<span class="hljs-meta">... </span>    goal=<span class="hljs-string">&quot;Conduct thorough research on up to date trends around a given topic.&quot;</span>,
<span class="hljs-meta">... </span>    backstory=<span class="hljs-string">&quot;&quot;&quot;You work at a leading tech think tank. You have a knack for dissecting complex data and presenting actionable insights.&quot;&quot;&quot;</span>,
<span class="hljs-meta">... </span>    verbose=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    allow_delegation=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    tools=[search_tool],
<span class="hljs-meta">... </span>    llm=llm,
<span class="hljs-meta">... </span>    max_iter=<span class="hljs-number">1</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">... </span>writer = Agent(
<span class="hljs-meta">... </span>    role=<span class="hljs-string">&quot;Technical Writer&quot;</span>,
<span class="hljs-meta">... </span>    goal=<span class="hljs-string">&quot;Craft compelling content on a given topic.&quot;</span>,
<span class="hljs-meta">... </span>    backstory=<span class="hljs-string">&quot;&quot;&quot;You are a technical writer with a knack for crafting engaging and informative content.&quot;&quot;&quot;</span>,
<span class="hljs-meta">... </span>    llm=llm,
<span class="hljs-meta">... </span>    verbose=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    allow_delegation=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    max_iter=<span class="hljs-number">1</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Create tasks for your agents</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>task1 = Task(
<span class="hljs-meta">... </span>    description=<span class="hljs-string">&quot;&quot;&quot;Conduct comprehensive research and analysis of the importance of observability and tracing in LLM applications.
<span class="hljs-meta">... </span>  Identify key trends, breakthrough technologies, and potential industry impacts.&quot;&quot;&quot;</span>,
<span class="hljs-meta">... </span>    expected_output=<span class="hljs-string">&quot;Full analysis report in bullet points&quot;</span>,
<span class="hljs-meta">... </span>    agent=researcher,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>task2 = Task(
<span class="hljs-meta">... </span>    description=<span class="hljs-string">&quot;&quot;&quot;Using the insights provided, develop an engaging blog
<span class="hljs-meta">... </span>  post that highlights the importance of observability and tracing in LLM applications.
<span class="hljs-meta">... </span>  Your post should be informative yet accessible, catering to a tech-savvy audience.
<span class="hljs-meta">... </span>  Make it sound cool, avoid complex words so it doesn&#x27;t sound like AI.&quot;&quot;&quot;</span>,
<span class="hljs-meta">... </span>    expected_output=<span class="hljs-string">&quot;Blog post of at least 3 paragraphs&quot;</span>,
<span class="hljs-meta">... </span>    agent=writer,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Instantiate your crew with a sequential process</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>crew = Crew(
<span class="hljs-meta">... </span>    agents=[researcher, writer],
<span class="hljs-meta">... </span>    tasks=[task1, task2],
<span class="hljs-meta">... </span>    verbose=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    process=Process.sequential,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Get your crew to work!</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>result = crew.kickoff()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;------------ FINAL RESULT ------------&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(result)`,wrap:!1}}),oe=new es({props:{source:"https://github.com/huggingface/cookbook/blob/main/notebooks/zh-CN/phoenix_observability_on_hf_spaces.md"}}),{c(){u=i("meta"),ye=l(),me=i("p"),ge=l(),r(U.$$.fragment),ue=l(),r(J.$$.fragment),be=l(),r(T.$$.fragment),de=l(),f=i("p"),f.innerHTML=Mt,je=l(),v=i("p"),v.innerHTML=ht,we=l(),g=i("div"),g.innerHTML=yt,Ue=l(),I=i("p"),I.innerHTML=gt,Je=l(),r(B.$$.fragment),Te=l(),Z=i("p"),Z.innerHTML=ut,fe=l(),C=i("p"),C.innerHTML=bt,ve=l(),k=i("p"),k.innerHTML=dt,Ie=l(),x=i("p"),x.textContent=jt,Be=l(),b=i("blockquote"),b.innerHTML=wt,Ze=l(),W=i("p"),W.textContent=Ut,Ce=l(),L=i("p"),L.innerHTML=Jt,ke=l(),r(G.$$.fragment),xe=l(),S=i("p"),S.innerHTML=Tt,We=l(),d=i("blockquote"),d.innerHTML=ft,Le=l(),R=i("p"),R.textContent=vt,Ge=l(),r(H.$$.fragment),Se=l(),E=i("p"),E.innerHTML=It,Re=l(),r(X.$$.fragment),He=l(),Q=i("p"),Q.innerHTML=Bt,Ee=l(),V=i("ol"),V.innerHTML=Zt,Xe=l(),Y=i("p"),Y.innerHTML=Ct,Qe=l(),r(z.$$.fragment),Ve=l(),F=i("pre"),F.textContent=kt,Ye=l(),r(_.$$.fragment),ze=l(),$=i("p"),$.innerHTML=xt,Fe=l(),r(N.$$.fragment),_e=l(),A=i("pre"),A.textContent=Wt,$e=l(),q=i("p"),q.textContent=Lt,Ne=l(),P=i("p"),P.innerHTML=Gt,Ae=l(),r(O.$$.fragment),qe=l(),D=i("p"),D.innerHTML=St,Pe=l(),j=i("blockquote"),j.innerHTML=Rt,Oe=l(),r(K.$$.fragment),De=l(),ee=i("p"),ee.textContent=Ht,Ke=l(),r(te.$$.fragment),et=l(),se=i("pre"),se.textContent=Et,tt=l(),ae=i("p"),ae.textContent=Xt,st=l(),w=i("blockquote"),w.innerHTML=Qt,at=l(),r(le.$$.fragment),lt=l(),ne=i("pre"),ne.textContent=Vt,nt=l(),ie=i("p"),ie.textContent=Yt,it=l(),pe=i("p"),pe.innerHTML=zt,pt=l(),r(oe.$$.fragment),ot=l(),Me=i("p"),this.h()},l(e){const t=Pt("svelte-u9bgzb",document.head);u=p(t,"META",{name:!0,content:!0}),t.forEach(s),ye=n(e),me=p(e,"P",{}),Ft(me).forEach(s),ge=n(e),c(U.$$.fragment,e),ue=n(e),c(J.$$.fragment,e),be=n(e),c(T.$$.fragment,e),de=n(e),f=p(e,"P",{"data-svelte-h":!0}),o(f)!=="svelte-kjf26r"&&(f.innerHTML=Mt),je=n(e),v=p(e,"P",{"data-svelte-h":!0}),o(v)!=="svelte-uzfz5s"&&(v.innerHTML=ht),we=n(e),g=p(e,"DIV",{style:!0,"data-svelte-h":!0}),o(g)!=="svelte-1s5sc8v"&&(g.innerHTML=yt),Ue=n(e),I=p(e,"P",{"data-svelte-h":!0}),o(I)!=="svelte-qz5bwd"&&(I.innerHTML=gt),Je=n(e),c(B.$$.fragment,e),Te=n(e),Z=p(e,"P",{"data-svelte-h":!0}),o(Z)!=="svelte-mqu8xn"&&(Z.innerHTML=ut),fe=n(e),C=p(e,"P",{"data-svelte-h":!0}),o(C)!=="svelte-1ox5x3q"&&(C.innerHTML=bt),ve=n(e),k=p(e,"P",{"data-svelte-h":!0}),o(k)!=="svelte-10elq7v"&&(k.innerHTML=dt),Ie=n(e),x=p(e,"P",{"data-svelte-h":!0}),o(x)!=="svelte-plluzf"&&(x.textContent=jt),Be=n(e),b=p(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(b)!=="svelte-a9y5cv"&&(b.innerHTML=wt),Ze=n(e),W=p(e,"P",{"data-svelte-h":!0}),o(W)!=="svelte-6rv984"&&(W.textContent=Ut),Ce=n(e),L=p(e,"P",{"data-svelte-h":!0}),o(L)!=="svelte-1omzjh4"&&(L.innerHTML=Jt),ke=n(e),c(G.$$.fragment,e),xe=n(e),S=p(e,"P",{"data-svelte-h":!0}),o(S)!=="svelte-uiec02"&&(S.innerHTML=Tt),We=n(e),d=p(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(d)!=="svelte-1bp2pnh"&&(d.innerHTML=ft),Le=n(e),R=p(e,"P",{"data-svelte-h":!0}),o(R)!=="svelte-13gaubr"&&(R.textContent=vt),Ge=n(e),c(H.$$.fragment,e),Se=n(e),E=p(e,"P",{"data-svelte-h":!0}),o(E)!=="svelte-v0ukl2"&&(E.innerHTML=It),Re=n(e),c(X.$$.fragment,e),He=n(e),Q=p(e,"P",{"data-svelte-h":!0}),o(Q)!=="svelte-1qfblkp"&&(Q.innerHTML=Bt),Ee=n(e),V=p(e,"OL",{"data-svelte-h":!0}),o(V)!=="svelte-26jxzx"&&(V.innerHTML=Zt),Xe=n(e),Y=p(e,"P",{"data-svelte-h":!0}),o(Y)!=="svelte-1adj09n"&&(Y.innerHTML=Ct),Qe=n(e),c(z.$$.fragment,e),Ve=n(e),F=p(e,"PRE",{"data-svelte-h":!0}),o(F)!=="svelte-bamujo"&&(F.textContent=kt),Ye=n(e),c(_.$$.fragment,e),ze=n(e),$=p(e,"P",{"data-svelte-h":!0}),o($)!=="svelte-gqh6yy"&&($.innerHTML=xt),Fe=n(e),c(N.$$.fragment,e),_e=n(e),A=p(e,"PRE",{"data-svelte-h":!0}),o(A)!=="svelte-1ykvnx2"&&(A.textContent=Wt),$e=n(e),q=p(e,"P",{"data-svelte-h":!0}),o(q)!=="svelte-t9dzak"&&(q.textContent=Lt),Ne=n(e),P=p(e,"P",{"data-svelte-h":!0}),o(P)!=="svelte-19mnv1a"&&(P.innerHTML=Gt),Ae=n(e),c(O.$$.fragment,e),qe=n(e),D=p(e,"P",{"data-svelte-h":!0}),o(D)!=="svelte-1y6u427"&&(D.innerHTML=St),Pe=n(e),j=p(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(j)!=="svelte-1yv4l7i"&&(j.innerHTML=Rt),Oe=n(e),c(K.$$.fragment,e),De=n(e),ee=p(e,"P",{"data-svelte-h":!0}),o(ee)!=="svelte-1hht061"&&(ee.textContent=Ht),Ke=n(e),c(te.$$.fragment,e),et=n(e),se=p(e,"PRE",{"data-svelte-h":!0}),o(se)!=="svelte-k9ui0t"&&(se.textContent=Et),tt=n(e),ae=p(e,"P",{"data-svelte-h":!0}),o(ae)!=="svelte-1d75apn"&&(ae.textContent=Xt),st=n(e),w=p(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(w)!=="svelte-1xa24f6"&&(w.innerHTML=Qt),at=n(e),c(le.$$.fragment,e),lt=n(e),ne=p(e,"PRE",{"data-svelte-h":!0}),o(ne)!=="svelte-1953h3t"&&(ne.textContent=Vt),nt=n(e),ie=p(e,"P",{"data-svelte-h":!0}),o(ie)!=="svelte-t3c8ia"&&(ie.textContent=Yt),it=n(e),pe=p(e,"P",{"data-svelte-h":!0}),o(pe)!=="svelte-1qqdzdu"&&(pe.innerHTML=zt),pt=n(e),c(oe.$$.fragment,e),ot=n(e),Me=p(e,"P",{}),Ft(Me).forEach(s),this.h()},h(){ce(u,"name","hf:doc:metadata"),ce(u,"content",ss),ct(g,"display","flex"),ct(g,"justify-content","space-between"),ct(g,"gap","20px"),ct(g,"margin","20px 0"),ce(b,"class","tip"),ce(d,"class","tip"),ce(j,"class","tip"),ce(w,"class","tip")},m(e,t){Ot(document.head,u),a(e,ye,t),a(e,me,t),a(e,ge,t),m(U,e,t),a(e,ue,t),m(J,e,t),a(e,be,t),m(T,e,t),a(e,de,t),a(e,f,t),a(e,je,t),a(e,v,t),a(e,we,t),a(e,g,t),a(e,Ue,t),a(e,I,t),a(e,Je,t),m(B,e,t),a(e,Te,t),a(e,Z,t),a(e,fe,t),a(e,C,t),a(e,ve,t),a(e,k,t),a(e,Ie,t),a(e,x,t),a(e,Be,t),a(e,b,t),a(e,Ze,t),a(e,W,t),a(e,Ce,t),a(e,L,t),a(e,ke,t),m(G,e,t),a(e,xe,t),a(e,S,t),a(e,We,t),a(e,d,t),a(e,Le,t),a(e,R,t),a(e,Ge,t),m(H,e,t),a(e,Se,t),a(e,E,t),a(e,Re,t),m(X,e,t),a(e,He,t),a(e,Q,t),a(e,Ee,t),a(e,V,t),a(e,Xe,t),a(e,Y,t),a(e,Qe,t),m(z,e,t),a(e,Ve,t),a(e,F,t),a(e,Ye,t),m(_,e,t),a(e,ze,t),a(e,$,t),a(e,Fe,t),m(N,e,t),a(e,_e,t),a(e,A,t),a(e,$e,t),a(e,q,t),a(e,Ne,t),a(e,P,t),a(e,Ae,t),m(O,e,t),a(e,qe,t),a(e,D,t),a(e,Pe,t),a(e,j,t),a(e,Oe,t),m(K,e,t),a(e,De,t),a(e,ee,t),a(e,Ke,t),m(te,e,t),a(e,et,t),a(e,se,t),a(e,tt,t),a(e,ae,t),a(e,st,t),a(e,w,t),a(e,at,t),m(le,e,t),a(e,lt,t),a(e,ne,t),a(e,nt,t),a(e,ie,t),a(e,it,t),a(e,pe,t),a(e,pt,t),m(oe,e,t),a(e,ot,t),a(e,Me,t),rt=!0},p:$t,i(e){rt||(M(U.$$.fragment,e),M(J.$$.fragment,e),M(T.$$.fragment,e),M(B.$$.fragment,e),M(G.$$.fragment,e),M(H.$$.fragment,e),M(X.$$.fragment,e),M(z.$$.fragment,e),M(_.$$.fragment,e),M(N.$$.fragment,e),M(O.$$.fragment,e),M(K.$$.fragment,e),M(te.$$.fragment,e),M(le.$$.fragment,e),M(oe.$$.fragment,e),rt=!0)},o(e){h(U.$$.fragment,e),h(J.$$.fragment,e),h(T.$$.fragment,e),h(B.$$.fragment,e),h(G.$$.fragment,e),h(H.$$.fragment,e),h(X.$$.fragment,e),h(z.$$.fragment,e),h(_.$$.fragment,e),h(N.$$.fragment,e),h(O.$$.fragment,e),h(K.$$.fragment,e),h(te.$$.fragment,e),h(le.$$.fragment,e),h(oe.$$.fragment,e),rt=!1},d(e){e&&(s(ye),s(me),s(ge),s(ue),s(be),s(de),s(f),s(je),s(v),s(we),s(g),s(Ue),s(I),s(Je),s(Te),s(Z),s(fe),s(C),s(ve),s(k),s(Ie),s(x),s(Be),s(b),s(Ze),s(W),s(Ce),s(L),s(ke),s(xe),s(S),s(We),s(d),s(Le),s(R),s(Ge),s(Se),s(E),s(Re),s(He),s(Q),s(Ee),s(V),s(Xe),s(Y),s(Qe),s(Ve),s(F),s(Ye),s(ze),s($),s(Fe),s(_e),s(A),s($e),s(q),s(Ne),s(P),s(Ae),s(qe),s(D),s(Pe),s(j),s(Oe),s(De),s(ee),s(Ke),s(et),s(se),s(tt),s(ae),s(st),s(w),s(at),s(lt),s(ne),s(nt),s(ie),s(it),s(pe),s(pt),s(ot),s(Me)),s(u),y(U,e),y(J,e),y(T,e),y(B,e),y(G,e),y(H,e),y(X,e),y(z,e),y(_,e),y(N,e),y(O,e),y(K,e),y(te,e),y(le,e),y(oe,e)}}}const ss='{"title":"在 Hugging Face Spaces 上设置 Phoenix 观察性仪表板以进行 LLM 应用程序追踪","local":"在-hugging-face-spaces-上设置-phoenix-观察性仪表板以进行-llm-应用程序追踪","sections":[{"title":"第一步：在 Hugging Face Spaces 上部署 Phoenix","local":"第一步在-hugging-face-spaces-上部署-phoenix","sections":[],"depth":2},{"title":"第二步：配置应用追踪","local":"第二步配置应用追踪","sections":[],"depth":2},{"title":"第三步：发起调用并在 Phoenix 仪表板中查看追踪","local":"第三步发起调用并在-phoenix-仪表板中查看追踪","sections":[],"depth":2},{"title":"奖励部分：使用 CrewAI 追踪多代理应用程序","local":"奖励部分使用-crewai-追踪多代理应用程序","sections":[],"depth":2}],"depth":1}';function as(mt){return Nt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class rs extends At{constructor(u){super(),qt(this,u,as,ts,_t,{})}}export{rs as component};
