Skip to content
Merged
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
73 changes: 37 additions & 36 deletions docs/VECTORIZER_CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public record MultiVectorConfig
{
// Aggregation method for combining multiple vectors during search
public string? Aggregation { get; init; } = "maxSim";

// Encoding configuration for compressing multi-vectors
public EncodingConfig? Encoding { get; init; } = new MuveraEncoding();
}
Expand Down Expand Up @@ -461,7 +461,7 @@ Use when you provide your own vectors.
var config = Configure.Vectorizer.SelfProvided();
```

**Wire Format:** `none`
**Wire Format:** `none`
**Type:** Single Vector

#### SelfProvided (Configure.MultiVectors)
Expand All @@ -470,7 +470,7 @@ var config = Configure.Vectorizer.SelfProvided();
var config = Configure.MultiVectors.SelfProvided().New("colbert");
```

**Wire Format:** `none`
**Wire Format:** `none`
**Type:** Multi-Vector

### Text Vectorizers
Expand All @@ -492,7 +492,7 @@ var config = Configure.Vectors.Text2VecOpenAI(
).New("default", "title", "content");
```

**Wire Format:** `text2vec-openai`
**Wire Format:** `text2vec-openai`
**Type:** Single Vector

**Parameters:**
Expand All @@ -518,7 +518,7 @@ var config = Configure.Vectors.Text2VecAzureOpenAI(
).New("default", "text");
```

**Wire Format:** `text2vec-azure-openai`
**Wire Format:** `text2vec-azure-openai`
**Type:** Single Vector

**Required Parameters:**
Expand All @@ -539,7 +539,7 @@ var config = Configure.Vectors.Text2VecCohere(
).New("default", "content");
```

**Wire Format:** `text2vec-cohere`
**Wire Format:** `text2vec-cohere`
**Type:** Single Vector

**Parameters:**
Expand All @@ -562,7 +562,7 @@ var config = Configure.Vectors.Text2VecHuggingFace(
).New("default", "text");
```

**Wire Format:** `text2vec-huggingface`
**Wire Format:** `text2vec-huggingface`
**Type:** Single Vector

**Parameters:**
Expand All @@ -587,7 +587,7 @@ var config = Configure.Vectors.Text2VecTransformers(
).New("default", "description");
```

**Wire Format:** `text2vec-transformers`
**Wire Format:** `text2vec-transformers`
**Type:** Single Vector

**Parameters:**
Expand All @@ -611,7 +611,7 @@ var config = Configure.Vectors.Text2VecGoogle(
).New("default", "text");
```

**Wire Format:** `text2vec-palm`
**Wire Format:** `text2vec-palm`
**Type:** Single Vector

**Parameters:**
Expand All @@ -635,7 +635,7 @@ var config = Configure.Vectors.Text2VecAWS(
).New("default", "content");
```

**Wire Format:** `text2vec-aws`
**Wire Format:** `text2vec-aws`
**Type:** Single Vector

**Required Parameters:**
Expand All @@ -655,7 +655,7 @@ var config = Configure.Vectors.Text2VecJinaAI(
).New("default", "text");
```

**Wire Format:** `text2vec-jinaai`
**Wire Format:** `text2vec-jinaai`
**Type:** Single Vector

#### Text2VecVoyageAI
Expand All @@ -672,7 +672,7 @@ var config = Configure.Vectors.Text2VecVoyageAI(
).New("default", "content");
```

**Wire Format:** `text2vec-voyageai`
**Wire Format:** `text2vec-voyageai`
**Type:** Single Vector

#### Text2VecOllama
Expand All @@ -687,7 +687,7 @@ var config = Configure.Vectors.Text2VecOllama(
).New("default", "text");
```

**Wire Format:** `text2vec-ollama`
**Wire Format:** `text2vec-ollama`
**Type:** Single Vector

#### Text2VecWeaviate
Expand All @@ -703,7 +703,7 @@ var config = Configure.Vectors.Text2VecWeaviate(
).New("default", "content");
```

**Wire Format:** `text2vec-weaviate`
**Wire Format:** `text2vec-weaviate`
**Type:** Single Vector

#### Text2VecDatabricks
Expand All @@ -718,7 +718,7 @@ var config = Configure.Vectors.Text2VecDatabricks(
).New("default", "text");
```

