ofermend commited on
Commit
6a22e95
1 Parent(s): b3a4d7e

Update query.py

Browse files
Files changed (1) hide show
  1. query.py +2 -0
query.py CHANGED
@@ -154,6 +154,7 @@ class VectaraQuery():
154
  if line: # filter out keep-alive new lines
155
  data = json.loads(line.decode('utf-8'))
156
  res = data['result']
 
157
 
158
  # capture responses and docs if we get that first
159
  response_set = res['responseSet']
@@ -185,6 +186,7 @@ class VectaraQuery():
185
  accumulated_text = re.sub(r"\s+\.", ".", accumulated_text)
186
  out_chunk = accumulated_text[:-pattern_max_length]
187
  chunks.append(out_chunk)
 
188
  yield out_chunk
189
  accumulated_text = accumulated_text[-pattern_max_length:]
190
 
 
154
  if line: # filter out keep-alive new lines
155
  data = json.loads(line.decode('utf-8'))
156
  res = data['result']
157
+ print(f"DEBUG res={res}")
158
 
159
  # capture responses and docs if we get that first
160
  response_set = res['responseSet']
 
186
  accumulated_text = re.sub(r"\s+\.", ".", accumulated_text)
187
  out_chunk = accumulated_text[:-pattern_max_length]
188
  chunks.append(out_chunk)
189
+ print(f"DEBUG out_chunk = {out_chunk}")
190
  yield out_chunk
191
  accumulated_text = accumulated_text[-pattern_max_length:]
192