ai-sdk
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI SDK Documentation
AI SDK 文档
When you need up-to-date information about the AI SDK:
当你需要AI SDK的最新信息时:
If using ai@6.0.34 or above
如果你使用的是ai@6.0.34或更高版本
Search the bundled documentation and source code in :
node_modules/ai/- Documentation:
grep "your query" node_modules/ai/docs/ - Source code:
grep "your query" node_modules/ai/src/
To find specific files:
- for documentation files
glob "node_modules/ai/docs/**/*.mdx" - for source files
glob "node_modules/ai/src/**/*.ts"
Provider packages (, , etc.) also include bundled docs in their respective directories.
@ai-sdk/openai@ai-sdk/anthropicnode_modules/@ai-sdk/<provider>/docs/When in doubt, update to the latest version of the AI SDK.
在目录中搜索内置的文档和源代码:
node_modules/ai/- 文档:
grep "你的查询内容" node_modules/ai/docs/ - 源代码:
grep "你的查询内容" node_modules/ai/src/
查找特定文件:
- 用于查找文档文件
glob "node_modules/ai/docs/**/*.mdx" - 用于查找源文件
glob "node_modules/ai/src/**/*.ts"
提供商包(如、等)在各自的目录中也包含内置文档。
@ai-sdk/openai@ai-sdk/anthropicnode_modules/@ai-sdk/<provider>/docs/如有疑问,请更新至AI SDK的最新版本。
Otherwise
其他版本情况
- Search the docs:
https://ai-sdk.dev/api/search-docs?q=your_query - The response includes matches with links ending in
.md - Fetch those URLs directly to get plain text content (e.g.
.md)https://ai-sdk.dev/docs/agents/building-agents.md
Use these resources for current API details, examples, and usage patterns.
For common errors and troubleshooting, see Common Errors Reference.
- 搜索文档:
https://ai-sdk.dev/api/search-docs?q=你的查询内容 - 搜索结果包含以结尾的匹配链接
.md - 直接获取这些URL以获取纯文本内容(例如
.md)https://ai-sdk.dev/docs/agents/building-agents.md
利用这些资源获取当前的API细节、示例和使用模式。
关于常见错误和故障排查,请查看常见错误参考。
Provider-Specific Information (ai@6.0.34+)
提供商专属信息(ai@6.0.34及以上版本)
For questions about specific providers (OpenAI, Anthropic, Google, etc.), search their dedicated packages:
- Provider documentation:
grep "your query" node_modules/@ai-sdk/<provider>/docs/ - Provider source code:
grep "your query" node_modules/@ai-sdk/<provider>/src/
To find provider files:
- for provider documentation
glob "node_modules/@ai-sdk/<provider>/docs/**/*.mdx" - for provider source files
glob "node_modules/@ai-sdk/<provider>/src/**/*.ts"
This is especially important for , which are provider-specific settings passed to model calls. Each provider has unique options documented in their package.
providerOptions针对特定提供商(OpenAI、Anthropic、Google等)的问题,搜索其专属包:
- 提供商文档:
grep "你的查询内容" node_modules/@ai-sdk/<provider>/docs/ - 提供商源代码:
grep "你的查询内容" node_modules/@ai-sdk/<provider>/src/
查找提供商文件:
- 用于查找提供商文档
glob "node_modules/@ai-sdk/<provider>/docs/**/*.mdx" - 用于查找提供商源文件
glob "node_modules/@ai-sdk/<provider>/src/**/*.ts"
这对于尤为重要,它是传递给模型调用的提供商专属设置。每个提供商的包中都记录了其独有的配置选项。
providerOptions