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
10 changes: 10 additions & 0 deletions src/Weaviate.Client/Configure/Vectorizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,14 @@ public static VectorConfigBuilder Text2VecMistral(
}
);

public static VectorConfigBuilder Text2VecModel2Vec(bool? vectorizeCollectionName = null) =>
new(
new Vectorizer.Text2VecModel2Vec
{
VectorizeCollectionName = vectorizeCollectionName,
}
);

public static VectorConfigBuilder Text2VecOllama(
string? apiEndpoint = null,
string? model = null,
Expand Down Expand Up @@ -516,12 +524,14 @@ public static VectorConfigBuilder Text2VecVoyageAI(

public static VectorConfigBuilder Text2VecJinaAI(
string? model = null,
int? dimensions = null,
bool? vectorizeCollectionName = null
) =>
new(
new Vectorizer.Text2VecJinaAI
{
Model = model,
Dimensions = dimensions,
VectorizeCollectionName = vectorizeCollectionName,
}
);
Expand Down
20 changes: 10 additions & 10 deletions src/Weaviate.Client/Models/GenerativeConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public record Custom : IGenerativeConfig
public abstract record OpenAIBase : IGenerativeConfig
{
public string? BaseURL { get; set; }
public int? FrequencyPenaltyProperty { get; set; }
public int? MaxTokensProperty { get; set; }
public int? PresencePenaltyProperty { get; set; }
public double? TemperatureProperty { get; set; }
public double? TopPProperty { get; set; }
public int? FrequencyPenalty { get; set; }
public int? MaxTokens { get; set; }
public int? PresencePenalty { get; set; }
public double? Temperature { get; set; }
public double? TopP { get; set; }
public abstract string Type { get; }
}

Expand Down Expand Up @@ -68,12 +68,12 @@ public record Cohere : IGenerativeConfig
public const string TypeValue = "generative-cohere";
public string Type => TypeValue;

public int? KProperty { get; set; }
public int? K { get; set; }
public string? Model { get; set; }
public int? MaxTokensProperty { get; set; }
public string? ReturnLikelihoodsProperty { get; set; }
public string[]? StopSequencesProperty { get; set; }
public double? TemperatureProperty { get; set; }
public int? MaxTokens { get; set; }
public string? ReturnLikelihoods { get; set; }
public string[]? StopSequences { get; set; }
public double? Temperature { get; set; }
}

public record Databricks : IGenerativeConfig
Expand Down
12 changes: 12 additions & 0 deletions src/Weaviate.Client/Models/Vectorizer.Declarations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,18 @@ public Text2VecMistral()
: base(IdentifierValue) { }
}

/// <summary>
/// The configuration for text vectorization using the Model2Vec module.
/// See the documentation for detailed usage.
/// </summary>
public partial record Text2VecModel2Vec : VectorizerConfig
{
public const string IdentifierValue = "text2vec-model2vec";

public Text2VecModel2Vec()
: base(IdentifierValue) { }
}

/// <summary>
/// The configuration for text vectorization using the Ollama module.
/// See the documentation for detailed usage.
Expand Down
11 changes: 6 additions & 5 deletions src/Weaviate.Client/Models/Vectorizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ public partial record Text2VecDatabricks
public bool? VectorizeCollectionName { get; set; } = null;
}

public partial record Text2VecGPT4All
{
public bool? VectorizeCollectionName { get; set; } = null;
}

public partial record Text2VecHuggingFace
{
public string? EndpointURL { get; set; } = null;
Expand All @@ -210,6 +205,7 @@ public partial record Text2VecHuggingFace
public partial record Text2VecJinaAI
{
public string? Model { get; set; } = null;
public int? Dimensions { get; set; } = null;
public bool? VectorizeCollectionName { get; set; } = null;
}

Expand Down Expand Up @@ -241,6 +237,11 @@ public partial record Text2VecMistral
public bool? VectorizeCollectionName { get; set; } = null;
}

public partial record Text2VecModel2Vec
{
public bool? VectorizeCollectionName { get; set; } = null;
}

public partial record Text2VecOllama
{
public string? ApiEndpoint { get; set; } = null;
Expand Down
1 change: 1 addition & 0 deletions src/Weaviate.Client/Models/Vectorizers/Factory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ internal static class VectorizerConfigFactory
{ Vectorizer.Text2VecJinaAI.IdentifierValue, typeof(Vectorizer.Text2VecJinaAI) },
{ Vectorizer.Text2VecNvidia.IdentifierValue, typeof(Vectorizer.Text2VecNvidia) },
{ Vectorizer.Text2VecMistral.IdentifierValue, typeof(Vectorizer.Text2VecMistral) },
{ Vectorizer.Text2VecModel2Vec.IdentifierValue, typeof(Vectorizer.Text2VecModel2Vec) },
{ Vectorizer.Text2VecOllama.IdentifierValue, typeof(Vectorizer.Text2VecOllama) },
{ Vectorizer.Text2VecOpenAI.IdentifierValue, typeof(Vectorizer.Text2VecOpenAI) },
{ Vectorizer.Text2VecGoogle.IdentifierValue, typeof(Vectorizer.Text2VecGoogle) },
Expand Down