TypeScript API 参考
TypeScript API 参考
导入
JoyTokenClient
chat.completions.create
向 POST /openai/v1/chat/completions 发送非流式请求。
必填字段:
常用可选字段包括 temperature、max_tokens、top_p、stop、tools、tool_choice、tier 和 metadata。
chat.completions.stream
向 POST /openai/v1/chat/completions 发送 stream: true 的流式请求。
models.list
调用 GET /api/v1/models 并返回:
JoyTokenAPIError
非 2xx 响应会抛出 JoyTokenAPIError。