@@ -101,7 +101,7 @@ def initializeSupportAI(self):
101
101
Returns:
102
102
JSON response from the SupportAI service.
103
103
"""
104
- url = self .nlqs_host + "/" + self .conn .graphname + "/initialize"
104
+ url = self .nlqs_host + "/" + self .conn .graphname + "/supportai/ initialize"
105
105
return self .conn ._req ("POST" , url , authMode = "pwd" , resKey = None )
106
106
107
107
def createDocumentIngest (self , data_source , data_source_config , loader_config , file_format ):
@@ -161,9 +161,9 @@ def searchDocuments(self, query, method = "hnswoverlap", method_parameters: dict
161
161
JSON response from the document search.
162
162
"""
163
163
data = {
164
- "query " : query ,
164
+ "question " : query ,
165
165
"method" : method ,
166
- "method_parameters " : method_parameters
166
+ "method_params " : method_parameters
167
167
}
168
168
url = self .nlqs_host + "/" + self .conn .graphname + "/supportai/search"
169
169
return self .conn ._req ("POST" , url , authMode = "pwd" , data = data , jsonData = True , resKey = None )
@@ -181,9 +181,17 @@ def answerQuestion(self, query, method = "hnswoverlap", method_parameters: dict
181
181
JSON response from the question answer.
182
182
"""
183
183
data = {
184
- "query " : query ,
184
+ "question " : query ,
185
185
"method" : method ,
186
- "method_parameters " : method_parameters
186
+ "method_params " : method_parameters
187
187
}
188
188
url = self .nlqs_host + "/" + self .conn .graphname + "/supportai/answerquestion"
189
- return self .conn ._req ("POST" , url , authMode = "pwd" , data = data , jsonData = True , resKey = None )
189
+ return self .conn ._req ("POST" , url , authMode = "pwd" , data = data , jsonData = True , resKey = None )
190
+
191
+ def forceConsistencyUpdate (self ):
192
+ """ Force a consistency update for SupportAI embeddings.
193
+ Returns:
194
+ JSON response from the consistency update.
195
+ """
196
+ url = self .nlqs_host + "/" + self .conn .graphname + "/supportai/forceupdate"
197
+ return self .conn ._req ("GET" , url , authMode = "pwd" , resKey = None )
0 commit comments