English | 简体中文
This guide will help you quickly set up and run the Coze Node.js example.
Please refer to the root README.md for dependency installation instructions.
- Modify your configuration file:
cd src/config/config.ts
- Update the following values in
config.ts
:
COZE_BOT_ID
: Your bot IDCOZE_BASE_URL
: API base URLauth.pat.COZE_API_KEY
: Your Coze API key
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