-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when trying to transition from GPT-4 to PaLM #423
Comments
🤖 Hello @F4brizio, I'm here to assist you with your issue. I'm a bot designed to help solve bugs, answer questions, and guide you in becoming a contributor. While we wait for a human maintainer, let's see if we can figure this out together. The error you're encountering, "TypeError: Cannot read properties of undefined (reading 'text')", typically occurs when you're trying to access a property of an object that hasn't been defined. In your case, it seems like this error might be related to the Here are a few things you could try:
To debug this issue, you could add some try {
const index = pinecone.Index(PINECONE_INDEX_NAME);
console.log('index', index);
const embeddings = new OpenAIEmbeddings({});
console.log('embeddings', embeddings);
const vectorStore = await PineconeStore.fromExistingIndex(
embeddings,
{
pineconeIndex: index,
textKey: 'text',
namespace: PINECONE_NAME_SPACE,
},
);
console.log('vectorStore', vectorStore);
// rest of your code...
} catch (error: any) {
console.log('error', error);
res.status(500).json({ error: error.message || 'Something went wrong' });
} This will help you identify which object is If you're still encountering issues after trying these steps, please provide more information about the context in which this error is occurring. This could include additional code snippets, error messages, or descriptions of what you're trying to achieve. I hope this helps! Let me know how it goes. Best, 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. |
Hi, @F4brizio, I'm helping the gpt4-pdf-chatbot-langchain team manage their backlog and am marking this issue as stale. The issue involved a TypeError when transitioning from GPT-4 to PaLM in a chatbot implementation, specifically when trying to access the 'text' property, resulting in a "Cannot read properties of undefined" error. Dosubot provided suggestions for resolving the issue, including checking the initialization of the Could you please confirm if this issue is still relevant to the latest version of the gpt4-pdf-chatbot-langchain repository? If it is, please let the gpt4-pdf-chatbot-langchain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you! |
I'm trying to implement PaLM as a replacement for ChatGPT, but so far, I haven't had any luck.
My code:
chat-bot.ts
...
makechain-palm.ts
pinecone-client-palm.ts
package.json
I have the following error:
Any suggestions?
The text was updated successfully, but these errors were encountered: