Closed lukebyrne closed 1 year ago
I wrote my own in Python and it seemed to work no probs.
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.text_splitter import CharacterTextSplitter
from langchain.vectorstores import Pinecone
from langchain.document_loaders import PyMuPDFLoader
import pinecone
loader = PyMuPDFLoader("docs/MorseVsFrederick.pdf")
documents = loader.load()
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
docs = text_splitter.split_documents(documents)
embeddings = OpenAIEmbeddings(openai_api_key="")
# initialize pinecone
pinecone.init(
api_key="", # find at app.pinecone.io
environment="" # next to api key in console
)
index_name = "agentic-v1"
docsearch = Pinecone.from_documents(docs, embeddings, index_name=index_name)
I think its my node version. Please ignore.
Hi, thanks for the amazing video and repo.
I have just cloned it to start playing around, however when I go to ingest I get the following error whcih I cant seem to debug.
error [TypeError: t.replaceAll is not a function]
Any suggestions most welcome.