Class PineconeExample

java.lang.Object
com.hw.langchain.examples.vectorstores.PineconeExample

public class PineconeExample extends Object
export PINECONE_API_KEY=xxx export PINECONE_ENV=xxx
Author:
HamaWhite
  • Field Details

  • Method Details

    • initializePineconeIndex

      public static Pinecone initializePineconeIndex(String namespace, List<Document> docs)
      Initializes the Pinecone client, creates the index if necessary, and performs the desired operations.
      Parameters:
      namespace - the namespace
      docs - the list of docs
      Returns:
      the initialized Pinecone instance
    • createPineconeIndex

      public static void createPineconeIndex(com.hw.pinecone.PineconeClient client)
      If the index does not exist, it creates a new index with the specified name and dimension. It also waits until the index is ready before returning.
      Parameters:
      client - the PineconeClient instance