mirror of
https://github.com/Zippland/Snap-Solver.git
synced 2026-02-22 08:28:15 +08:00
更新模型相关文件,移除自动添加语言指令的逻辑,改为直接使用系统提供的提示词;同时优化下拉菜单的显示位置和交互逻辑,提升用户体验。
This commit is contained in:
@@ -126,11 +126,8 @@ class OpenAIModel(BaseModel):
|
||||
# Initialize OpenAI client
|
||||
client = OpenAI(api_key=self.api_key)
|
||||
|
||||
# 检查系统提示词是否已包含语言设置指令
|
||||
# 使用系统提供的系统提示词,不再自动添加语言指令
|
||||
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}回答。"
|
||||
|
||||
# Prepare messages with image
|
||||
messages = [
|
||||
|
||||
Reference in New Issue
Block a user