Spaces:
Sleeping
Sleeping
Rajat.bans
commited on
Commit
•
8a74639
1
Parent(s):
ee3f636
Improved relation message when retreived documents are good
Browse files
rag.py
CHANGED
@@ -149,6 +149,8 @@ def getBestQuestionOnTheBasisOfPageInformationAndAdsData(
|
|
149 |
tokens_used_relation = response.usage.total_tokens
|
150 |
relation_answer = json.loads(response.choices[0].message.content)
|
151 |
tokens_used_question = 0
|
|
|
|
|
152 |
|
153 |
if relation_answer["classification"] != 0:
|
154 |
system_message = {
|
|
|
149 |
tokens_used_relation = response.usage.total_tokens
|
150 |
relation_answer = json.loads(response.choices[0].message.content)
|
151 |
tokens_used_question = 0
|
152 |
+
else:
|
153 |
+
relation_answer["reasoning"] = "First retreived document value less than threshold so no need to check relation"
|
154 |
|
155 |
if relation_answer["classification"] != 0:
|
156 |
system_message = {
|