Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ public static Reranker jinaai(Function<JinaAiReranker.Builder, ObjectBuilder<Jin
return JinaAiReranker.of(fn);
}

/** Configure a default VoyageAI reranker module. */
/** Configure a default VoyageAI by MongoDB reranker module. */
public static Reranker voyageai() {
return VoyageAiReranker.of();
}

/**
* Configure a VoyageAI reranker module.
* Configure a VoyageAI by MongoDB reranker module.
*
* @param fn Lambda expression for optional parameters.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@
import io.weaviate.client6.v1.api.collections.Reranker;
import io.weaviate.client6.v1.internal.ObjectBuilder;

/**
* {@code reranker-voyageai} reranker, backed by VoyageAI by MongoDB reranker
* models.
*/
public record VoyageAiReranker(
@SerializedName("model") String model) implements Reranker {

// Current VoyageAI by MongoDB reranker models.
// See https://docs.voyageai.com/docs/reranker
public static final String RERANK_3 = "rerank-3";
public static final String RERANK_3_LITE = "rerank-3-lite";
public static final String RERANK_2_5 = "rerank-2.5";
public static final String RERANK_2_5_LITE = "rerank-2.5-lite";

// Legacy models, still reachable through the API.
public static final String RERANK_1 = "rerank-1";
public static final String RERANK_LITE_1 = "rerank-lite-1";
public static final String RERANK_2 = "rerank-2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
import io.weaviate.client6.v1.api.collections.VectorIndex;
import io.weaviate.client6.v1.internal.ObjectBuilder;

/**
* {@code multi2vec-voyageai} vectorizer, backed by VoyageAI by MongoDB
* multimodal embedding models.
*/
public record Multi2VecVoyageAiVectorizer(
/** Base URL of the embedding service. */
@SerializedName("baseURL") String baseUrl,
Expand Down Expand Up @@ -42,6 +46,12 @@ private static record Weights(
@SerializedName("textWeights") List<Float> textWeights) {
}

// Current VoyageAI by MongoDB multimodal models.
// See https://docs.voyageai.com/docs/multimodal-embeddings
public static String VOYAGE_MULTIMODAL_3_5 = "voyage-multimodal-3.5";
// Legacy model, still reachable through the API.
public static String VOYAGE_MULTIMODAL_3 = "voyage-multimodal-3";

@Override
public VectorConfig.Kind _kind() {
return VectorConfig.Kind.MULTI2VEC_VOYAGEAI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
import io.weaviate.client6.v1.api.collections.VectorIndex;
import io.weaviate.client6.v1.internal.ObjectBuilder;

/**
* {@code text2vec-voyageai} vectorizer, backed by VoyageAI by MongoDB embedding
* models.
*/
public record Text2VecVoyageAiVectorizer(
@SerializedName("baseURL") String baseUrl,
@SerializedName("model") String model,
Expand Down Expand Up @@ -40,12 +44,24 @@ public Object _self() {
return this;
}

public static String VOYAGE_3_LARGE = "voyage-3-large";
public static String VOYAGE_3_5 = "voyage-3.5";
public static String VOYAGE_3_5_lite = "voyage-3.5-lite";
public static String VOYAGE_3 = "voyage-3";
public static String VOYAGE_3_LITE = "voyage-3-lite";
public static String VOYAGE_CONTEXT_3 = "voyage-context-3";
// Current VoyageAI by MongoDB models.
// See https://docs.voyageai.com/docs/embeddings
public static String VOYAGE_4_LARGE = "voyage-4-large";
public static String VOYAGE_4 = "voyage-4";
public static String VOYAGE_4_LITE = "voyage-4-lite";
public static String VOYAGE_CODE_4 = "voyage-code-4";
public static String VOYAGE_FINANCE_2 = "voyage-finance-2";
public static String VOYAGE_LAW_2 = "voyage-law-2";
/** Contextualized-chunk embedding model. */
public static String VOYAGE_CONTEXT_4 = "voyage-context-4";

// Legacy models, still reachable through the API.
public static String VOYAGE_3_LARGE = "voyage-3-large";
public static String VOYAGE_3_5 = "voyage-3.5";
public static String VOYAGE_3_5_lite = "voyage-3.5-lite";
public static String VOYAGE_3 = "voyage-3";
public static String VOYAGE_3_LITE = "voyage-3-lite";
public static String VOYAGE_CONTEXT_3 = "voyage-context-3";

public static Text2VecVoyageAiVectorizer of() {
return of(ObjectBuilder.identity());
Expand Down
Loading