Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.11 KB

README.md

File metadata and controls

36 lines (28 loc) · 1.11 KB

This repo provides a batch program to test RAG pipeline using Pinecone Free Acct, OpenAI and Cohere

Before running this, the following is needed:

Create a free Pinecone Acct in PineCone Console app.pinecone.io, and get your Pinecone Key
Create a OpenAI acct in Openai console and get your Open AI key
Create a Cohere Account in Cohere console dashboard.cohere.com and get your Cohere key
Set these in env variable

export PINECONE_API_KEY=
export OPENAI_API_KEY=
export COHERE_API_KEY=

Install the following dependencies:

openai==0.28.1
langchain==0.0.346
langchain_community
pyPDF
fastapi
python-multipart
cohere
fastapi_utils
pinecone

To run the batch code: python testRAG.py
In the main method, uncomment the method needed
ex: to ingest doc, process_doc
to list documents, list_vectordb
to delete documents, get_ids, delete_doc

To create the new Pinecone instance , turn the create_DB=True

To run REST API: cd restservices
uvicorn app.main:app --reload
Go to localhost:8000/docs to test using Swagger interface