mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-12 15:59:56 +00:00
Fix GoogleEnterpriseSearchRetriever
(#10546)
Replace this entire comment with: - Description: fixed Google Enterprise Search Retriever where it was consistently returning empty results, - Issue: related to [issue 8219](https://github.com/langchain-ai/langchain/issues/8219), - Dependencies: no dependencies, - Tag maintainer: @hwchase17 , - Twitter handle: [Tomas Piaggio](https://twitter.com/TomasPiaggio)!
This commit is contained in:
parent
73b9ca54cb
commit
d1f2075bde
@ -156,7 +156,10 @@ class GoogleCloudEnterpriseSearchRetriever(BaseRetriever):
|
||||
else "extractive_segments"
|
||||
)
|
||||
|
||||
for chunk in derived_struct_data.get(chunk_type, []):
|
||||
if chunk_type not in derived_struct_data:
|
||||
continue
|
||||
|
||||
for chunk in derived_struct_data[chunk_type]:
|
||||
doc_metadata["source"] = derived_struct_data.get("link", "")
|
||||
|
||||
if chunk_type == "extractive_answers":
|
||||
|
Loading…
Reference in New Issue
Block a user