mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-06 13:18:12 +00:00
fixed lint
This commit is contained in:
parent
8b8d2a6535
commit
a5450be32e
@ -260,7 +260,8 @@ class Vectara(VectorStore):
|
|||||||
https://docs.vectara.com/docs/search-apis/sql/filter-overview
|
https://docs.vectara.com/docs/search-apis/sql/filter-overview
|
||||||
for more details.
|
for more details.
|
||||||
score_threshold: minimal score thresold for the result.
|
score_threshold: minimal score thresold for the result.
|
||||||
If defined, results with score less than this value will be filtered out.
|
If defined, results with score less than this value will be
|
||||||
|
filtered out.
|
||||||
n_sentence_context: number of sentences before/after the matching segment
|
n_sentence_context: number of sentences before/after the matching segment
|
||||||
to add, defaults to 2
|
to add, defaults to 2
|
||||||
|
|
||||||
@ -309,7 +310,11 @@ class Vectara(VectorStore):
|
|||||||
result = response.json()
|
result = response.json()
|
||||||
|
|
||||||
if score_threshold:
|
if score_threshold:
|
||||||
responses = [r for r in result["responseSet"][0]["response"] if r["score"] > score_threshold]
|
responses = [
|
||||||
|
r
|
||||||
|
for r in result["responseSet"][0]["response"]
|
||||||
|
if r["score"] > score_threshold
|
||||||
|
]
|
||||||
else:
|
else:
|
||||||
responses = result["responseSet"][0]["response"]
|
responses = result["responseSet"][0]["response"]
|
||||||
documents = result["responseSet"][0]["document"]
|
documents = result["responseSet"][0]["document"]
|
||||||
|
Loading…
Reference in New Issue
Block a user