Skip to main content

EN README

Reindexer Vector Store for LangChain

Этот пакет предоставляет интеграцию векторного хранилища для базы данных Reindexer с фреймворком LangChain.

Установка

pip install langchain-reindexer

Использование

Теперь вы можете использовать векторное хранилище в вашем приложении LangChain:

from langchain_reindexer import ReindexerVectorStore
from langchain_openai import OpenAIEmbeddings

# Инициализация векторного хранилища
vector_store = ReindexerVectorStore(
    embedding=OpenAIEmbeddings(),
    rx_connector_config={"dsn": "builtin:///tmp/my_db"},
    rx_namespace="my_namespace",
)

# Добавление документов
from langchain_core.documents import Document

documents = [
    Document(page_content="foo", metadata={"baz": "bar"}),
    Document(page_content="thud", metadata={"bar": "baz"}),
]

ids = vector_store.add_documents(documents=documents)

# Поиск
results = vector_store.similarity_search(query="thud", k=1)

Больше примеров здесь

Возможности

  • Добавление и удаление документов
  • Поиск по сходству с оценкой и без
  • Фильтрация по метаданным
  • Поиск максимальной предельной релевантности (MMR)
  • Асинхронная поддержка
  • Сохранение и загрузка конфигурации векторного хранилища

Release files for langchain-reindexer 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-reindexer 0.1.5
File Size Uploaded
langchain_reindexer-0.1.5.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-reindexer 0.1.5
File Interpreter ABI Platform
langchain_reindexer-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 31.9 kB

Release files / langchain_reindexer-0.1.5.tar.gz

Download URL langchain_reindexer-0.1.5.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
83d8a4ed4a8de6e80e7951368a57241b6bcec824c4a191ec10454dd86030da09
BLAKE2b-256 checksum
How to use checksums
f5050d9d4a99e59d8edf8e8517b5c2d311f12424f358b7259a6d5188806dd78c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / langchain_reindexer-0.1.5-py3-none-any.whl

Download URL langchain_reindexer-0.1.5-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a194b6537737522c5d5f2f7ceec2be7aae9d15874ca8b1063b377d9ad29d38e
BLAKE2b-256 checksum
How to use checksums
1e1163ff8348b9919f90b98157680d285ae67c7d51bfe05b7d2a1eb6298cdd67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page