mirror of
https://github.com/hwchase17/langchain
synced 2024-11-02 09:40:22 +00:00
4209457bdc
Add Redis langserve template! Eventually will add semantic caching to this too. But I was struggling to get that to work for some reason with the LCEL implementation here. - **Description:** Introduces the Redis LangServe template. A simple RAG based app built on top of Redis that allows you to chat with company's public financial data (Edgar 10k filings) - **Issue:** None - **Dependencies:** The template contains the poetry project requirements to run this template - **Tag maintainer:** @baskaryan @Spartee - **Twitter handle:** @tchutch94 **Note**: this requires the commit here that deletes the `_aget_relevant_documents()` method from the Redis retriever class that wasn't implemented. That was breaking the langserve app. --------- Co-authored-by: Sam Partee <sam.partee@redis.com>
38 lines
1.1 KiB
TOML
38 lines
1.1 KiB
TOML
[tool.poetry]
|
|
name = "rag-redis"
|
|
version = "0.0.1"
|
|
description = "Run a RAG app backed by OpenAI, HuggingFace, and Redis as a vector database"
|
|
authors = ["Tyler Hutcherson <tyler.hutcherson@redis.com>", "Sam Partee <sam.partee@redis.com>"]
|
|
readme = "README.md"
|
|
|
|
[tool.poetry.dependencies]
|
|
python = ">=3.8.1,<4.0"
|
|
langchain = ">=0.0.313, <0.1"
|
|
fastapi = "^0.104.0"
|
|
sse-starlette = "^1.6.5"
|
|
openai = "^0.28.1"
|
|
sentence-transformers = "2.2.2"
|
|
redis = "5.0.1"
|
|
tiktoken = "0.5.1"
|
|
pdf2image = "1.16.3"
|
|
unstructured = {version = "^0.10.27", extras = ["pdf"]}
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
langchain-cli = {git = "https://github.com/langchain-ai/langchain.git", rev = "erick/cli", subdirectory = "libs/cli"}
|
|
poethepoet = "^0.24.1"
|
|
|
|
[tool.langserve]
|
|
export_module = "rag_redis.chain"
|
|
export_attr = "chain"
|
|
|
|
[tool.poe.tasks.start]
|
|
cmd="uvicorn langchain_cli.dev_scripts:create_demo_server --reload --port $port --host $host"
|
|
args = [
|
|
{name = "port", help = "port to run on", default = "8000"},
|
|
{name = "host", help = "host to run on", default = "127.0.0.1"}
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["poetry-core"]
|
|
build-backend = "poetry.core.masonry.api"
|