🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -198,7 +198,7 @@ class BotConfig:
|
||||
heart_flow_update_interval: int = 300 # 心流更新频率,间隔 单位秒
|
||||
observation_context_size: int = 20 # 心流观察到的最长上下文大小,超过这个值的上下文会被压缩
|
||||
compressed_length: int = 5 # 不能大于observation_context_size,心流上下文压缩的最短压缩长度,超过心流观察到的上下文长度,会压缩,最短压缩长度为5
|
||||
compress_length_limit: int = 5 #最多压缩份数,超过该数值的压缩上下文会被删除
|
||||
compress_length_limit: int = 5 # 最多压缩份数,超过该数值的压缩上下文会被删除
|
||||
|
||||
# willing
|
||||
willing_mode: str = "classical" # 意愿模式
|
||||
@@ -447,9 +447,7 @@ class BotConfig:
|
||||
config.observation_context_size = heartflow_config.get(
|
||||
"observation_context_size", config.observation_context_size
|
||||
)
|
||||
config.compressed_length = heartflow_config.get(
|
||||
"compressed_length", config.compressed_length
|
||||
)
|
||||
config.compressed_length = heartflow_config.get("compressed_length", config.compressed_length)
|
||||
config.compress_length_limit = heartflow_config.get(
|
||||
"compress_length_limit", config.compress_length_limit
|
||||
)
|
||||
@@ -502,7 +500,15 @@ class BotConfig:
|
||||
|
||||
# base_url 的例子: SILICONFLOW_BASE_URL
|
||||
# key 的例子: SILICONFLOW_KEY
|
||||
cfg_target = {"name": "", "base_url": "", "key": "", "stream": False, "pri_in": 0, "pri_out": 0, "temp": 0.7}
|
||||
cfg_target = {
|
||||
"name": "",
|
||||
"base_url": "",
|
||||
"key": "",
|
||||
"stream": False,
|
||||
"pri_in": 0,
|
||||
"pri_out": 0,
|
||||
"temp": 0.7,
|
||||
}
|
||||
|
||||
if config.INNER_VERSION in SpecifierSet("<=0.0.0"):
|
||||
cfg_target = cfg_item
|
||||
@@ -515,7 +521,7 @@ class BotConfig:
|
||||
stable_item.append("stream")
|
||||
|
||||
pricing_item = ["pri_in", "pri_out"]
|
||||
|
||||
|
||||
# 从配置中原始拷贝稳定字段
|
||||
for i in stable_item:
|
||||
# 如果 字段 属于计费项 且获取不到,那默认值是 0
|
||||
|
||||
Reference in New Issue
Block a user