This commit is contained in:
taylorxie
2025-08-11 14:31:08 +08:00
parent ba962297f1
commit 17c18b48dc

View File

@@ -36,7 +36,12 @@ class OpenAi(Platform):
}
if 'max_tokens' in self.config and self.max_tokens:
data["max_tokens"] = self.max_tokens
# 如果是gpt5的就用max_completion_tokens
if 'gpt-5' in self.model:
data["max_completion_tokens"] = self.max_tokens
else:
# 如果是gpt4之前的就是用max_tokens
data["max_tokens"] = self.max_tokens
if 'temperature' in self.config and self.temperature:
data["temperature"] = self.temperature