feat: 本地修改 agent.py / run_proxmox / chrome tasks
This commit is contained in:
@@ -722,6 +722,9 @@ class PromptAgent:
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": f"Bearer {os.environ['OPENAI_API_KEY']}"
|
||||
}
|
||||
# Newer GPT models (gpt-5.x, o-series) require max_completion_tokens instead of max_tokens
|
||||
if "max_tokens" in payload:
|
||||
payload["max_completion_tokens"] = payload.pop("max_tokens")
|
||||
logger.info("Generating content with GPT model: %s", self.model)
|
||||
response = requests.post(
|
||||
api_url,
|
||||
|
||||
Reference in New Issue
Block a user