Skip to content
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

Add support for Pinecone Serverless #457

Open
JPaulMora opened this issue Jan 28, 2024 · 6 comments
Open

Add support for Pinecone Serverless #457

JPaulMora opened this issue Jan 28, 2024 · 6 comments
Labels
kind: enhancement Related to a new feature or new functionality

Comments

@JPaulMora
Copy link

Hello, I think it would be a great addition to have this new Pinecone feature added here. Serverless blog post for reference: https://www.pinecone.io/blog/serverless/

Copy link

dosubot bot commented Jan 28, 2024

🤖

Hello again @JPaulMora! Always a pleasure to see familiar faces around here. Let's jump right into it!

Thank you for your suggestion to add support for Pinecone Serverless to the gpt4-pdf-chatbot-langchain repository. Based on the current server architecture of the repository, it seems that Pinecone is already being used for vector storage and retrieval. However, it's not clear from the provided context how Pinecone Serverless would enhance the functionality of the repository or how it differs from the current Pinecone implementation.

The current serverless function in the repository uses a Pinecone index to create a vector store, which is then used as a retriever in the chatbot's chain of operations. If Pinecone Serverless were to be integrated, it would likely replace the current PineconeStore with a serverless variant. This could potentially affect the way the vector store is initialized and used throughout the application.

However, without specific details on how Pinecone Serverless operates or how it differs from the current PineconeStore, it's difficult to provide a more detailed analysis. Could you please provide more information about the specific features and benefits of Pinecone Serverless, and how it would enhance the functionality of the gpt4-pdf-chatbot-langchain repository? This would help in understanding the potential impact of this integration and how it could be implemented.

Here is the relevant code from the repository for reference:

const index = pinecone.Index(PINECONE_INDEX_NAME);

/* create vectorstore*/
const vectorStore = await PineconeStore.fromExistingIndex(
  new OpenAIEmbeddings({}),
  {
    pineconeIndex: index,
    textKey: 'text',
    namespace: PINECONE_NAME_SPACE, //namespace comes from your config folder
  },
);

//create chain
const chain = makeChain(retriever);

Source: pages/api/chat.ts

Looking forward to your response.

Sources


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.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the kind: enhancement Related to a new feature or new functionality label Jan 28, 2024
@edmundman
Copy link

bump

@precupstefan
Copy link

precupstefan commented Feb 22, 2024

@JPaulMora @edmundman

you have to bump pinecone-database to latest npm install @pinecone-database/pinecone@latest

then change in pinecone-client.ts


const pc = new Pinecone({
    apiKey: "YOUR_API_KEY",
    environment: "YOUR_ENVIRONMENT",
});

to


const pc = new Pinecone({
    apiKey: 'YOUR_API_KEY' 
});

@langchain/pinceone
furthermore you have to update vector store by installing @langchain/pinceone and change in the import of store to import {PineconeStore} from "@langchain/pinecone";

@JPaulMora
Copy link
Author

Thanks @precupstefan Will try this later

@CarmichaelAJ
Copy link

This did not work for me, I can't initialize pinecone now..

@Ravel36
Copy link

Ravel36 commented May 17, 2024

Has anyone been able to get this to work? I tried what was mentioned above, but my the changes recommended doesn't match what is actually in the pinecone-client.ts file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Related to a new feature or new functionality
Projects
None yet
Development

No branches or pull requests

5 participants