diff --git a/src/libs/Jina/Generated/Jina.Models.TextEmbeddingInput.g.cs b/src/libs/Jina/Generated/Jina.Models.TextEmbeddingInput.g.cs
index 007f43e..a4bada5 100644
--- a/src/libs/Jina/Generated/Jina.Models.TextEmbeddingInput.g.cs
+++ b/src/libs/Jina/Generated/Jina.Models.TextEmbeddingInput.g.cs
@@ -19,6 +19,7 @@ public sealed partial class TextEmbeddingInput
/// - `jina-embeddings-v2-base-de`, 161M, 768
/// - `jina-embeddings-v2-base-zh`, 161M, 768
/// - `jina-embeddings-v2-base-code`, 137M, 768
+ /// - `jina-embeddings-v3`, 570M, 1024
/// For more information, please checkout our [technical blog](https://arxiv.org/abs/2307.11224).
///
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
@@ -39,12 +40,36 @@ public sealed partial class TextEmbeddingInput
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Jina.JsonConverters.AnyOfJsonConverterFactory2))]
public global::Jina.AnyOf>? EmbeddingType { get; set; }
+ ///
+ /// Used to convey intended downstream application to help the model produce better embeddings. Must be one of the following values:
+ /// - "retrieval.query": Specifies the given text is a query in a search or retrieval setting.
+ /// - "retrieval.passage": Specifies the given text is a document in a search or retrieval setting.
+ /// - "text-matching": Specifies the given text is used for Semantic Textual Similarity.
+ /// - "classification": Specifies that the embedding is used for classification.
+ /// - "separation": Specifies that the embedding is used for clustering.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("task")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Jina.JsonConverters.TextEmbeddingInputTaskJsonConverter))]
+ public global::Jina.TextEmbeddingInputTask? Task { get; set; }
+
+ ///
+ /// Used to specify output embedding size. If set, output embeddings will be truncated to the size specified.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("dimensions")]
+ public int? Dimensions { get; set; }
+
///
/// Flag to determine if the embeddings should be normalized to have a unit L2 norm
///
[global::System.Text.Json.Serialization.JsonPropertyName("normalized")]
public bool? Normalized { get; set; }
+ ///
+ /// Flag to determine if late chunking is applied. If True, all the sentences in inputs will be concatenated and used as input for late chunking.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("late_chunking")]
+ public bool? LateChunking { get; set; }
+
///
/// Additional properties that are not explicitly defined in the schema
///
diff --git a/src/libs/Jina/Generated/Jina.Models.TextEmbeddingInputTask.g.cs b/src/libs/Jina/Generated/Jina.Models.TextEmbeddingInputTask.g.cs
new file mode 100644
index 0000000..5bb00c1
--- /dev/null
+++ b/src/libs/Jina/Generated/Jina.Models.TextEmbeddingInputTask.g.cs
@@ -0,0 +1,74 @@
+
+#nullable enable
+
+namespace Jina
+{
+ ///
+ /// Used to convey intended downstream application to help the model produce better embeddings. Must be one of the following values:
+ /// - "retrieval.query": Specifies the given text is a query in a search or retrieval setting.
+ /// - "retrieval.passage": Specifies the given text is a document in a search or retrieval setting.
+ /// - "text-matching": Specifies the given text is used for Semantic Textual Similarity.
+ /// - "classification": Specifies that the embedding is used for classification.
+ /// - "separation": Specifies that the embedding is used for clustering.
+ ///
+ public enum TextEmbeddingInputTask
+ {
+ ///
+ ///
+ ///
+ RetrievalQuery,
+ ///
+ ///
+ ///
+ RetrievalPassage,
+ ///
+ ///
+ ///
+ TextMatching,
+ ///
+ ///
+ ///
+ Classification,
+ ///
+ ///
+ ///
+ Separation,
+ }
+
+ ///
+ /// Enum extensions to do fast conversions without the reflection.
+ ///
+ public static class TextEmbeddingInputTaskExtensions
+ {
+ ///
+ /// Converts an enum to a string.
+ ///
+ public static string ToValueString(this TextEmbeddingInputTask value)
+ {
+ return value switch
+ {
+ TextEmbeddingInputTask.RetrievalQuery => "retrieval.query",
+ TextEmbeddingInputTask.RetrievalPassage => "retrieval.passage",
+ TextEmbeddingInputTask.TextMatching => "text-matching",
+ TextEmbeddingInputTask.Classification => "classification",
+ TextEmbeddingInputTask.Separation => "separation",
+ _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
+ };
+ }
+ ///
+ /// Converts an string to a enum.
+ ///
+ public static TextEmbeddingInputTask? ToEnum(string value)
+ {
+ return value switch
+ {
+ "retrieval.query" => TextEmbeddingInputTask.RetrievalQuery,
+ "retrieval.passage" => TextEmbeddingInputTask.RetrievalPassage,
+ "text-matching" => TextEmbeddingInputTask.TextMatching,
+ "classification" => TextEmbeddingInputTask.Classification,
+ "separation" => TextEmbeddingInputTask.Separation,
+ _ => null,
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Jina/Generated/JsonConverters.TextEmbeddingInputTask.g.cs b/src/libs/Jina/Generated/JsonConverters.TextEmbeddingInputTask.g.cs
new file mode 100644
index 0000000..8ce9c47
--- /dev/null
+++ b/src/libs/Jina/Generated/JsonConverters.TextEmbeddingInputTask.g.cs
@@ -0,0 +1,49 @@
+#nullable enable
+
+namespace Jina.JsonConverters
+{
+ ///
+ public sealed class TextEmbeddingInputTaskJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Jina.TextEmbeddingInputTask Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Jina.TextEmbeddingInputTaskExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Jina.TextEmbeddingInputTask)numValue;
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Jina.TextEmbeddingInputTask value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Jina.TextEmbeddingInputTaskExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Jina/Generated/JsonConverters.TextEmbeddingInputTaskNullable.g.cs b/src/libs/Jina/Generated/JsonConverters.TextEmbeddingInputTaskNullable.g.cs
new file mode 100644
index 0000000..0a5bc45
--- /dev/null
+++ b/src/libs/Jina/Generated/JsonConverters.TextEmbeddingInputTaskNullable.g.cs
@@ -0,0 +1,56 @@
+#nullable enable
+
+namespace Jina.JsonConverters
+{
+ ///
+ public sealed class TextEmbeddingInputTaskNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Jina.TextEmbeddingInputTask? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Jina.TextEmbeddingInputTaskExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Jina.TextEmbeddingInputTask)numValue;
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Jina.TextEmbeddingInputTask? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Jina.TextEmbeddingInputTaskExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Jina/Generated/JsonSerializerContext.g.cs b/src/libs/Jina/Generated/JsonSerializerContext.g.cs
index 5421145..ce277a7 100644
--- a/src/libs/Jina/Generated/JsonSerializerContext.g.cs
+++ b/src/libs/Jina/Generated/JsonSerializerContext.g.cs
@@ -19,6 +19,8 @@ namespace Jina
typeof(global::Jina.JsonConverters.TextEmbeddingInputEmbeddingTypeNullableJsonConverter),
typeof(global::Jina.JsonConverters.TextEmbeddingInputEmbeddingTypeItemJsonConverter),
typeof(global::Jina.JsonConverters.TextEmbeddingInputEmbeddingTypeItemNullableJsonConverter),
+ typeof(global::Jina.JsonConverters.TextEmbeddingInputTaskJsonConverter),
+ typeof(global::Jina.JsonConverters.TextEmbeddingInputTaskNullableJsonConverter),
typeof(global::Jina.JsonConverters.ImageEmbeddingInputEmbeddingTypeJsonConverter),
typeof(global::Jina.JsonConverters.ImageEmbeddingInputEmbeddingTypeNullableJsonConverter),
typeof(global::Jina.JsonConverters.ImageEmbeddingInputEmbeddingTypeItemJsonConverter),
diff --git a/src/libs/Jina/Generated/JsonSerializerContextTypes.g.cs b/src/libs/Jina/Generated/JsonSerializerContextTypes.g.cs
index 9e116b5..44b7398 100644
--- a/src/libs/Jina/Generated/JsonSerializerContextTypes.g.cs
+++ b/src/libs/Jina/Generated/JsonSerializerContextTypes.g.cs
@@ -109,170 +109,174 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public bool? Type24 { get; set; }
+ public global::Jina.TextEmbeddingInputTask? Type24 { get; set; }
///
///
///
- public global::Jina.ImageEmbeddingInput? Type25 { get; set; }
+ public bool? Type25 { get; set; }
///
///
///
- public global::Jina.AnyOf>? Type26 { get; set; }
+ public global::Jina.ImageEmbeddingInput? Type26 { get; set; }
///
///
///
- public global::Jina.ImageDoc? Type27 { get; set; }
+ public global::Jina.AnyOf>? Type27 { get; set; }
///
///
///
- public global::Jina.AnyOf? Type28 { get; set; }
+ public global::Jina.ImageDoc? Type28 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type29 { get; set; }
+ public global::Jina.AnyOf? Type29 { get; set; }
///
///
///
- public global::Jina.AnyOf>? Type30 { get; set; }
+ public global::System.Collections.Generic.IList? Type30 { get; set; }
///
///
///
- public global::Jina.ImageEmbeddingInputEmbeddingType? Type31 { get; set; }
+ public global::Jina.AnyOf>? Type31 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type32 { get; set; }
+ public global::Jina.ImageEmbeddingInputEmbeddingType? Type32 { get; set; }
///
///
///
- public global::Jina.ImageEmbeddingInputEmbeddingTypeItem? Type33 { get; set; }
+ public global::System.Collections.Generic.IList? Type33 { get; set; }
///
///
///
- public global::Jina.MixedEmbeddingInput? Type34 { get; set; }
+ public global::Jina.ImageEmbeddingInputEmbeddingTypeItem? Type34 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList>? Type35 { get; set; }
+ public global::Jina.MixedEmbeddingInput? Type35 { get; set; }
///
///
///
- public global::Jina.AnyOf? Type36 { get; set; }
+ public global::System.Collections.Generic.IList>? Type36 { get; set; }
///
///
///
- public global::Jina.AnyOf>? Type37 { get; set; }
+ public global::Jina.AnyOf? Type37 { get; set; }
///
///
///
- public global::Jina.MixedEmbeddingInputEmbeddingType? Type38 { get; set; }
+ public global::Jina.AnyOf>? Type38 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type39 { get; set; }
+ public global::Jina.MixedEmbeddingInputEmbeddingType? Type39 { get; set; }
///
///
///
- public global::Jina.MixedEmbeddingInputEmbeddingTypeItem? Type40 { get; set; }
+ public global::System.Collections.Generic.IList? Type40 { get; set; }
///
///
///
- public global::Jina.HTTPValidationError? Type41 { get; set; }
+ public global::Jina.MixedEmbeddingInputEmbeddingTypeItem? Type41 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type42 { get; set; }
+ public global::Jina.HTTPValidationError? Type42 { get; set; }
///
///
///
- public global::Jina.ValidationError? Type43 { get; set; }
+ public global::System.Collections.Generic.IList? Type43 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList>? Type44 { get; set; }
+ public global::Jina.ValidationError? Type44 { get; set; }
///
///
///
- public global::Jina.AnyOf? Type45 { get; set; }
+ public global::System.Collections.Generic.IList>? Type45 { get; set; }
///
///
///
- public global::Jina.HealthModel? Type46 { get; set; }
+ public global::Jina.AnyOf? Type46 { get; set; }
///
///
///
- public global::Jina.ModelEmbeddingOutput? Type47 { get; set; }
+ public global::Jina.HealthModel? Type47 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type48 { get; set; }
+ public global::Jina.ModelEmbeddingOutput? Type48 { get; set; }
///
///
///
- public global::Jina.ModelEmbeddingOutputDataItem? Type49 { get; set; }
+ public global::System.Collections.Generic.IList? Type49 { get; set; }
///
///
///
- public global::Jina.RankAPIInput? Type50 { get; set; }
+ public global::Jina.ModelEmbeddingOutputDataItem? Type50 { get; set; }
///
///
///
- public global::Jina.AnyOf? Type51 { get; set; }
+ public global::Jina.RankAPIInput? Type51 { get; set; }
///
///
///
- public global::Jina.ApiSchemasRankTextDoc? Type52 { get; set; }
+ public global::Jina.AnyOf? Type52 { get; set; }
///
///
///
- public global::Jina.AnyOf, global::System.Collections.Generic.IList>? Type53 { get; set; }
+ public global::Jina.ApiSchemasRankTextDoc? Type53 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type54 { get; set; }
+ public global::Jina.AnyOf, global::System.Collections.Generic.IList>? Type54 { get; set; }
///
///
///
- public global::Jina.RankingOutput? Type55 { get; set; }
+ public global::System.Collections.Generic.IList? Type55 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type56 { get; set; }
+ public global::Jina.RankingOutput? Type56 { get; set; }
///
///
///
- public global::Jina.RankingOutputResult? Type57 { get; set; }
+ public global::System.Collections.Generic.IList? Type57 { get; set; }
///
///
///
- public global::Jina.AllOf? Type58 { get; set; }
+ public global::Jina.RankingOutputResult? Type58 { get; set; }
///
///
///
- public global::Jina.ApiSchemasRankUsage? Type59 { get; set; }
+ public global::Jina.AllOf? Type59 { get; set; }
///
///
///
- public global::Jina.TextEmbeddingAPIInput? Type60 { get; set; }
+ public global::Jina.ApiSchemasRankUsage? Type60 { get; set; }
///
///
///
- public global::Jina.TextEmbeddingAPIInputInputType? Type61 { get; set; }
+ public global::Jina.TextEmbeddingAPIInput? Type61 { get; set; }
///
///
///
- public global::Jina.AnyOf>? Type62 { get; set; }
+ public global::Jina.TextEmbeddingAPIInputInputType? Type62 { get; set; }
///
///
///
- public global::Jina.TextEmbeddingAPIInputEmbeddingType? Type63 { get; set; }
+ public global::Jina.AnyOf>? Type63 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type64 { get; set; }
+ public global::Jina.TextEmbeddingAPIInputEmbeddingType? Type64 { get; set; }
///
///
///
- public global::Jina.TextEmbeddingAPIInputEmbeddingTypeItem? Type65 { get; set; }
+ public global::System.Collections.Generic.IList? Type65 { get; set; }
+ ///
+ ///
+ ///
+ public global::Jina.TextEmbeddingAPIInputEmbeddingTypeItem? Type66 { get; set; }
}
}
\ No newline at end of file
diff --git a/src/libs/Jina/openapi.yaml b/src/libs/Jina/openapi.yaml
index ffac0fc..49f89a4 100644
--- a/src/libs/Jina/openapi.yaml
+++ b/src/libs/Jina/openapi.yaml
@@ -2,7 +2,7 @@ openapi: 3.0.1
info:
title: The Jina Embedding Serving API
description: This is the UniversalAPI to access all the Jina embedding models
- version: 0.1.51
+ version: 0.1.53
servers:
- url: https://api.jina.ai/
paths:
@@ -717,7 +717,7 @@ components:
model:
title: Model
type: string
- description: "The identifier of the model.\n\nAvailable models and corresponding param size and dimension:\n- `jina-clip-v1`,\t223M,\t768\n- `jina-embeddings-v2-base-en`,\t137M,\t768\n- `jina-embeddings-v2-base-es`,\t161M,\t768\n- `jina-embeddings-v2-base-de`,\t161M,\t768\n- `jina-embeddings-v2-base-zh`,\t161M,\t768\n- `jina-embeddings-v2-base-code`,\t137M,\t768\n\nFor more information, please checkout our [technical blog](https://arxiv.org/abs/2307.11224).\n"
+ description: "The identifier of the model.\n\nAvailable models and corresponding param size and dimension:\n- `jina-clip-v1`,\t223M,\t768\n- `jina-embeddings-v2-base-en`,\t137M,\t768\n- `jina-embeddings-v2-base-es`,\t161M,\t768\n- `jina-embeddings-v2-base-de`,\t161M,\t768\n- `jina-embeddings-v2-base-zh`,\t161M,\t768\n- `jina-embeddings-v2-base-code`,\t137M,\t768\n- `jina-embeddings-v3`,\t570M,\t1024\n\nFor more information, please checkout our [technical blog](https://arxiv.org/abs/2307.11224).\n"
input:
title: Input
anyOf:
@@ -748,10 +748,28 @@ components:
- ubinary
type: string
description: 'The format in which you want the embeddings to be returned.Possible value are `float`, `base64`, `binary`, `ubinary` or a list containing any of them. Defaults to `float`'
+ task:
+ title: Task
+ enum:
+ - retrieval.query
+ - retrieval.passage
+ - text-matching
+ - classification
+ - separation
+ type: string
+ description: "Used to convey intended downstream application to help the model produce better embeddings. Must be one of the following values:\n- \"retrieval.query\": Specifies the given text is a query in a search or retrieval setting.\n- \"retrieval.passage\": Specifies the given text is a document in a search or retrieval setting.\n- \"text-matching\": Specifies the given text is used for Semantic Textual Similarity.\n- \"classification\": Specifies that the embedding is used for classification.\n- \"separation\": Specifies that the embedding is used for clustering.\n"
+ dimensions:
+ title: Dimensions
+ type: integer
+ description: 'Used to specify output embedding size. If set, output embeddings will be truncated to the size specified.'
normalized:
title: Normalized
type: boolean
description: Flag to determine if the embeddings should be normalized to have a unit L2 norm
+ late_chunking:
+ title: Late Chunking
+ type: boolean
+ description: 'Flag to determine if late chunking is applied. If True, all the sentences in inputs will be concatenated and used as input for late chunking.'
additionalProperties: false
description: The input to the API for text embedding. OpenAI compatible
example: