Comments (1)
The error you're encountering suggests there's an issue with the structure of the docs
object passed to PineconeStore.fromDocuments
, specifically that elements within docs
are missing the expected text
property. To resolve this, you should first verify the structure of docs
after splitting the documents. Ensure each element has a text
property by inspecting the output of textSplitter.splitDocuments(rawDocs)
.
If the structure doesn't match expectations, you may need to adjust docs
before passing it to PineconeStore.fromDocuments
. For example, if docs
is supposed to be an array of objects with a text
property but isn't formatted correctly, you'll need to transform docs
to ensure each object contains a text
key with the appropriate value.
Here's a quick way to debug and potentially adjust the docs
structure:
-
Log the structure of
docs
to confirm each element contains atext
property:console.log('split docs', JSON.stringify(docs, null, 2));
-
If the structure is incorrect, adjust
docs
accordingly:const adjustedDocs = docs.map(doc => ({ text: doc.someOtherProperty // Replace `someOtherProperty` with the actual property name }));
Then, use adjustedDocs
in place of docs
when calling PineconeStore.fromDocuments
.
This approach should help you resolve the "TypeError: Cannot read properties of undefined (reading 'text')" error by ensuring the data passed to PineconeStore.fromDocuments
is correctly structured.
Details
Sources
- ErrorWithoutStackTrace: PineconeClient: Error calling upsert: ErrorWithoutStackTrace: undefined
- Ingest Error (previously working)
- stream.getReader
- scripts/ingest-data.ts
About Dosu
This 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.
To continue the conversation, mention @dosu.
from gpt4-pdf-chatbot-langchain.
Related Issues (20)
- Can ChatGPT 3.5 be supported? HOT 6
- Text words overlay display HOT 1
- Does this project accepts image read from PDF? HOT 5
- Enhancement - ability to use a graph database such as neo4j instead of vector database HOT 1
- enhancement - integrate with llamaindex HOT 3
- Explain data ingestion code. HOT 4
- s HOT 1
- "TypeError: Cannot read properties of undefined (reading 'text')" HOT 1
- error TypeError: ids is not iterable HOT 1
- Add support for Pinecone Serverless HOT 9
- Error: Azure OpenAI API instance name not found HOT 3
- FetchError: request to https://api.openai.com/v1/embeddings failed HOT 1
- run "yarn run ingest" Japanese punctuation marks were converted to Korean HOT 1
- I get this error when I open my local server: Cannot read properties of undefined (reading 'text') HOT 14
- error PineconeConnectionError HOT 1
- Failed to ingest your data HOT 1
- Fail to ingest data HOT 5
- PineCone is migrating free accounts to serverless type HOT 1
- error TypeError: Cannot read properties of undefined (reading 'text') when run npm run ingest HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt4-pdf-chatbot-langchain.