Replies: 2 comments 6 replies
-
🤖 Hi, The error you're encountering is due to the way you're passing the In your case, you're passing To resolve this issue, you should pass the text_df = pd.DataFrame({'text':[text]})
# Load text into loader
loader = DataFrameLoader(text_df)
docs = loader.load()
# split into chunks
text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(chunk_size=500, chunk_overlap=30)
chunks = text_splitter.split_documents(docs)
# Prepare texts and metadatas
texts = [d.page_content for d in chunks]
metadatas = [d.metadata for d in chunks]
# Inserting to index
Pinecone.from_texts(texts, embeddings, index_name=INDEX_NAME, namespace=NAMESPACE, metadatas=metadatas) Regarding the I hope this helps! Let me know if you have any other questions. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
In order to solve the "metadata size is 46933 bytes, which exceeds the limit of 40960 bytes per vector", I first checked the size of the text chunk and then split the text further using the splitter to get the text chunks. Here is the rough implementation:
If you have anything specific, then please let me know. I was using semantic chunker from Langchain. It does really well. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I am uploading text files to Pinecone index, and along with it some metadata as follows:
But doing so, I get the error:
What could be the case here? I used the from_texts method and it worked fine with that, but I was getting a
metadata size is 46933 bytes, which exceeds the limit of 40960 bytes per vector
error with that, but that is from Pinecone I guess.Beta Was this translation helpful? Give feedback.
All reactions