**Wire Format:** `text2vec-databricks`
**Wire Format:** `text2vec-databricks`
**Type:** Single Vector

**Required Parameters:**
Expand All @@ -737,7 +737,7 @@ var config = Configure.Vectors.Text2VecNvidia(
).New("default", "content");
```

**Wire Format:** `text2vec-nvidia`
**Wire Format:** `text2vec-nvidia`
**Type:** Single Vector

#### Text2VecMistral
Expand All @@ -752,7 +752,7 @@ var config = Configure.Vectors.Text2VecMistral(
).New("default", "text");
```

**Wire Format:** `text2vec-mistral`
**Wire Format:** `text2vec-mistral`
**Type:** Single Vector

#### Text2VecMorph
Expand All @@ -767,7 +767,7 @@ var config = Configure.Vectors.Text2VecMorph(
).New("default", "content");
```

**Wire Format:** `text2vec-morph`
**Wire Format:** `text2vec-morph`
**Type:** Single Vector

#### Text2VecModel2Vec
Expand All @@ -781,7 +781,7 @@ var config = Configure.Vectors.Text2VecModel2Vec(
).New("default", "text");
```

**Wire Format:** `text2vec-model2vec`
**Wire Format:** `text2vec-model2vec`
**Type:** Single Vector

### Multi-Media Vectorizers
Expand All @@ -801,7 +801,7 @@ var config = Configure.Vectors.Multi2VecClip(
).New("default");
```

**Wire Format:** `multi2vec-clip`
**Wire Format:** `multi2vec-clip`
**Type:** Single Vector

**With Weighted Fields:**
Expand Down Expand Up @@ -835,7 +835,7 @@ var config = Configure.Vectors.Multi2VecBind(
).New("default");
```

**Wire Format:** `multi2vec-bind`
**Wire Format:** `multi2vec-bind`
**Type:** Single Vector

**Supported Modalities:**
Expand Down Expand Up @@ -873,7 +873,7 @@ var config = Configure.Vectors.Multi2VecGoogle(
).New("default");
```

**Wire Format:** `multi2vec-palm`
**Wire Format:** `multi2vec-palm`
**Type:** Single Vector

**Required Parameters:**
Expand All @@ -899,7 +899,7 @@ var config = Configure.Vectors.Multi2VecCohere(
).New("default");
```

**Wire Format:** `multi2vec-cohere`
**Wire Format:** `multi2vec-cohere`
**Type:** Single Vector

#### Multi2VecAWS
Expand All @@ -917,7 +917,7 @@ var config = Configure.Vectors.Multi2VecAWS(
).New("default");
```

**Wire Format:** `multi2vec-aws`
**Wire Format:** `multi2vec-aws`
**Type:** Single Vector

#### Multi2VecJinaAI
Expand All @@ -935,7 +935,7 @@ var config = Configure.Vectors.Multi2VecJinaAI(
).New("default");
```

**Wire Format:** `multi2vec-jinaai`
**Wire Format:** `multi2vec-jinaai`
**Type:** Single Vector

#### Multi2VecVoyageAI
Expand All @@ -948,12 +948,13 @@ var config = Configure.Vectors.Multi2VecVoyageAI(
imageFields: ["photo"],
model: "voyage-multimodal-3",
textFields: ["caption"],
videoFields: ["video"],
truncate: false,
vectorizeCollectionName: true
).New("default");
```

**Wire Format:** `multi2vec-voyageai`
**Wire Format:** `multi2vec-voyageai`
**Type:** Single Vector

#### Multi2VecNvidia
Expand All @@ -969,7 +970,7 @@ var config = Configure.Vectors.Multi2VecNvidia(
).New("default");
```

**Wire Format:** `multi2vec-nvidia`
**Wire Format:** `multi2vec-nvidia`
**Type:** Single Vector

### Image Vectorizers
Expand All @@ -986,7 +987,7 @@ var config = Configure.Vectors.Img2VecNeural(
).New("default");
```

**Wire Format:** `img2vec-neural`
**Wire Format:** `img2vec-neural`
**Type:** Single Vector

**Required Parameters:**
Expand All @@ -1007,7 +1008,7 @@ var config = Configure.Vectors.Ref2VecCentroid(
).New("default");
```

