coze_studio_004_☆_部署开发
本文介绍了如何快速部署和使用开源版Coze Studio的步骤: 环境准备:确保系统满足最低配置要求(2核CPU、4GB内存),需预装Docker和Docker Compose。 部署流程: 克隆项目代码 配置模型文件(复制模板并修改关键参数) 设置模型ID、API密钥和模型名称 区分中国境内(使用火山引擎方舟)和境外用户(使用火山视界ModelArk) 服务启动:执行docker compose
一、快速开始
Learn how to obtain
and deploy
the open-source version of Coze Studio
, quickly build projects
, and experience Coze Studio’s open-source version
.
了解如何
获取
并部署扣子工作室
开源版,
快速构建
项目
,
体验
扣子工作室
的开源版。
Environment requirements:
Before installing Coze Studio
, please ensure that your machine meets the following minimum system requirements
: 2 Core、4 GB
Pre-install
Docker and Docker Compose, and start the Docker service
.
环境要求:
在安装
扣子工作室
之前,请确保您的机器满足以下最低系统要求
:2核、4GB
预安装
Docker 和 Docker Compose,并启动Docker服务
。
二、部署步骤
(一) 检索源代码
# Clone code
git clone https://github.com/coze-dev/coze-studio.git
(二) 配置模型
(1) 复制模型配置文件
Copy the template files
of the doubao-seed-1.6
model from the template directory
and paste them into the configuration file directory
.
从
模板目录
复制doubao-seed -1.6
模型的模板文件
,
并粘贴到
配置文件目录
中。
cd coze-studio
# Copy model configuration template
cp backend/conf/model/template/model_template_ark_doubao-seed-1.6.yaml backend/conf/model/ark_doubao-seed-1.6.yaml
(2) 修改模型配置文件
2、Modify the template file
in the configuration file directory
.
2、修改
配置文件目录
中的模板文件
。
Enter the directory backend/conf/model
.
Open the file ark_doubao-seed-1.6.yaml
.
进入
backend/conf/model
目录。
打开
ark_doubao-seed-1.6.yaml
文件。
2、Set the fields id
, meta.conn_config.api_key
, meta.conn_config.model
, and save the file.
2、设置
id
、meta.conn_config.api_key
、meta.conn_config.model
字段,然后保存文件。
id: The model ID
in Coze Studio
, defined by the developer
, must be a non-zero integer and globally unique
.
Agents
or workflows
call models based on model IDs
.
For models that have already been launched
, do not modify their IDs; otherwise, it may result in model call failures
.
id:
扣子工作室
中的模型ID
,由开发者
定义,必须是非零整数且全局唯一
。
智能体
或工作流
基于模型ID
调用模型。
对于已经
上线
的模型,请勿修改其ID;否则可能导致模型调用失败
。
meta.conn_config.api_key
The API Key
for the model service
.
用于
模型服务
的API密钥
。
In this example, it is the API Key
for Ark API Key
.
在此示例中,它是
Ark API密钥
的API密钥
。
For more information, see Get Volcengine Ark API Key or Get BytePlus ModelArk API Key.
如需更多信息,请参阅 获取火山引擎方舟API密钥 或 获取火山视界ModelArk API密钥。
meta.conn_config.model
The Model name
for the model service
.
In this example, it refers to the Model ID
or Endpoint ID of Ark
.
For more information, see Get Volcengine Ark Model ID / Get Volcengine Ark Endpoint ID or Get BytePlus ModelArk Model ID / Get BytePlus ModelArk Endpoint ID.
模型服务
的模型名称
。
在此示例中,它指的是
方舟的模型ID
或端点ID
。
如需更多信息,请参阅 获取火山引擎方舟模型ID/获取火山引擎方舟端点ID 或 获取火山视界ModelArk模型ID/获取火山视界ModelArk端点ID。
For users in China, you may use Volcengine Ark
; for users outside China, you may use BytePlus ModelArk
instead.
对于中国境内用户,可使用
火山引擎方舟
;对于中国境外用户,可改用火山视界ModelArk
。
(三) 部署和启动服务
3、Deploy and start the service.
When deploying and starting Coze Studio
for the first time, it may take a while
to retrieve images
and build local images
.
Please be patient.
During deployment, you will see the following log information
.
If you see the message Container coze-server Started
, it means the Coze Studio
service has started successfully.
3、部署并启动服务。
首次部署并启动
扣子工作室
时,可能需要一些时间
来拉取镜像
并构建本地镜像
。
请耐心等待。
部署过程中,您会看到
以下日志信息
。
如果看到消息
Container coze - server Started
,则意味着扣子工作室
服务已成功启动。
# Start the service
cd docker
cp .env.example .env
docker compose up -d
For common startup failure issues
,
please refer to the FAQ.
对于常见的
启动失败问题
,
请参考 常见问题解答 。
4、 After starting the service,
you can open Coze Studio
by accessing http://localhost:8888/
through your browser.
4、服务启动后,
你可以通过浏览器访问
http://localhost:8888/
打开扣子工作室
。
[!WARNING]
If you want to deploy Coze Studio
in a public network environment
, it is recommended to assess security risks
before you begin, and take corresponding protection measures
.
如果你想在
公网环境
中部署扣子工作室
,建议在开始前评估安全风险
,并采取相应的保护措施
。
Possible security risks include account registration functions
, Python execution environments
in workflow code nodes
, Coze Server listening address configurations
, SSRF (Server - Side Request Forgery)
, and some horizontal privilege escalations
in APIs.
可能存在的安全风险包括
账号注册功能
、工作流代码节点
中的Python执行环境
、Coze Server监听地址配置
、SSRF(服务器端请求伪造)
以及API中的某些水平权限提升
。
For more details, refer to Quickstart.
更多详细信息,请参考快速入门。
三、开发者指南
Project Configuration - 项目配置
Model Configuration: Before deploying
the open-source version of Coze Studio
, you must configure the model service
. Otherwise, you cannot select models
when building agents
, workflows
, and apps
.
模型配置:在
部署
扣子工作室
开源版本之前,你必须配置模型服务
。否则,在构建智能体
、工作流
和应用程序
时,你无法选择模型
。
Plugin Configuration: To use official plugins
from the plugin store
, you must first configure
the plugins and add the authentication keys
for third-party services
.
插件配置:要使用
插件商店
中的官方插件
,你必须首先配置
插件,并添加第三方服务
的认证密钥
。
Basic Component Configuration: Learn how to configure components
such as image uploaders
to use functions like image uploading
in Coze Studio .
基础组件配置:了解如何配置
图像上传器
等组件
,以便在扣子工作室中使用图像上传
等功能。
API Reference: The Coze Studio Community Edition API
and Chat SDK
are authenticated using Personal Access Token
, providing APIs
for conversations
and workflows
.
API参考:
扣子工作室社区版API
和聊天SDK
使用个人访问令牌
进行身份验证,为对话
和工作流
提供API
。
开发指南:
Project Architecture: Learn about the technical architecture
and core components
of the open-source version of Coze Studio
.
项目架构:了解
扣子工作室
开源版本的技术架构
和核心组件
。
Code Development and Testing: Learn how to perform secondary development
and testing
based on the open-source version of Coze Studio
.
代码开发与测试:学习如何基于
扣子工作室开源版本
进行二次开发
和测试
。
Troubleshooting: Learn how to view container states
and system logs
.
故障排除:学习如何查看
容器状态
和系统日志
。
更多推荐
所有评论(0)