ai-model-wechat

Generate and stream AI text in WeChat Mini Programs via wx.cloud.extend.AI.

2|1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/lxb031018/qintu --skill ai-model-wechat-lxb031018
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ai-model-wechat
Source: https://github.com/lxb031018/qintu/tree/main/.codebuddy/skills/ai-model-wechat
Command: npx skills add https://github.com/lxb031018/qintu --skill ai-model-wechat-lxb031018

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

WeChat Mini Program developers need AI text generation and real-time streaming capabilities but must work within the wx.cloud.extend.AI API constraints and different request/response formats.

Core Features & Use Cases

  • AI text generation in Mini Programs: Produce answers via generateText using WeChat Cloud AI models (e.g., Hunyuan and DeepSeek).
  • Streaming outputs for responsive UIs: Use streamText to progressively render partial results through onText, onEvent, and onFinish callbacks.
  • Compatible model selection for CloudBase: Choose among built-in providers and recommended models for the WeChat environment.
  • Mini Program scope: Enables AI calls specifically for WeChat Mini Program / wx.cloud-based apps.

Quick Start

Call wx.cloud.init during app launch, then create a model with wx.cloud.extend.AI.createModel and use generateText or streamText to request AI responses for your user input.

Frequently Asked Questions about ai-model-wechat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate AI text in a WeChat Mini Program?▼

To generate AI text in a WeChat Mini Program, initialize `wx.cloud.init`, create a model using `wx.cloud.extend.AI.createModel`, and call `generateText` with your user input to receive responses from CloudBase models like Hunyuan or DeepSeek.

Can I stream AI text responses in a WeChat Mini Program without Node.js SDKs?▼

Yes, you can stream AI text responses directly using the `streamText` function from `wx.cloud.extend.AI`. It progressively renders partial results through `onText`, `onEvent`, and `onFinish` callbacks without needing web or Node.js SDKs.

Why does my streaming request to wx.cloud.extend.AI require a data wrapper?▼

The `wx.cloud.extend.AI` streaming API requires streaming parameters to be enclosed in a `data` wrapper. This ensures the WeChat Mini Program environment correctly parses and processes the incremental callbacks for real-time UI updates.

Does wx.cloud.extend.AI support model selection from CloudBase?▼

Yes, `wx.cloud.extend.AI` supports model selection from CloudBase. Developers can choose among built-in providers and recommended models, such as Hunyuan and DeepSeek, that are specifically compatible with the WeChat Mini Program environment.

Are WeChat Cloud AI response formats different from standard JavaScript SDKs?▼

Yes, the `wx.cloud.extend.AI` API returns raw WeChat response formats that differ from standard JS or Node.js SDKs. Developers must handle these native response structures directly when integrating AI text generation in Mini Programs.