feat: 本地修改 agent.py / run_proxmox / chrome tasks

This commit is contained in:
2026-03-19 14:49:39 +08:00
parent fe1bdae9a6
commit 970d430dcf
16 changed files with 707 additions and 4 deletions

View File

@@ -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,