ofermend commited on
Commit
2a89f81
1 Parent(s): 4b2fddf

Update query.py

Browse files
Files changed (1) hide show
  1. query.py +4 -3
query.py CHANGED
@@ -9,10 +9,11 @@ def extract_between_tags(text, start_tag, end_tag):
9
  return text[start_index+len(start_tag):end_index-len(end_tag)]
10
 
11
  class VectaraQuery():
12
- def __init__(self, api_key: str, customer_id: str, corpus_ids: list[str]):
13
  self.customer_id = customer_id
14
  self.corpus_ids = corpus_ids
15
  self.api_key = api_key
 
16
  self.conv_id = None
17
 
18
  def submit_query(self, query_str: str):
@@ -55,12 +56,12 @@ class VectaraQuery():
55
  {
56
  'responseLang': 'eng',
57
  'maxSummarizedResults': 5,
58
- 'summarizerPromptName': 'vectara-experimental-summary-ext-2023-12-11-large',
59
  'chat': {
60
  'store': True,
61
  'conversationId': self.conv_id
62
  },
63
- 'debug': True,
64
  }
65
  ]
66
  }
 
9
  return text[start_index+len(start_tag):end_index-len(end_tag)]
10
 
11
  class VectaraQuery():
12
+ def __init__(self, api_key: str, customer_id: str, corpus_ids: list[str], prompt_name: str = None):
13
  self.customer_id = customer_id
14
  self.corpus_ids = corpus_ids
15
  self.api_key = api_key
16
+ self.prompt_name = prompt_name if prompt_name else "vectara-summary-ext-v1.2.0"
17
  self.conv_id = None
18
 
19
  def submit_query(self, query_str: str):
 
56
  {
57
  'responseLang': 'eng',
58
  'maxSummarizedResults': 5,
59
+ 'summarizerPromptName': self.prompt_name,
60
  'chat': {
61
  'store': True,
62
  'conversationId': self.conv_id
63
  },
64
+ # 'debug': True,
65
  }
66
  ]
67
  }