langchain-graph-retriever-0.8.0
توضیحات
LangChain retriever for traversing document graphs on top of vector-based similarity search.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | langchain-graph-retriever-0.8.0 |
| نام | langchain-graph-retriever |
| نسخه کتابخانه | 0.8.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/langchain-graph-retriever/ |
| مجوز | - |
# LangChain Graph Retriever
LangChain Graph Retriever is a Python library that supports traversing a document graph on top of vector-based similarity search.
It works seamlessly with LangChain's retriever framework and supports various graph traversal strategies for efficient document discovery.
## Features
- **Vector Search**: Perform similarity searches using vector embeddings.
- **Graph Traversal**: Apply traversal strategies such as breadth-first (Eager) or Maximal Marginal Relevance (MMR) to explore document relationships.
- **Customizable Strategies**: Easily extend and configure traversal strategies to meet your specific use case.
- **Multiple Adapters**: Support for various vector stores, including AstraDB, Cassandra, Chroma, OpenSearch, and in-memory storage.
- **Synchronous and Asynchronous Retrieval**: Supports both sync and async workflows for flexibility in different applications.
## Installation
Install the library via pip:
```bash
pip install langchain-graph-retriever
```
## Getting Started
Here is an example of how to use LangChain Graph Retriever:
```python
from langchain_graph_retriever import GraphRetriever
from langchain_core.vectorstores import Chroma
# Initialize the vector store (Chroma in this example)
vector_store = Chroma(embedding_function=your_embedding_function)
# Create the Graph Retriever
retriever = GraphRetriever(
store=vector_store,
# Define edges based on document metadata
edges=[("keywords", "keywords")],
)
# Perform a retrieval
documents = retriever.retrieve("What is the capital of France?")
# Print the results
for doc in documents:
print(doc.page_content)
```
## License
This project is licensed under the Apache 2 License. See the LICENSE file for more details.
نیازمندی
| مقدار | نام |
|---|---|
| - | backoff>=2.2.1 |
| - | graph-retriever |
| - | immutabledict>=4.2.1 |
| - | langchain-core>=0.3.29 |
| - | networkx>=3.4.2 |
| - | pydantic>=2.10.4 |
| - | typing-extensions>=4.12.2 |
| xtr | astrapy>=2.0.0; |
| xtr | httpx>=0.28.1; |
| xtr | langchain-astradb>=0.6.0; |
| xtr | cassio>=0.1.10; |
| xtr | langchain-community>=0.3.14; |
| xtr | chromadb>=0.5.23; |
| xtr | langchain-chroma>=0.2.0; |
| xtr | gliner==0.2.13; |
| xtr | beautifulsoup4>=4.12.3; |
| xtr | keybert>=0.8.5; |
| xtr | langchain-community>=0.3.14; |
| xtr | opensearch-py>=2.8.0; |
| xtr | spacy>=3.8.4; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl langchain-graph-retriever-0.8.0:
pip install langchain-graph-retriever-0.8.0.whl
نصب پکیج tar.gz langchain-graph-retriever-0.8.0:
pip install langchain-graph-retriever-0.8.0.tar.gz