<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eliz on Medium]]></title>
        <description><![CDATA[Stories by Eliz on Medium]]></description>
        <link>https://medium.com/@1625608596?source=rss-73c765135b02------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QJxDFWsAGmZ1noz6LUhWpQ.jpeg</url>
            <title>Stories by Eliz on Medium</title>
            <link>https://medium.com/@1625608596?source=rss-73c765135b02------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 23:03:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@1625608596/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Minimalism way to use OPIK]]></title>
            <link>https://medium.com/@1625608596/minimalism-way-to-use-opik-15387a081d18?source=rss-73c765135b02------2</link>
            <guid isPermaLink="false">https://medium.com/p/15387a081d18</guid>
            <category><![CDATA[opik]]></category>
            <category><![CDATA[logs]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[trace]]></category>
            <dc:creator><![CDATA[Eliz]]></dc:creator>
            <pubDate>Wed, 19 Mar 2025 11:27:51 GMT</pubDate>
            <atom:updated>2025-03-19T11:27:51.232Z</atom:updated>
            <content:encoded><![CDATA[<h3>Steps</h3><h3>1、register comet account</h3><p>go to official website：<a href="https://www.comet.com/">https://www.comet.com/</a></p><p>click `Try Comet Free`</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p3vXIt17mqtTLg6M.png" /></figure><h3>2、install opik python package</h3><pre>pip install opik</pre><h3>3、configure</h3><pre>import opik<br>opik.configure(use_local=False)</pre><p>input secret key `Iu9isxxxxx`</p><p>***</p><p>check configure</p><pre>$ cat /home/xx/.opik.config<br>[opik]<br>url_override = https://www.comet.com/opik/api/<br>workspace = xx-ez<br>api_key = Iu9i…AIM</pre><p>4、use opik in python code</p><pre>from opik.integrations.openai import track_openai<br>from openai import OpenAI<br><br>base_url = &#39;https://open.bigmodel.cn/api/paas/v4&#39; <br>api_key = &#39;xxxx&#39; <br>model_name = &#39;glm-4-flash&#39;<br><br>client = OpenAI(<br> base_url = base_url,<br> api_key = api_key<br>)<br><br>client = track_openai(client)<br><br>completion = client.chat.completions.create(<br> model=model_name,<br> messages=[<br>   # {&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;You are a helpful assistant.&quot;},<br>   {&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;你是谁&quot;}<br> ], <br>)<br><br>print(f&#39; - completion : {completion} &#39; )</pre><p>5、watch log</p><p>After successful operation, go to the website to check<br>By default, a project named Default Project will be created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cbQIIRd3o3wbImSv.png" /></figure><p>Trace as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uen6G6kPzGvhchl2.png" /></figure><p>click ID，the detail will show</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ww9ERmdxQHlQ30EN.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eZbXSYhHZTh7Pxuh.png" /></figure><h3>Other resources</h3><p>- Opik official document <br><a href="https://www.comet.com/docs/opik/">https://www.comet.com/docs/opik/</a><br>- Dify integrate Opik<br><a href="https://docs.dify.ai/zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-opik">https://docs.dify.ai/zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-opik</a></p><p>***<br>2025–03–19</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15387a081d18" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>