Class PineconeExample
java.lang.Object
com.hw.langchain.examples.vectorstores.PineconeExample
export PINECONE_API_KEY=xxx
export PINECONE_ENV=xxx
- Author:
- HamaWhite
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreatePineconeIndex(com.hw.pinecone.PineconeClient client) If the index does not exist, it creates a new index with the specified name and dimension.static PineconeinitializePineconeIndex(String namespace, List<Document> docs) Initializes the Pinecone client, creates the index if necessary, and performs the desired operations.
-
Field Details
-
INDEX_NAME
- See Also:
-
-
Method Details
-
initializePineconeIndex
Initializes the Pinecone client, creates the index if necessary, and performs the desired operations.- Parameters:
namespace- the namespacedocs- 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
-