Retriever based on GCP DocAI Warehouse (#11400)

- **Description:** implements a retriever on top of DocAI Warehouse (to
interact with existing enterprise documents)
  https://cloud.google.com/document-ai-warehouse?hl=en
  - **Issue:** new functionality
 
@baskaryan

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
Leonid Kuligin
2023-10-12 04:08:53 +02:00
committed by GitHub
parent 629d9b78fa
commit 2aba9ab47e
4 changed files with 164 additions and 0 deletions

View File

@@ -152,6 +152,23 @@ See a [usage example](/docs/integrations/retrievers/google_vertex_ai_search).
from langchain.retrievers import GoogleVertexAISearchRetriever
```
### Document AI Warehouse
> [Google Cloud Document AI Warehouse](https://cloud.google.com/document-ai-warehouse)
> allows enterprises to search, store, govern, and manage documents and their AI-extracted
> data and metadata in a single platform. Documents should be uploaded outside of Langchain,
>
```python
from langchain.retrievers import GoogleDocumentAIWarehouseRetriever
docai_wh_retriever = GoogleDocumentAIWarehouseRetriever(
project_number=...
)
query = ...
documents = docai_wh_retriever.get_relevant_documents(
query, user_ldap=...
)
```
## Tools
### Google Search