Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
使用 Opik 追踪 AI Sonar 的 OpenAI 兼容请求
pip install opik openai
export API_KEY="sk-your-api-key" export OPIK_PROJECT_NAME="aisonar-integration-demo"
import os from openai import OpenAI from opik.integrations.openai import track_openai client = OpenAI( api_key=os.environ["API_KEY"], base_url="https://api.aisonar.dev/v1", ) openai_client = track_openai(client)
completion = openai_client.chat.completions.create( model="claude-sonnet-5", messages=[ {"role": "user", "content": "Summarize why LLM observability matters."} ], ) print(completion.choices[0].message.content)