ai-model-web

Installation
Summary

AI text generation and streaming for browser applications via CloudBase SDK.

  • Supports two providers: Hunyuan (recommended: hunyuan-2.0-instruct-20251111) and DeepSeek (recommended: deepseek-v3.2)
  • Two core methods: generateText() for non-streaming responses and streamText() for incremental text chunks with async iteration
  • Requires @cloudbase/js-sdk initialization with anonymous authentication and publishable API key from CloudBase console
  • Not suitable for Node.js backends, WeChat Mini Programs, or image generation; use alternative skills for those contexts
SKILL.md

Standalone Install Note

If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.

  • CloudBase main entry: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md
  • Current skill raw source: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/ai-model-web/SKILL.md

Keep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool or web-development, use the standalone fallback URL shown next to that reference.

When to use this skill

Use this skill for calling AI models in browser/Web applications via @cloudbase/js-sdk.

🧭 Runtime-plane default for Web. Any time the user's request is framed around a page, a Web app, the frontend, React/Vue/Next/Nuxt, a dashboard UI, or "add AI to my H5", this skill is the default routing target. Do NOT first propose a Node.js / cloud-function / CloudRun proxy; @cloudbase/js-sdk can call the model from the browser directly. Only switch to ai-model-nodejs if the user explicitly asks for a backend/server call, image generation, or a scenario that truly needs server-side keys or long-running work. This decision is independent of which concrete model the user picks — model names (deepseek-*, glm-*, hunyuan-*, kimi-*, …) only affect the model field, not the routing plane.

Use it when you need to:

Related skills

More from tencentcloudbase/skills

Installs
718
GitHub Stars
58
First Seen
Jan 22, 2026