Spaces:
Runtime error
Runtime error
Update query.py
Browse files
query.py
CHANGED
@@ -13,7 +13,7 @@ class VectaraQuery():
|
|
13 |
self.customer_id = customer_id
|
14 |
self.corpus_ids = corpus_ids
|
15 |
self.api_key = api_key
|
16 |
-
self.conv_id =
|
17 |
|
18 |
def submit_query(self, query_str: str):
|
19 |
corpora_key_list = [{
|
@@ -80,7 +80,8 @@ class VectaraQuery():
|
|
80 |
docs = res['responseSet'][0]['document']
|
81 |
chat = res['responseSet'][0]['summary'][0]['chat']
|
82 |
|
83 |
-
|
|
|
84 |
# # chat['status'] = # I have no idea what to put here hahaha
|
85 |
# st_code = chat['status']
|
86 |
# print(f"Chat query failed with code {st_code}")
|
|
|
13 |
self.customer_id = customer_id
|
14 |
self.corpus_ids = corpus_ids
|
15 |
self.api_key = api_key
|
16 |
+
self.conv_id = 1
|
17 |
|
18 |
def submit_query(self, query_str: str):
|
19 |
corpora_key_list = [{
|
|
|
80 |
docs = res['responseSet'][0]['document']
|
81 |
chat = res['responseSet'][0]['summary'][0]['chat']
|
82 |
|
83 |
+
if chat['status'] != None:
|
84 |
+
print("Chat status issue")
|
85 |
# # chat['status'] = # I have no idea what to put here hahaha
|
86 |
# st_code = chat['status']
|
87 |
# print(f"Chat query failed with code {st_code}")
|