Skip to content

Release 0.4.0

Choose a tag to compare

@rohanshah18 rohanshah18 released this 30 Aug 18:34
· 121 commits to main since this release
96fe1d1

Changelog

This change simplifies configuration by allowing a PineconeConnection object to be instantiated from an index url without the need to pass individual configuration fields for indexName, projectId, and environment. This change should make interactions with Pinecone's data plane more robust as there is no longer a need to parse these values out of urls which could change format over time.

Example

The following example shows how to build a PineconeConnection object from the index url. Then we show how to use the connection object to fetch a list of vectors.

PineconeClientConfig clientConfig = new PineconeClientConfig().withApiKey("PINECONE_API_KEY");
PineconeClient client = new PineconeClient(clientConfig);
PineconeConnection connection = client.connectWithUrl("https://abcdefg-123-c01b9b5.svc.us-east1-gcp.pinecone.io/");

List<String> ids = Arrays.asList("v1", "v2", "v3", "v4", "v5", "v6");

FetchRequest fetchRequest = FetchRequest.newBuilder().addAllIds(ids).setNamespace("TEST_NAMESPACE").build();
FetchResponse fetchResponse = connection.getBlockingStub().fetch(fetchRequest);