ai-model-wechat

Integrate AI text generation and streaming into WeChat Mini Programs via wx.cloud.extend.AI.

Updated Dec 19, 2025
One-click install
npx skills add https://github.com/yyds-x/walk --skill ai-model-wechat-yyds-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-model-wechat
Source: https://github.com/yyds-x/walk/tree/main/.agents/skills/cloudbase/references/ai-model-wechat
Command: npx skills add https://github.com/yyds-x/walk --skill ai-model-wechat-yyds-x

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables WeChat Mini Programs to access AI capabilities (text generation and streaming) via wx.cloud.extend.AI, reducing manual integration work and enabling real-time AI-powered interactions.

Core Features & Use Cases

  • Text generation: generateText with built-in Hunyuan and DeepSeek models.
  • Streaming responses: streamText with onText, onEvent, onFinish callbacks for interactive UI.
  • Model options: Hunyuan 2.0-instruct-20251111 and deepseek-v3.2; designed for WeChat cloud environment, not browser or Node.js.

Use Case: Build a chat assistant in a WeChat mini program that queries AI models and streams partial responses.

Quick Start

Initialize a WeChat Mini Program to create an AI model and call generateText with a user message.

Frequently Asked Questions about ai-model-wechat

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

FAQPage Schema
How do I add AI text generation to a WeChat Mini Program?

AI text generation is integrated into WeChat Mini Programs via the wx.cloud.extend.AI module, supporting built-in Hunyuan and DeepSeek models to generate responses from user messages.

Can I stream AI responses in a WeChat Mini Program?

Streaming AI responses in a WeChat Mini Program is supported via the streamText function, utilizing onText, onEvent, and onFinish callbacks to deliver partial text updates for interactive UIs.

Do I need a specific WeChat base library version for AI streaming?

AI streaming requires WeChat base library version 3.7.1 or higher, and it uses a specific data wrapper for streaming to ensure correct parameter wrapping within the cloud environment.

What AI models are available for WeChat Mini Programs?

Available AI models for WeChat Mini Programs include Hunyuan 2.0-instruct-20251111 and deepseek-v3.2, accessed directly through the wx.cloud.extend.AI interface rather than browser or Node.js environments.

Why are my streaming parameters not working with wx.cloud.extend.AI?

Streaming parameters fail when not correctly wrapped; the streamText function requires using the specific data wrapper for streaming to ensure correct parameter formatting across Hunyuan and DeepSeek models.

What is the difference between generateText and streamText in WeChat?

The generateText function returns a complete AI response, whereas streamText provides real-time partial responses via callbacks, enabling interactive chat assistant experiences in WeChat Mini Programs.