- install the langchain cli
pip install -U langchain-cli types
- create a new langchain project
langchain app new my-rag
- cd in my-rag
cd my-rag
- add the astra db rag template
langchain app add cassandra-entomology-rag
- make a copy of .env.template to .env and edit the Astra DB credentials
cp ./packages/cassandra-entomology-rag/cassandra_entomology_rag/.env.template ./packages/cassandra-entomology-rag/cassandra_entomology_rag/.env
- add these lines to your server.py
from cassandra_entomology_rag import chain as cassandra_entomology_rag_chain
add_routes(app, cassandra_entomology_rag_chain, path="/cassandra-entomology-rag")
- start langserve on your local machine from the my-rag folder
langchain serve
- use browser url to access the playground https://localhost:8000/cassandra-entomology-rag/playground
That's it!
- clone this repo
git clone https://github.com/difli/my-rag.git
- install the langchain cli
pip install -U langchain-cli types
- make a copy of .env.template to .env and edit the Astra DB credentials
cp ./packages/cassandra-entomology-rag/cassandra_entomology_rag/.env.template ./packages/cassandra-entomology-rag/cassandra_entomology_rag/.env
- start langserve on your local machine
langchain serve
- use browser url to access the playground https://localhost:8000/playground/
This template will perform RAG using Apache Cassandra® or Astra DB through CQL (
Cassandra
vector store class)