Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -507,6 +507,7 @@ async def followup_agent(query: FollowupQueryModel, background_tasks: Background
|
|
507 |
logger.info(f"Completed followup agent response for query: {query.query}, send result: {result}")
|
508 |
|
509 |
return StreamingResponse(process_response(), media_type="text/event-stream")
|
|
|
510 |
@app.post("/v2/followup-tools-agent")
|
511 |
def followup_agent(query: FollowupQueryModel, background_tasks: BackgroundTasks, api_key: str = Depends(verify_api_key)):
|
512 |
"""
|
@@ -721,7 +722,7 @@ async def followup_agent(query: FollowupQueryModel, background_tasks: Background
|
|
721 |
|
722 |
|
723 |
@app.post("v2/digiyatra-followup")
|
724 |
-
async def
|
725 |
"""
|
726 |
Followup agent endpoint that provides helpful responses or generates clarifying questions based on user queries.
|
727 |
Requires API Key authentication via X-API-Key header.
|
@@ -747,8 +748,7 @@ async def followup_agent_v2(query: FollowupQueryModel, background_tasks: Backgro
|
|
747 |
|
748 |
logger.info(f"LLM RAW response for query: {query.query}: {full_response}")
|
749 |
response_content, interact,tools = parse_followup_and_tools(full_response)
|
750 |
-
|
751 |
-
|
752 |
result = {
|
753 |
"response": response_content,
|
754 |
"clarification": interact
|
@@ -763,6 +763,7 @@ async def followup_agent_v2(query: FollowupQueryModel, background_tasks: Backgro
|
|
763 |
logger.info(f"Completed followup agent response for query: {query.query}, send result: {result}")
|
764 |
|
765 |
return StreamingResponse(process_response(), media_type="text/event-stream")
|
|
|
766 |
|
767 |
|
768 |
from fastapi.middleware.cors import CORSMiddleware
|
|
|
507 |
logger.info(f"Completed followup agent response for query: {query.query}, send result: {result}")
|
508 |
|
509 |
return StreamingResponse(process_response(), media_type="text/event-stream")
|
510 |
+
|
511 |
@app.post("/v2/followup-tools-agent")
|
512 |
def followup_agent(query: FollowupQueryModel, background_tasks: BackgroundTasks, api_key: str = Depends(verify_api_key)):
|
513 |
"""
|
|
|
722 |
|
723 |
|
724 |
@app.post("v2/digiyatra-followup")
|
725 |
+
async def digi_followup_agent_v2(query: FollowupQueryModel, background_tasks: BackgroundTasks, api_key: str = Depends(verify_api_key)):
|
726 |
"""
|
727 |
Followup agent endpoint that provides helpful responses or generates clarifying questions based on user queries.
|
728 |
Requires API Key authentication via X-API-Key header.
|
|
|
748 |
|
749 |
logger.info(f"LLM RAW response for query: {query.query}: {full_response}")
|
750 |
response_content, interact,tools = parse_followup_and_tools(full_response)
|
751 |
+
|
|
|
752 |
result = {
|
753 |
"response": response_content,
|
754 |
"clarification": interact
|
|
|
763 |
logger.info(f"Completed followup agent response for query: {query.query}, send result: {result}")
|
764 |
|
765 |
return StreamingResponse(process_response(), media_type="text/event-stream")
|
766 |
+
|
767 |
|
768 |
|
769 |
from fastapi.middleware.cors import CORSMiddleware
|