Update app.py
Browse files
app.py
CHANGED
@@ -164,7 +164,7 @@ async def answers(q: str, proxy: Optional[str] = None):
|
|
164 |
@app.get("/api/chat")
|
165 |
async def chat(
|
166 |
q: str,
|
167 |
-
model: str = "gpt-
|
168 |
proxy: Optional[str] = None
|
169 |
):
|
170 |
"""Perform a text search."""
|
@@ -378,7 +378,7 @@ async def website_summarizer(url: str, proxy: Optional[str] = None):
|
|
378 |
# Use chat model to summarize the extracted text
|
379 |
with WEBS(proxy=proxy) as webs:
|
380 |
summary_prompt = f"Summarize this in detail in Paragraph: {visible_text}"
|
381 |
-
summary_result = webs.chat(keywords=summary_prompt, model="gpt-
|
382 |
|
383 |
# Return the summary result
|
384 |
return JSONResponse(content=jsonable_encoder({summary_result}))
|
|
|
164 |
@app.get("/api/chat")
|
165 |
async def chat(
|
166 |
q: str,
|
167 |
+
model: str = "gpt-4o-mini",
|
168 |
proxy: Optional[str] = None
|
169 |
):
|
170 |
"""Perform a text search."""
|
|
|
378 |
# Use chat model to summarize the extracted text
|
379 |
with WEBS(proxy=proxy) as webs:
|
380 |
summary_prompt = f"Summarize this in detail in Paragraph: {visible_text}"
|
381 |
+
summary_result = webs.chat(keywords=summary_prompt, model="gpt-4o-mini")
|
382 |
|
383 |
# Return the summary result
|
384 |
return JSONResponse(content=jsonable_encoder({summary_result}))
|