@@ -18,6 +18,8 @@ public record Multi2VecCohereVectorizer(
1818 @ SerializedName ("baseURL" ) String baseUrl ,
1919 /** Inference model to use. */
2020 @ SerializedName ("model" ) String model ,
21+ /** The number of dimensions for the generated embeddings. */
22+ @ SerializedName ("dimensions" ) Integer dimensions ,
2123 /** The truncate strategy to use. */
2224 @ SerializedName ("truncate" ) String truncate ,
2325 /** BLOB properties included in the embedding. */
@@ -71,6 +73,7 @@ public static Multi2VecCohereVectorizer of(Function<Builder, ObjectBuilder<Multi
7173 public Multi2VecCohereVectorizer (
7274 String baseUrl ,
7375 String model ,
76+ String dimensions ,
7477 String truncate ,
7578 List <String > imageFields ,
7679 List <String > textFields ,
@@ -81,6 +84,7 @@ public Multi2VecCohereVectorizer(
8184 this .vectorizeCollectionName = false ;
8285 this .baseUrl = baseUrl ;
8386 this .model = model ;
87+ this .dimensions = dimensions ;
8488 this .truncate = truncate ;
8589 this .imageFields = imageFields ;
8690 this .textFields = textFields ;
@@ -93,6 +97,7 @@ public Multi2VecCohereVectorizer(Builder builder) {
9397 this (
9498 builder .baseUrl ,
9599 builder .model ,
100+ builder .dimensions ,
96101 builder .truncate ,
97102 builder .imageFields .keySet ().stream ().toList (),
98103 builder .textFields .keySet ().stream ().toList (),
@@ -114,6 +119,7 @@ public static class Builder implements ObjectBuilder<Multi2VecCohereVectorizer>
114119
115120 private String baseUrl ;
116121 private String model ;
122+ private Integer dimensions ;
117123 private String truncate ;
118124
119125 /** Set base URL of the embedding service. */
@@ -127,6 +133,11 @@ public Builder model(String model) {
127133 return this ;
128134 }
129135
136+ public Builder dimensions (Integer dimensions ) {
137+ this .dimensions = dimensions ;
138+ return this ;
139+ }
140+
130141 public Builder truncate (String truncate ) {
131142 this .truncate = truncate ;
132143 return this ;
0 commit comments