Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 764 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 764 Bytes

Coze Node.js Example

English | 简体中文

This guide will help you quickly set up and run the Coze Node.js example.

Quick Start

1. Install Dependencies

Please refer to the root README.md for dependency installation instructions.

2. Configure Environment

  1. Modify your configuration file:
cd src/config/config.ts
  1. Update the following values in config.ts:
  • COZE_BOT_ID: Your bot ID
  • COZE_BASE_URL: API base URL
  • auth.pat.COZE_API_KEY: Your Coze API key

3. Run the Example

Choose one of the following commands based on your Base URL:

# For China region (api.coze.cn)
COZE_ENV=zh npx tsx ./src/chat.ts

# For Global region (api.coze.com)
npx  tsx ./src/chat.ts