Spaces:
Running
Running
Update app.py
Browse filesreasoning effort added for ox models
app.py
CHANGED
|
@@ -465,6 +465,8 @@ STANDARD_TEXT_MODELS = [
|
|
| 465 |
"o3-mini-2025-01-31",
|
| 466 |
"o3",
|
| 467 |
"o4-mini",
|
|
|
|
|
|
|
| 468 |
"gpt-4o-2024-08-06",
|
| 469 |
"gpt-4o",
|
| 470 |
"gpt-4o-mini-2024-07-18",
|
|
@@ -540,11 +542,15 @@ def conditional_llm(model, api_base=None, api_key=None):
|
|
| 540 |
If api_base is provided, it applies the @llm decorator with api_base.
|
| 541 |
Otherwise, it applies the @llm decorator without api_base.
|
| 542 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 543 |
def decorator(func):
|
| 544 |
if api_base:
|
| 545 |
-
return llm(model=model, api_base=api_base)(func)
|
| 546 |
else:
|
| 547 |
-
return llm(model=model, api_key=api_key)(func)
|
| 548 |
return decorator
|
| 549 |
|
| 550 |
def generate_audio(
|
|
|
|
| 465 |
"o3-mini-2025-01-31",
|
| 466 |
"o3",
|
| 467 |
"o4-mini",
|
| 468 |
+
"gpt-4.1",
|
| 469 |
+
"gpt-4.1-mini",
|
| 470 |
"gpt-4o-2024-08-06",
|
| 471 |
"gpt-4o",
|
| 472 |
"gpt-4o-mini-2024-07-18",
|
|
|
|
| 542 |
If api_base is provided, it applies the @llm decorator with api_base.
|
| 543 |
Otherwise, it applies the @llm decorator without api_base.
|
| 544 |
"""
|
| 545 |
+
reasoning={
|
| 546 |
+
"effort": "high",
|
| 547 |
+
"summary": "auto"
|
| 548 |
+
},
|
| 549 |
def decorator(func):
|
| 550 |
if api_base:
|
| 551 |
+
return llm(model=model, api_base=api_base, reasoning=reasoning)(func)
|
| 552 |
else:
|
| 553 |
+
return llm(model=model, api_key=api_key, reasoning=reasoning)(func)
|
| 554 |
return decorator
|
| 555 |
|
| 556 |
def generate_audio(
|