Solshine commited on
Commit
d56438d
1 Parent(s): 3a8a0bc

Update query.py

Browse files
Files changed (1) hide show
  1. query.py +3 -3
query.py CHANGED
@@ -70,7 +70,7 @@ class VectaraQuery():
70
  response = requests.post(endpoint, data=json.dumps(body), verify=True, headers=headers)
71
  if response.status_code != 200:
72
  print(f"Query failed with code {response.status_code}, reason {response.reason}, text {response.text}")
73
- return "Sorry, something went wrong in my brain. Please try again later."
74
 
75
  res = response.json()
76
 
@@ -85,8 +85,8 @@ class VectaraQuery():
85
  print(f"Chat query failed with code {st_code}")
86
  if st_code == 'RESOURCE_EXHAUSTED':
87
  self.conv_id = None
88
- return 'Sorry, Vectara chat turns exceeds plan limit.'
89
- return 'Sorry, something went wrong in my brain. Please try again later.'
90
 
91
  self.conv_id = res['responseSet'][0]['summary'][0]['chat']['conversationId']
92
 
 
70
  response = requests.post(endpoint, data=json.dumps(body), verify=True, headers=headers)
71
  if response.status_code != 200:
72
  print(f"Query failed with code {response.status_code}, reason {response.reason}, text {response.text}")
73
+ return "Sorry, I'm experiencing an error. Please report this and try again later."
74
 
75
  res = response.json()
76
 
 
85
  print(f"Chat query failed with code {st_code}")
86
  if st_code == 'RESOURCE_EXHAUSTED':
87
  self.conv_id = None
88
+ return 'Sorry, chat turns exceeds plan limit.'
89
+ return 'Sorry, I'm experiencing an error. Please report this and try again later.'
90
 
91
  self.conv_id = res['responseSet'][0]['summary'][0]['chat']['conversationId']
92