From 41ec5f0daff489b3e34a2c9e4cde48b89ac93eb4 Mon Sep 17 00:00:00 2001 From: TriangleMesh Date: Mon, 28 Jul 2025 02:45:30 -0700 Subject: [PATCH] docs: improve model configuration instructions and update .gitignore - Update README.md and README.cn.md to clarify model configuration steps - Add clear instructions to copy template files from the correct path - Specify full file paths to avoid confusion about working directory - Add model_config and model_runtime_config files to .gitignore to prevent accidental commits of sensitive configuration data - Add template configuration files for various model providers The changes make the setup process clearer for new users by: 1. Showing the exact cp command with full paths 2. Removing ambiguous directory navigation instructions 3. Protecting sensitive config files from being committed 4. Providing template files for different model providers --- .gitignore | 4 +++ README.cn.md | 9 ++++-- README.md | 7 +++- .../runtime/template/model_config_ark.yaml | 31 ++++++++++++++++++ .../template/model_config_ark_doubao.yaml | 31 ++++++++++++++++++ .../runtime/template/model_config_arkbot.yaml | 31 ++++++++++++++++++ .../runtime/template/model_config_claude.yaml | 31 ++++++++++++++++++ .../template/model_config_deepseek.yaml | 31 ++++++++++++++++++ .../runtime/template/model_config_gemini.yaml | 31 ++++++++++++++++++ .../runtime/template/model_config_ollama.yaml | 32 +++++++++++++++++++ .../runtime/template/model_config_openai.yaml | 31 ++++++++++++++++++ .../template/model_config_qianfan.yaml | 30 +++++++++++++++++ .../runtime/template/model_config_qwen.yaml | 31 ++++++++++++++++++ .../model_runtime_config_qianfan.yaml | 3 ++ 14 files changed, 330 insertions(+), 3 deletions(-) create mode 100644 conf/default/app/runtime/template/model_config_ark.yaml create mode 100644 conf/default/app/runtime/template/model_config_ark_doubao.yaml create mode 100644 conf/default/app/runtime/template/model_config_arkbot.yaml create mode 100644 conf/default/app/runtime/template/model_config_claude.yaml create mode 100644 conf/default/app/runtime/template/model_config_deepseek.yaml create mode 100644 conf/default/app/runtime/template/model_config_gemini.yaml create mode 100644 conf/default/app/runtime/template/model_config_ollama.yaml create mode 100644 conf/default/app/runtime/template/model_config_openai.yaml create mode 100644 conf/default/app/runtime/template/model_config_qianfan.yaml create mode 100644 conf/default/app/runtime/template/model_config_qwen.yaml create mode 100644 conf/default/app/runtime/template/model_runtime_config_qianfan.yaml diff --git a/.gitignore b/.gitignore index 165763600..114be0fd1 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/README.cn.md b/README.cn.md index 9c3e0a5b5..b2e38289c 100644 --- a/README.cn.md +++ b/README.cn.md @@ -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 diff --git a/README.md b/README.md index 8f059bf95..4a5dd5305 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/conf/default/app/runtime/template/model_config_ark.yaml b/conf/default/app/runtime/template/model_config_ark.yaml new file mode 100644 index 000000000..5bb857948 --- /dev/null +++ b/conf/default/app/runtime/template/model_config_ark.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_ark_doubao.yaml b/conf/default/app/runtime/template/model_config_ark_doubao.yaml new file mode 100644 index 000000000..2aab6ca79 --- /dev/null +++ b/conf/default/app/runtime/template/model_config_ark_doubao.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_arkbot.yaml b/conf/default/app/runtime/template/model_config_arkbot.yaml new file mode 100644 index 000000000..16129116e --- /dev/null +++ b/conf/default/app/runtime/template/model_config_arkbot.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_claude.yaml b/conf/default/app/runtime/template/model_config_claude.yaml new file mode 100644 index 000000000..62b336803 --- /dev/null +++ b/conf/default/app/runtime/template/model_config_claude.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_deepseek.yaml b/conf/default/app/runtime/template/model_config_deepseek.yaml new file mode 100644 index 000000000..c96cce7c4 --- /dev/null +++ b/conf/default/app/runtime/template/model_config_deepseek.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_gemini.yaml b/conf/default/app/runtime/template/model_config_gemini.yaml new file mode 100644 index 000000000..6bde1a214 --- /dev/null +++ b/conf/default/app/runtime/template/model_config_gemini.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_ollama.yaml b/conf/default/app/runtime/template/model_config_ollama.yaml new file mode 100644 index 000000000..c7d4e5c36 --- /dev/null +++ b/conf/default/app/runtime/template/model_config_ollama.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_openai.yaml b/conf/default/app/runtime/template/model_config_openai.yaml new file mode 100644 index 000000000..1e1e606de --- /dev/null +++ b/conf/default/app/runtime/template/model_config_openai.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_qianfan.yaml b/conf/default/app/runtime/template/model_config_qianfan.yaml new file mode 100644 index 000000000..4e2751dea --- /dev/null +++ b/conf/default/app/runtime/template/model_config_qianfan.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_config_qwen.yaml b/conf/default/app/runtime/template/model_config_qwen.yaml new file mode 100644 index 000000000..7979928ad --- /dev/null +++ b/conf/default/app/runtime/template/model_config_qwen.yaml @@ -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" diff --git a/conf/default/app/runtime/template/model_runtime_config_qianfan.yaml b/conf/default/app/runtime/template/model_runtime_config_qianfan.yaml new file mode 100644 index 000000000..285eea9fe --- /dev/null +++ b/conf/default/app/runtime/template/model_runtime_config_qianfan.yaml @@ -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