fix:修复兴趣集未清空,模型失败导致planer失败,绘图插件配置文件问题
This commit is contained in:
@@ -1,20 +1,15 @@
|
||||
import os
|
||||
|
||||
CONFIG_CONTENT = """\
|
||||
# 请替换为您的火山引擎 Access Key ID
|
||||
volcano_ak = "YOUR_VOLCANO_ENGINE_ACCESS_KEY_ID_HERE"
|
||||
# 请替换为您的火山引擎 Secret Access Key
|
||||
volcano_sk = "YOUR_VOLCANO_ENGINE_SECRET_ACCESS_KEY_HERE"
|
||||
# 火山方舟 API 的基础 URL
|
||||
base_url = "https://ark.cn-beijing.volces.com/api/v3"
|
||||
# 用于图片生成的API密钥
|
||||
volcano_generate_api_key = "YOUR_VOLCANO_GENERATE_API_KEY_HERE"
|
||||
# 默认图片生成模型
|
||||
default_model = "doubao-seedream-3-0-t2i-250415"
|
||||
# 默认图片尺寸
|
||||
default_size = "1024x1024"
|
||||
# 用于图片生成的API密钥
|
||||
# PicAction 当前配置为在HTTP请求体和Authorization头中使用此密钥。
|
||||
# 如果您的API认证方式不同,请相应调整或移除。
|
||||
volcano_generate_api_key = "YOUR_VOLCANO_GENERATE_API_KEY_HERE"
|
||||
|
||||
|
||||
# 是否默认开启水印
|
||||
default_watermark = true
|
||||
@@ -38,7 +33,7 @@ def generate_config():
|
||||
with open(config_file_path, "w", encoding="utf-8") as f:
|
||||
f.write(CONFIG_CONTENT)
|
||||
print(f"配置文件已生成: {config_file_path}")
|
||||
print("请记得编辑该文件,填入您的火山引擎 AK/SK 和 API 密钥。")
|
||||
print("请记得编辑该文件,填入您的火山引擎API 密钥。")
|
||||
except IOError as e:
|
||||
print(f"错误:无法写入配置文件 {config_file_path}。原因: {e}")
|
||||
else:
|
||||
|
||||
@@ -22,7 +22,7 @@ class PicAction(PluginAction):
|
||||
"""根据描述使用火山引擎HTTP API生成图片的动作处理类"""
|
||||
|
||||
action_name = "pic_action"
|
||||
action_description = "可以根据特定的描述,使用火山引擎模型生成并发送一张图片 (通过HTTP API)"
|
||||
action_description = "可以根据特定的描述,生成并发送一张图片,如果没提供描述,就根据聊天内容生成"
|
||||
action_parameters = {
|
||||
"description": "图片描述,输入你想要生成并发送的图片的描述,必填",
|
||||
"size": "图片尺寸,例如 '1024x1024' (可选, 默认从配置或 '1024x1024')",
|
||||
@@ -31,7 +31,7 @@ class PicAction(PluginAction):
|
||||
"当有人要求你生成并发送一张图片时使用",
|
||||
"当有人让你画一张图时使用",
|
||||
]
|
||||
default = False
|
||||
default = True
|
||||
action_config_file_name = "pic_action_config.toml"
|
||||
|
||||
def __init__(
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# 请替换为您的火山引擎 Access Key ID
|
||||
volcano_ak = "YOUR_VOLCANO_ENGINE_ACCESS_KEY_ID_HERE"
|
||||
# 请替换为您的火山引擎 Secret Access Key
|
||||
volcano_sk = "YOUR_VOLCANO_ENGINE_SECRET_ACCESS_KEY_HERE"
|
||||
# 火山方舟 API 的基础 URL
|
||||
base_url = "https://ark.cn-beijing.volces.com/api/v3"
|
||||
# 默认图片生成模型
|
||||
default_model = "doubao-seedream-3-0-t2i-250415"
|
||||
# 默认图片尺寸
|
||||
default_size = "1024x1024"
|
||||
# 用于图片生成的API密钥
|
||||
# PicAction 当前配置为在HTTP请求体和Authorization头中使用此密钥。
|
||||
# 如果您的API认证方式不同,请相应调整或移除。
|
||||
volcano_generate_api_key = "YOUR_VOLCANO_GENERATE_API_KEY_HERE"
|
||||
|
||||
# 是否默认开启水印
|
||||
default_watermark = true
|
||||
# 默认引导强度
|
||||
default_guidance_scale = 2.5
|
||||
# 默认随机种子
|
||||
default_seed = 42
|
||||
|
||||
# 更多插件特定配置可以在此添加...
|
||||
# custom_parameter = "some_value"
|
||||
Reference in New Issue
Block a user