diff --git a/src/Weaviate.Client/Configure/Vectorizer.cs b/src/Weaviate.Client/Configure/Vectorizer.cs index 1451bdf0..65425867 100644 --- a/src/Weaviate.Client/Configure/Vectorizer.cs +++ b/src/Weaviate.Client/Configure/Vectorizer.cs @@ -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, @@ -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, } ); diff --git a/src/Weaviate.Client/Models/GenerativeConfig.cs b/src/Weaviate.Client/Models/GenerativeConfig.cs index 6bfca963..521f98ef 100644 --- a/src/Weaviate.Client/Models/GenerativeConfig.cs +++ b/src/Weaviate.Client/Models/GenerativeConfig.cs @@ -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; } } @@ -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 diff --git a/src/Weaviate.Client/Models/Vectorizer.Declarations.cs b/src/Weaviate.Client/Models/Vectorizer.Declarations.cs index bcdbab6f..d4d3bfc9 100644 --- a/src/Weaviate.Client/Models/Vectorizer.Declarations.cs +++ b/src/Weaviate.Client/Models/Vectorizer.Declarations.cs @@ -285,6 +285,18 @@ public Text2VecMistral() : base(IdentifierValue) { } } + /// + /// The configuration for text vectorization using the Model2Vec module. + /// See the documentation for detailed usage. + /// + public partial record Text2VecModel2Vec : VectorizerConfig + { + public const string IdentifierValue = "text2vec-model2vec"; + + public Text2VecModel2Vec() + : base(IdentifierValue) { } + } + /// /// The configuration for text vectorization using the Ollama module. /// See the documentation for detailed usage. diff --git a/src/Weaviate.Client/Models/Vectorizer.cs b/src/Weaviate.Client/Models/Vectorizer.cs index 442e8c80..985ee107 100644 --- a/src/Weaviate.Client/Models/Vectorizer.cs +++ b/src/Weaviate.Client/Models/Vectorizer.cs @@ -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; @@ -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; } @@ -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; diff --git a/src/Weaviate.Client/Models/Vectorizers/Factory.cs b/src/Weaviate.Client/Models/Vectorizers/Factory.cs index 68ab8659..d0d31c8f 100644 --- a/src/Weaviate.Client/Models/Vectorizers/Factory.cs +++ b/src/Weaviate.Client/Models/Vectorizers/Factory.cs @@ -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) },