Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ from typing import Generator, Any, Dict, List, Optional
|
|
12 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
13 |
|
14 |
# -------------------- External Model Call (with Caching and Retry) --------------------
|
15 |
-
async def call_model(prompt: str, model: str = "gpt-4o", api_key: str = None, max_retries: int =
|
16 |
if api_key is None:
|
17 |
api_key = os.getenv("OPENAI_API_KEY")
|
18 |
if api_key is None:
|
|
|
12 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
13 |
|
14 |
# -------------------- External Model Call (with Caching and Retry) --------------------
|
15 |
+
async def call_model(prompt: str, model: str = "gpt-4o", api_key: str = None, max_retries: int = 5) -> str:
|
16 |
if api_key is None:
|
17 |
api_key = os.getenv("OPENAI_API_KEY")
|
18 |
if api_key is None:
|