File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -74,20 +74,14 @@ def _vectara_query(
7474 query: query string
7575 """
7676 # If multiple corpus ids are provided (comma-separated), create a list of corpus keys
77- if ',' in self ._vectara_corpus_id :
78- corpus_key = [
79- {
80- "customerId" : self ._vectara_customer_id ,
81- "corpusId" : corpus_id ,
82- "lexicalInterpolationConfig" : {"lambda" : 0.025 },
83- } for corpus_id in self ._vectara_corpus_id .split (',' )
84- ]
85- else :
86- corpus_key = [{
77+ # otherwise by default, the `split(',')` is a no-op so retains the single corpus id
78+ corpus_key = [
79+ {
8780 "customerId" : self ._vectara_customer_id ,
88- "corpusId" : self . _vectara_corpus_id ,
81+ "corpusId" : corpus_id ,
8982 "lexicalInterpolationConfig" : {"lambda" : 0.025 },
90- }]
83+ } for corpus_id in self ._vectara_corpus_id .split (',' )
84+ ]
9185
9286 data = {
9387 "query" : [
You can’t perform that action at this time.
0 commit comments