WeryAI Chat
Use the official WeryAI chat-completions API for general assistant chat and model lookup. This skill is intentionally broad but not specialized: it is for general conversation and prompt-response tasks, not blog writing, social copy, or email drafting.
Example Prompts
- - INLINECODE0
- INLINECODE1
- INLINECODE2
- INLINECODE3
Quick Summary
- - Main jobs:
general assistant chat, multi-turn chat, chat model lookup, INLINECODE7 - Default model: INLINECODE8
- Main optional controls:
model, messages, maxTokens, temperature, INLINECODE13 - Main trust signals: dry-run support, model lookup, OpenAI-compatible messages, explicit non-specialized scope
Prerequisites
- -
WERYAI_API_KEY must be set before calling the API. - Node.js
>=18 is required. - Real runs use the WeryAI chat completion API and may consume credits.
When to use this skill
Use this skill when the user wants:
- - a normal assistant-style answer
- a direct chat-completions call
- a multi-turn conversation via INLINECODE16
- model lookup or model selection before a chat run
Do not use this skill when the user clearly wants:
- - blog writing
- email drafting
- ad copy
- translation or summarization as the main task
Those belong to the existing specialized text/* skills.
OpenAI-compatible message shape
This skill accepts standard chat-completions messages:
CODEBLOCK0
If you provide messages, they are passed through directly. If you provide only prompt, the runtime builds a simple messages array automatically.
Commands
CODEBLOCK1
Workflow
- 1. If the user wants model choice or pricing context first, run
models.js. - Use
write.js for direct prompt-response or explicit messages chat. - Prefer
--dry-run when validating payload shape without spending credits. - Return the assistant response directly when the call succeeds.
Definition of Done
- -
models.js returns the available chat models and pricing metadata. - INLINECODE25 returns at least one assistant completion choice and non-empty text, or a clear API failure.
Re-run Behavior
- - Re-running
models.js is read-only and safe. - Re-running
write.js --dry-run is safe and does not call the API. - Re-running
write.js creates a fresh chat completion request and may consume additional credits.
References
WeryAI 聊天
使用官方 WeryAI 聊天补全 API 进行通用助手对话和模型查询。此技能设计宽泛但非专业化:适用于一般对话和提示-响应任务,不适用于博客写作、社交媒体文案或邮件起草。
示例提示
- - 让 WeryAI 聊天模型用通俗语言解释检索增强生成。
- 将此消息数组发送至 WeryAI 聊天补全接口并返回助手响应。
- 列出当前可用的 WeryAI 聊天模型及其定价。
- 本次聊天调用使用 GPT54 而非默认模型。
快速摘要
- - 主要任务:通用助手对话、多轮对话、聊天模型查询、提示-响应
- 默认模型:GEMINI31_PRO
- 主要可选控制参数:model、messages、maxTokens、temperature、topP
- 主要信任信号:支持试运行、模型查询、兼容 OpenAI 的消息格式、明确的非专业化范围
前置条件
- - 调用 API 前必须设置 WERYAIAPIKEY。
- 需要 Node.js >=18 版本。
- 实际运行会使用 WeryAI 聊天补全 API 并可能消耗积分。
使用场景
当用户需要以下内容时使用此技能:
- - 常规助手式回答
- 直接聊天补全调用
- 通过 messages 进行多轮对话
- 在聊天运行前进行模型查询或模型选择
当用户明确需要以下内容时不要使用此技能:
- - 博客写作
- 邮件起草
- 广告文案
- 翻译或摘要作为主要任务
这些属于现有的专业化 text/* 技能。
兼容 OpenAI 的消息格式
此技能接受标准的聊天补全消息:
json
[
{ role: system, content: 你是一个有用的助手。 },
{ role: user, content: 什么是人工智能? }
]
如果提供 messages,它们将被直接传递。如果只提供 prompt,运行时会自动构建简单的消息数组。
命令
sh
列出可用的聊天模型
node {baseDir}/scripts/models.js
简单的提示-响应聊天
node {baseDir}/scripts/write.js --json {
prompt:用通俗语言解释检索增强生成,
temperature:0.7
}
显式消息数组
node {baseDir}/scripts/write.js --json {
model:GPT
54,
messages:[
{role:system,content:你简洁且专业。},
{role:user,content:比较 RAG 和长上下文提示。}
]
}
试运行预览
node {baseDir}/scripts/write.js --json {
prompt:延迟和吞吐量有什么区别?
} --dry-run
工作流程
- 1. 如果用户首先需要模型选择或定价上下文,运行 models.js。
- 使用 write.js 进行直接提示-响应或显式 messages 对话。
- 在验证负载格式而不消耗积分时,优先使用 --dry-run。
- 调用成功时直接返回助手响应。
完成标准
- - models.js 返回可用的聊天模型和定价元数据。
- write.js 返回至少一个助手补全选项且文本非空,或返回明确的 API 失败信息。
重新运行行为
- - 重新运行 models.js 是只读且安全的。
- 重新运行 write.js --dry-run 是安全的,不会调用 API。
- 重新运行 write.js 会创建新的聊天补全请求,可能消耗额外积分。
参考