mirror of
https://github.com/Zippland/Snap-Solver.git
synced 2026-02-22 16:38:03 +08:00
更新模型相关文件,移除自动添加语言指令的逻辑,改为直接使用系统提供的提示词;同时优化下拉菜单的显示位置和交互逻辑,提升用户体验。
This commit is contained in:
@@ -66,11 +66,8 @@ class DeepSeekModel(BaseModel):
|
||||
base_url="https://api.deepseek.com"
|
||||
)
|
||||
|
||||
# 添加系统语言指令
|
||||
# 使用系统提供的系统提示词,不再自动添加语言指令
|
||||
system_prompt = self.system_prompt
|
||||
language = self.language or '中文'
|
||||
if not any(phrase in system_prompt for phrase in ['Please respond in', '请用', '使用', '回答']):
|
||||
system_prompt = f"{system_prompt}\n\n请务必使用{language}回答。"
|
||||
|
||||
# 构建请求参数
|
||||
params = {
|
||||
@@ -244,11 +241,8 @@ class DeepSeekModel(BaseModel):
|
||||
base_url="https://api.deepseek.com"
|
||||
)
|
||||
|
||||
# 检查系统提示词是否已包含语言设置指令
|
||||
# 使用系统提供的系统提示词,不再自动添加语言指令
|
||||
system_prompt = self.system_prompt
|
||||
language = self.language or '中文'
|
||||
if not any(phrase in system_prompt for phrase in ['Please respond in', '请用', '使用', '回答']):
|
||||
system_prompt = f"{system_prompt}\n\n请务必使用{language}回答,无论问题是什么语言。即使在分析图像时也请使用{language}回答。"
|
||||
|
||||
# 构建请求参数
|
||||
params = {
|
||||
|
||||
Reference in New Issue
Block a user