1. 修复豆包系统提示词不起作用问题,以及输出格式渲染不正确问题;

2. 截图支持窗口大小与位置记忆,并在完成截图后默认发送给AI;
3. 调整页面布局,适合盲按开始截图,结果窗口置于截图之上.
This commit is contained in:
Gnoloah
2025-09-12 12:06:35 +08:00
parent acdfca54b1
commit 4921d98d0a
7 changed files with 354 additions and 82 deletions

View File

@@ -74,9 +74,16 @@ class DoubaoModel(BaseModel):
"Content-Type": "application/json"
}
# 构建消息 - 根据官方API文档暂时不使用系统提示词
# 构建消息 - 添加系统提示词
messages = []
# 添加系统提示词
if self.system_prompt:
messages.append({
"role": "system",
"content": self.system_prompt
})
# 添加用户查询
user_content = text
if self.language and self.language != 'auto':
@@ -221,6 +228,16 @@ class DoubaoModel(BaseModel):
elif image_data.startswith('iVBORw0KGgo'): # PNG magic number in base64
image_format = "png"
# 构建消息
messages = []
# 添加系统提示词
if self.system_prompt:
messages.append({
"role": "system",
"content": self.system_prompt
})
user_content = [
{
"type": "text",
@@ -234,12 +251,10 @@ class DoubaoModel(BaseModel):
}
]
messages = [
{
"role": "user",
"content": user_content
}
]
messages.append({
"role": "user",
"content": user_content
})
# 处理推理配置
thinking = {

View File

@@ -53,7 +53,7 @@ class GoogleModel(BaseModel):
def get_model_identifier(self) -> str:
"""返回默认的模型标识符"""
return "gemini-2.5-flash" # 使用有免费配额的模型作为默认值
return "gemini-2.0-flash" # 使用有免费配额的模型作为默认值
def analyze_text(self, text: str, proxies: dict = None) -> Generator[dict, None, None]:
"""流式生成文本响应"""