聊天 (Chat)
AI-generatedSummary
Send a chat message to an AI provider via the AI Gateway and return the response.
Inputs
- provider — 选择 AI 厂商(非 Custom 模式将直连官方 API)
- model — 模型名称,例如: glm-4-flash, deepseek-ai/DeepSeek-V3
- userMessage (required) — 用户消息内容
- systemPrompt — 可选的系统提示词
- advancedOptions — 可选的高级参数集合
Output shape
array of items, each with a json field containing { content, output, role } plus any original response fields
If continueOnFail is set and an error occurs, returns { error: error.message } instead of throwing.
Examples
Example 1: Basic chat message
provider: zhipu; model: glm-4-flash; userMessage: Hello, world!; systemPrompt: You are a helpful assistant.