feat: Add Elasticsearch VectorStore Component with Ingest and Advanced Search Capabilities (#3899)

* feat: adding Elasticsearch  VectorStore component code

* update: adding langchain-elasticsearch dependency

* update: adding langchain-elasticsearch dependency (ruff format fix)

* Add `langchain-elasticsearch` dependency to pyproject.toml

* Refactor type hints to use PEP 585 syntax in Elasticsearch vector store component

* Refactor ElasticsearchVectorStoreComponent for improved readability and error handling

- Consolidated import statements and removed unused imports.
- Reformatted long strings for better readability.
- Enhanced error messages with variable assignment for clarity.
- Removed redundant else clause in search_documents method.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
João 2024-10-03 12:41:30 -03:00 • committed by GitHub
commit 75ffe0b11b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 467 additions and 0 deletions

View file

@ -113,6 +113,7 @@ dependencies = [
"pydantic-settings==2.4.0",
"ragstack-ai-knowledge-store>=0.2.1",
"duckduckgo-search>=6.2.11",
"langchain-elasticsearch>=0.2.0",
]
[project.optional-dependencies]
@ -229,6 +230,7 @@ langchain-unstructured = "^0.1.2"
pydantic-settings = "2.4.0"
ragstack-ai-knowledge-store = "^0.2.1"
duckduckgo-search = "^6.2.12"
langchain-elasticsearch = "^0.2.0"
opensearch-py = "^2.7.1"