Spaces:
Runtime error
Runtime error
Update rag.py
Browse files
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)
|