Spaces:
Runtime error
Runtime error
Update rag.py
Browse files
rag.py
CHANGED
@@ -36,7 +36,7 @@ class TicketResolver:
|
|
36 |
|
37 |
def generate_resolution(self, retrieved_resolutions):
|
38 |
combined_resolutions = " ".join([str(resolution) for resolution in retrieved_resolutions if pd.notna(resolution)])
|
39 |
-
prompt = f"Based on these resolutions: {combined_resolutions} Generate a generic resolution combining all:"
|
40 |
completion = self.genai_model.generate_content(prompt)
|
41 |
generated_answer = completion.text
|
42 |
return generated_answer
|
|
|
36 |
|
37 |
def generate_resolution(self, retrieved_resolutions):
|
38 |
combined_resolutions = " ".join([str(resolution) for resolution in retrieved_resolutions if pd.notna(resolution)])
|
39 |
+
prompt = f"Based on these resolutions: {combined_resolutions}. Check if the query {query} has any related queries in combined_resolutions ,if found relatable queries Generate a generic resolution combining all matched ones : . If no matches or relatable issues are found in combing resolutions return a generic solution combining all :"
|
40 |
completion = self.genai_model.generate_content(prompt)
|
41 |
generated_answer = completion.text
|
42 |
return generated_answer
|