```
feat(api): 添加模型类型判断逻辑以排除图像模型 - 提取model_value.toLowerCase()到变量model_lower中以避免重复计算 - 在判断聊天模型时增加对'image'关键词的检查,排除图像模型 - 修复了原有逻辑中可能将图像模型误判为聊天模型的问题 ```
This commit is contained in:
parent
85fb484bfa
commit
4a892f391c
@ -72,7 +72,8 @@ def generate():
|
||||
|
||||
model_value = data.get('model')
|
||||
prompt = data.get('prompt')
|
||||
is_chat_model = "gemini" in model_value.lower() or "gpt" in model_value.lower()
|
||||
model_lower = model_value.lower()
|
||||
is_chat_model = ("gemini" in model_lower or "gpt" in model_lower) and "image" not in model_lower
|
||||
|
||||
# 3. 处理聊天模型 (同步)
|
||||
if is_chat_model:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user