Replies: 2 comments 1 reply
-
I don't quite get it. Could you pls explain it further? |
Beta Was this translation helpful? Give feedback.
-
thanks @YLFxGen for your comment. After loading from data, I will proceed to load from data1, data2 ... I then want to combine the corresponding docs object into userguide. But doc object is of class <class 'langchain.schema.Document'>. Is there a method to append individual docs to doc. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Error message: TypeError: 'builtin_function_or_method' object is not subscriptable
I scrapping our published user guides to a temp.txt file.
Then I split the file and try to load it.
Then I assign the url to the metadata for later reference.
But I need to the this together into a list so that I can upload to pinecone.
loader = TextLoader('temp.txt')
data = loader.load()
docs = text_splitter.split_documents(data)
for doc in docs:
doc.metadata['source']=url
userguides.append[doc] # problems doing this
docsearch = Pinecone.from_documents(userguides, embeddings, index_name=index_name)
Beta Was this translation helpful? Give feedback.
All reactions