Spaces:
Paused
Paused
Fix: Strip unsupported payload parameters for Google Gemini OpenAI-compatible proxy
Browse files
tinytroupe/openai_utils.py
CHANGED
|
@@ -287,6 +287,10 @@ class OpenAIClient:
|
|
| 287 |
del chat_api_params["response_format"]
|
| 288 |
if "reasoning_effort" in chat_api_params:
|
| 289 |
del chat_api_params["reasoning_effort"]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
if "max_completion_tokens" in chat_api_params:
|
| 291 |
chat_api_params["max_tokens"] = chat_api_params.pop("max_completion_tokens")
|
| 292 |
|
|
|
|
| 287 |
del chat_api_params["response_format"]
|
| 288 |
if "reasoning_effort" in chat_api_params:
|
| 289 |
del chat_api_params["reasoning_effort"]
|
| 290 |
+
if "frequency_penalty" in chat_api_params:
|
| 291 |
+
del chat_api_params["frequency_penalty"]
|
| 292 |
+
if "presence_penalty" in chat_api_params:
|
| 293 |
+
del chat_api_params["presence_penalty"]
|
| 294 |
if "max_completion_tokens" in chat_api_params:
|
| 295 |
chat_api_params["max_tokens"] = chat_api_params.pop("max_completion_tokens")
|
| 296 |
|