**Wire Format:** `ref2vec-centroid`
**Wire Format:** `ref2vec-centroid`
**Type:** Single Vector

**Required Parameters:**
Expand Down Expand Up @@ -1044,7 +1045,7 @@ var config = Configure.MultiVectors.Text2MultiVecJinaAI(
);
```

**Wire Format:** `text2multivec-jinaai`
**Wire Format:** `text2multivec-jinaai`
**Type:** Multi-Vector

#### Multi2MultiVecJinaAI
Expand All @@ -1064,7 +1065,7 @@ var config = Configure.MultiVectors.Multi2MultiVecJinaAI(
);
```

**Wire Format:** `multi2multivec-jinaai`
**Wire Format:** `multi2multivec-jinaai`
**Type:** Multi-Vector

**With Weighted Fields:**
Expand Down Expand Up @@ -1128,11 +1129,11 @@ var collection = await client.Collections.Create(
// Text embeddings
Configure.Vectors.Text2VecOpenAI(model: "text-embedding-3-small")
.New("text_vec", "title", "content"),

// Image embeddings
Configure.Vectors.Img2VecNeural(imageFields: ["image"])
.New("image_vec"),

// Multi-modal embeddings
Configure.Vectors.Multi2VecClip(
textFields: ["title"],
Expand All @@ -1158,7 +1159,7 @@ var collection = await client.Collections.Create(
// Regular single vector
Configure.Vectors.Text2VecOpenAI()
.New("regular"),

// Multi-vector for fine-grained retrieval
Configure.MultiVectors.Text2MultiVecJinaAI(model: "jina-colbert-v2")
.New(
Expand Down Expand Up @@ -1328,11 +1329,11 @@ var collection = await client.Collections.Create(
// Fast vector for initial retrieval
Configure.Vectors.Text2VecOpenAI(model: "text-embedding-3-small")
.New("fast", "title", "summary"),

// Detailed vector for reranking
Configure.Vectors.Text2VecOpenAI(model: "text-embedding-3-large")
.New("detailed", "title", "content"),

// Specialized domain vector
Configure.Vectors.Text2VecCohere(model: "embed-english-v3.0")
.New("cohere", "content")
Expand Down
14 changes: 13 additions & 1 deletion src/Weaviate.Client/Configure/VectorizerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,34 +242,46 @@ public VectorizerConfig Multi2VecGoogle(
public VectorizerConfig Multi2VecVoyageAI(
WeightedFields imageFields,
WeightedFields textFields,
WeightedFields videoFields,
string? baseURL = null,
int? dimensions = null,
string? model = null,
bool? truncate = null,
bool? vectorizeCollectionName = null
) =>
new Models.Vectorizer.Multi2VecVoyageAI
{
BaseURL = baseURL,
Dimensions = dimensions,
ImageFields = imageFields,
Model = model,
TextFields = textFields,
VideoFields = videoFields,
Truncate = truncate,
VectorizeCollectionName = vectorizeCollectionName,
Weights = VectorizerWeights.FromWeightedFields(imageFields, textFields),
Weights = VectorizerWeights.FromWeightedFields(
imageFields,
textFields,
videoFields: videoFields
),
};

public VectorizerConfig Multi2VecVoyageAI(
string[]? imageFields = null,
string[]? textFields = null,
string[]? videoFields = null,
string? baseURL = null,
int? dimensions = null,
string? model = null,
bool? truncate = null,
bool? vectorizeCollectionName = null
) =>
new Models.Vectorizer.Multi2VecVoyageAI
{
BaseURL = baseURL,
Dimensions = dimensions,
ImageFields = imageFields,
VideoFields = videoFields,
Model = model,
TextFields = textFields,
Truncate = truncate,
Expand Down
2 changes: 2 additions & 0 deletions src/Weaviate.Client/Models/Vectorizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,11 @@ internal Multi2VecVoyageAI() { }

[JsonPropertyName("baseUrl")]
public string? BaseURL { get; set; } = null;
public int? Dimensions { get; set; } = null;
public string[]? ImageFields { get; set; } = null;
public string? Model { get; set; } = null;
public string[]? TextFields { get; set; } = null;
public string[]? VideoFields { get; set; } = null;
public bool? Truncate { get; set; } = null;

[JsonPropertyName("vectorizeClassName")]
Expand Down
Loading