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.