Spaces:
Paused
Paused
remove perplexity
Browse files
main.py
CHANGED
|
@@ -520,7 +520,9 @@ async def chat_endpoint(request: ChatRequest):
|
|
| 520 |
Here is the conversation history of past {ncon} conversations: {chat_history_str}, use this very wisely to extract the best out of them and then follow the goal and focus to guide the user further
|
| 521 |
If you recieve nothing as goal and focus that means convessation has just started shaping
|
| 522 |
Based on user current input, the current topic and goal, and the RAG output, provide a response. It could be anything, maybe a question a follow up you've to carefully decide on that
|
| 523 |
-
Also, remember don't tell/reveal the user about the topic and goal thing, that is only for you to follow a certain path. The response to user should look very natural
|
|
|
|
|
|
|
| 524 |
"""
|
| 525 |
|
| 526 |
response = llm.invoke(context_response)
|
|
@@ -566,8 +568,8 @@ async def chat_endpoint(request: ChatRequest):
|
|
| 566 |
return ChatResponse(
|
| 567 |
response=ai_response_text,
|
| 568 |
topic=parsed_json.get("Topic", "Unknown"),
|
| 569 |
-
goal=parsed_json.get("Goal", "Unknown")
|
| 570 |
-
resources=resources_list
|
| 571 |
)
|
| 572 |
|
| 573 |
except Exception as e:
|
|
|
|
| 520 |
Here is the conversation history of past {ncon} conversations: {chat_history_str}, use this very wisely to extract the best out of them and then follow the goal and focus to guide the user further
|
| 521 |
If you recieve nothing as goal and focus that means convessation has just started shaping
|
| 522 |
Based on user current input, the current topic and goal, and the RAG output, provide a response. It could be anything, maybe a question a follow up you've to carefully decide on that
|
| 523 |
+
Also, remember don't tell/reveal the user about the topic and goal thing, that is only for you to follow a certain path. The response to user should look very natural
|
| 524 |
+
|
| 525 |
+
Keep the responses short, to the point following the topic and goal of discussion, don't give out long text until and unless there is something to explain to user in deep.
|
| 526 |
"""
|
| 527 |
|
| 528 |
response = llm.invoke(context_response)
|
|
|
|
| 568 |
return ChatResponse(
|
| 569 |
response=ai_response_text,
|
| 570 |
topic=parsed_json.get("Topic", "Unknown"),
|
| 571 |
+
goal=parsed_json.get("Goal", "Unknown")
|
| 572 |
+
# resources=resources_list
|
| 573 |
)
|
| 574 |
|
| 575 |
except Exception as e:
|