Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ log/
node_modules/

.eslintcache

# Model configuration files
conf/default/app/runtime/model_config.yaml
conf/default/app/runtime/model_runtime_config.yaml
9 changes: 7 additions & 2 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效
# 进入Coze Loop目录下
cd coze-loop
```
2. 配置模型。进入目录 `conf/default/app/runtime/`,编辑文件 `model_config.yaml`,修改 api_key 和 model 字段。以火山方舟为例:
* api_key:火山方舟 API Key,获取方式可参考[获取 API Key](Keyhttps://www.volcengine.com/docs/82379/1541594)。
2. 配置模型。复制模板文件并编辑配置:
```Bash
# 复制模板文件(以火山方舟为例)
cp conf/default/app/runtime/template/model_config_ark_doubao.yaml conf/default/app/runtime/model_config.yaml
```
然后编辑文件 `conf/default/app/runtime/model_config.yaml`,修改 api_key 和 model 字段:
* api_key:火山方舟 API Key,获取方式可参考[获取 API Key](https://www.volcengine.com/docs/82379/1541594)。
* model:火山方舟模型接入点的 Endpoint ID,获取方式可参考[获取 Endpoint](https://www.volcengine.com/docs/82379/1099522)。
3. 启动服务。执行以下命令,使用 Docker Compose 快速部署 Coze Loop 开源版。
```Bash
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ Coze Loop helps developers efficiently develop and operate AI agents by providin
# Enter the Coze Loop directory
cd coze-loop
```
2. Configure the model. Go to the `conf/default/app/runtime/` directory, edit the `model_config.yaml` file, and modify the `api_key` and `model` fields. Taking Volcengine Ark as an example:
2. Configure the model. Copy the template file and edit the configuration:
```Bash
# Copy the template file (taking Volcengine Ark as an example)
cp conf/default/app/runtime/template/model_config_ark_doubao.yaml conf/default/app/runtime/model_config.yaml
```
Then edit the `conf/default/app/runtime/model_config.yaml` file and modify the `api_key` and `model` fields:
* `api_key`: Volcengine Ark API Key. For how to obtain it, please refer to [Get API Key](https://www.volcengine.com/docs/82379/1541594).
* `model`: The Endpoint ID of the Volcengine Ark model access point. For how to obtain it, please refer to [Get Endpoint](https://www.volcengine.com/docs/82379/1099522).
3. Start the service. Execute the following command to quickly deploy the Coze Loop open-source edition using Docker Compose.
Expand Down
31 changes: 31 additions & 0 deletions conf/default/app/runtime/template/model_config_ark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "ark"
protocol_config:
api_key: "" # Change It。 Modify to the API key you have applied for
model: "" # Change It。 Modify to the model ID you have activated
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
31 changes: 31 additions & 0 deletions conf/default/app/runtime/template/model_config_ark_doubao.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
models:
- id: 1
name: "doubao"
frame: "eino"
protocol: "ark"
protocol_config:
api_key: "***"
model: "***"
param_config:
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing temperature makes model output more diverse and creative, while decreasing it makes output more focused on instructions but less diverse. It's recommended not to adjust this simultaneously with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum number of tokens in model output. Typically, 100 tokens equals about 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "Selects the minimum token set with cumulative probability reaching top_p during generation, excluding tokens outside the set, balancing diversity and reasonableness."
type: "float"
min: "0.001"
max: "1.0"
default_val: "0.7"
31 changes: 31 additions & 0 deletions conf/default/app/runtime/template/model_config_arkbot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "arkbot"
protocol_config:
api_key: "" # Change It。 Modify it to the API Key you have applied for
model: "" # Change It。 Modify it to the Model ID you have activated
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
31 changes: 31 additions & 0 deletions conf/default/app/runtime/template/model_config_claude.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "claude"
protocol_config:
api_key: "" # Change It。 Modify to the API Key you have already applied for
model: "" # Change It。 Modify to the model ID you have already activated
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
31 changes: 31 additions & 0 deletions conf/default/app/runtime/template/model_config_deepseek.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "deepseek"
protocol_config:
api_key: "" # Change It。 Modify to the API Key you have already applied for
model: "" # Change It。 Change it to the activated model ID
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
31 changes: 31 additions & 0 deletions conf/default/app/runtime/template/model_config_gemini.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "gemini"
protocol_config:
api_key: "" # Change It。 Change it to the API Key you have applied for
model: "" # Change It。 Change it to the activated model ID
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
32 changes: 32 additions & 0 deletions conf/default/app/runtime/template/model_config_ollama.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "ollama"
protocol_config:
base_url: "" # Change It。 Replace with the Url model deployed
api_key: "" # Change It。 Replace with the API Key you have applied for
model: "" # Change It。 Replace with the model ID you have activated
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
31 changes: 31 additions & 0 deletions conf/default/app/runtime/template/model_config_openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "openai"
protocol_config:
api_key: "" # Change It。 Change to the API Key you have applied for
model: "" # Change It。 Change to the Model ID you have activated
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
30 changes: 30 additions & 0 deletions conf/default/app/runtime/template/model_config_qianfan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "qianfan"
protocol_config:
model: "" # Change It。 Modify to the model ID you have activated.
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
31 changes: 31 additions & 0 deletions conf/default/app/runtime/template/model_config_qwen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
models:
- id: 1 # Change It
name: "your model name" # Change It
frame: "eino"
protocol: "qwen"
protocol_config:
api_key: "" # Change It。 Modify to the API Key you have applied for.
model: "" # Change It。 Modify to the model ID you have activated.
param_config: # Usually no modifications are needed, as this determines which parameters are adjustable on the front end, their adjustable ranges, and default values.
param_schemas:
- name: "temperature"
label: "temperature"
desc: "Increasing the temperature will make the model output more diverse and creative. Conversely, lowering the temperature will make the output more compliant with instructions but less diverse. It is recommended not to adjust together with 'Top p'."
type: "float"
min: "0"
max: "1.0"
default_val: "0.7"
- name: "max_tokens"
label: "max_tokens"
desc: "Controls the maximum length of tokens output by the model. Typically, 100 tokens are approximately equal to 150 Chinese characters."
type: "int"
min: "1"
max: "4096"
default_val: "2048"
- name: "top_p"
label: "top_p"
desc: "During generation, selects the smallest set of tokens whose cumulative probability reaches top_p. Tokens outside the set are excluded, balancing diversity and reasonableness."
type: "float" #
min: "0.001"
max: "1.0"
default_val: "0.7"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
need_cvt_url_to_base_64: true
qianfan_ak: "your_qianfan_ak_here" # required for qianfan model
qianfan_sk: "your_qianfan_sk_here" # required for qianfan model