arjunanand13 commited on
Commit
5458a2a
·
verified ·
1 Parent(s): 6ca5c62

Update rag.py

Browse files
Files changed (1) hide show
  1. rag.py +1 -1
rag.py CHANGED
@@ -34,7 +34,7 @@ class TicketResolver:
34
 
35
  return issue_resolution_pairs, resolutions
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)
 
34
 
35
  return issue_resolution_pairs, resolutions
36
 
37
+ def generate_resolution(self,query, 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)