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.
面向 LLM 提供商的标准化 API 规范
pip install openai # 或 npm install openai
export OPENAI_COMPATIBLE_BASE_URL="https://api.provider.com/v1" export OPENAI_COMPATIBLE_API_KEY="your_api_key_here" export OPENAI_COMPATIBLE_MODEL_NAME="provider-model-name"
from openai import OpenAI client = OpenAI( base_url=os.environ["OPENAI_COMPATIBLE_BASE_URL"], api_key=os.environ["OPENAI_COMPATIBLE_API_KEY"], )
import OpenAI from "openai"; const client = new OpenAI({ baseURL: process.env.OPENAI_COMPATIBLE_BASE_URL, apiKey: process.env.OPENAI_COMPATIBLE_API_KEY, });