Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -26,10 +26,10 @@ def chat_with_model(query: str, model: str) -> JSONResponse:
|
|
26 |
async def chat(query: str) -> JSONResponse:
|
27 |
results = None
|
28 |
try:
|
29 |
-
return
|
30 |
except Exception as e:
|
31 |
try:
|
32 |
-
return
|
33 |
except Exception as e:
|
34 |
return JSONResponse(content={"error": str(e)})
|
35 |
|
|
|
26 |
async def chat(query: str) -> JSONResponse:
|
27 |
results = None
|
28 |
try:
|
29 |
+
return DDGS().chat(query, model='gpt-4o-mini')
|
30 |
except Exception as e:
|
31 |
try:
|
32 |
+
return DDGS().chat(query, model='claude-3-haiku')
|
33 |
except Exception as e:
|
34 |
return JSONResponse(content={"error": str(e)})
|
35 |
|