Skip to content

v5.1.0 Release

Latest
Compare
Choose a tag to compare
@rohanshah18 rohanshah18 released this 05 Jun 17:00
36fa67b

This version of the Pinecone Java SDK introduces support for models api. You can now describe and list embedding models hosted by Pinecone. More details on models can be found here.

Features

Support to list and describe embedding models hosted by Pinecone.

Following methods are added:
1. listModels()
2. listModels(String type)
4. listModels(String type, String vectorType)
5. describeModel(String modelName)

Below code shows how to list and describe an embedding model:

import io.pinecone.clients.Inference;
import io.pinecone.clients.Pinecone;
import org.openapitools.inference.client.ApiException;
import org.openapitools.inference.client.model.ModelInfo;
import org.openapitools.inference.client.model.ModelInfoList;
...

Pinecone pinecone = new Pinecone
        .Builder(System.getenv("PINECONE_API_KEY"))
        .build();

Inference inference = pinecone.getInferenceClient();

// list models
ModelInfoList models = inference.listModels();
System.out.println(models);

// list models by filtering with type
models = inference.listModels("rerank");
System.out.println(models);

// list models by filtering with type and vectorType
models = inference.listModels("embed", "dense");
System.out.println(models);

// describe a model
ModelInfo modelInfo = inference.describeModel("llama-text-embed-v2");
System.out.println(modelInfo);

What's Changed

Full Changelog: v5.0.0...v5.1.0