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.
使用 OpenLLMetry 追踪 AI Sonar 兼容 OpenAI 的请求
/v1
pip install opentelemetry-instrumentation-openai openai
export API_KEY="sk-your-api-key"
import os from openai import OpenAI from opentelemetry.instrumentation.openai import OpenAIInstrumentor OpenAIInstrumentor().instrument() client = OpenAI( api_key=os.environ["API_KEY"], base_url="https://api.aisonar.dev/v1", ) client.chat.completions.create( model="claude-sonnet-5", messages=[{"role": "user", "content": "Trace this request"}], )