I have a Streamlit app that downloads emails, calendar events, and attachments and then loads those into a ChromaDB instance. Well, the MSWordPArser is not working but you get the idea…
The problem is that simply sending in a
crc = ConversationalRetrievalChain.from_llm(llm, retriever)
command blows the token limit away. I have read a lot about batch embedding but I do not understand how to move from what I currently have to my own embeddings. Here is the relevant code, does anybody have any suggestions?
if documents is not None: text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200) chunks = text_splitter.split_documents(documents) embeddings = OpenAIEmbeddings() vector_store = Chroma.from_documents(chunks, embeddings) # initialize OpenAI instance llm = ChatOpenAI(model='gpt-3.5-turbo', temperature=aiTemperature) retriever = vector_store.as_retriever() #TOO MUCH DATA!!! crc = ConversationalRetrievalChain.from_llm(llm, retriever)