From 4f606924cccd46c27658afafb1b8753fdadb0b65 Mon Sep 17 00:00:00 2001 From: Tim Grein Date: Tue, 1 Jul 2025 15:01:46 +0200 Subject: [PATCH] Add rerank task type specification (#4488) Co-authored-by: Quentin Pradet Co-authored-by: Laura Trotta <153528055+l-trotta@users.noreply.github.com> (cherry picked from commit 7c4997b914e6737c2986b71dfa0b4079de6b5707) --- output/schema/schema.json | 76 +++++++++---------- specification/inference/_types/CommonTypes.ts | 15 +++- 2 files changed, 52 insertions(+), 39 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 41cd3da810..dd5ba0b4dd 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -163360,7 +163360,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L781-L815" + "specLocation": "inference/_types/CommonTypes.ts#L794-L828" }, { "kind": "enum", @@ -163373,7 +163373,7 @@ "name": "ElasticsearchServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L831-L833" + "specLocation": "inference/_types/CommonTypes.ts#L844-L846" }, { "kind": "interface", @@ -163396,7 +163396,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L817-L823" + "specLocation": "inference/_types/CommonTypes.ts#L830-L836" }, { "kind": "enum", @@ -163415,7 +163415,7 @@ "name": "ElasticsearchTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L825-L829" + "specLocation": "inference/_types/CommonTypes.ts#L838-L842" }, { "kind": "interface", @@ -163461,7 +163461,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L835-L861" + "specLocation": "inference/_types/CommonTypes.ts#L848-L874" }, { "kind": "enum", @@ -163474,7 +163474,7 @@ "name": "ElserServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L867-L869" + "specLocation": "inference/_types/CommonTypes.ts#L880-L882" }, { "kind": "enum", @@ -163487,7 +163487,7 @@ "name": "ElserTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L863-L865" + "specLocation": "inference/_types/CommonTypes.ts#L876-L878" }, { "kind": "enum", @@ -163500,7 +163500,7 @@ "name": "GoogleAiServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L894-L896" + "specLocation": "inference/_types/CommonTypes.ts#L907-L909" }, { "kind": "interface", @@ -163548,7 +163548,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L871-L887" + "specLocation": "inference/_types/CommonTypes.ts#L884-L900" }, { "kind": "enum", @@ -163564,7 +163564,7 @@ "name": "GoogleAiStudioTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L889-L892" + "specLocation": "inference/_types/CommonTypes.ts#L902-L905" }, { "kind": "interface", @@ -163638,7 +163638,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L898-L924" + "specLocation": "inference/_types/CommonTypes.ts#L911-L937" }, { "kind": "enum", @@ -163651,7 +163651,7 @@ "name": "GoogleVertexAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L944-L946" + "specLocation": "inference/_types/CommonTypes.ts#L957-L959" }, { "kind": "interface", @@ -163685,7 +163685,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L926-L935" + "specLocation": "inference/_types/CommonTypes.ts#L939-L948" }, { "kind": "enum", @@ -163707,7 +163707,7 @@ "name": "GoogleVertexAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L937-L942" + "specLocation": "inference/_types/CommonTypes.ts#L950-L955" }, { "kind": "interface", @@ -163769,7 +163769,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L948-L980" + "specLocation": "inference/_types/CommonTypes.ts#L961-L993" }, { "kind": "enum", @@ -163782,7 +163782,7 @@ "name": "HuggingFaceServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1001-L1003" + "specLocation": "inference/_types/CommonTypes.ts#L1014-L1016" }, { "kind": "interface", @@ -163816,7 +163816,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L982-L992" + "specLocation": "inference/_types/CommonTypes.ts#L995-L1005" }, { "kind": "enum", @@ -163838,7 +163838,7 @@ "name": "HuggingFaceTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L994-L999" + "specLocation": "inference/_types/CommonTypes.ts#L1007-L1012" }, { "kind": "interface", @@ -164241,7 +164241,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1005-L1034" + "specLocation": "inference/_types/CommonTypes.ts#L1018-L1047" }, { "kind": "enum", @@ -164254,7 +164254,7 @@ "name": "JinaAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1064-L1066" + "specLocation": "inference/_types/CommonTypes.ts#L1077-L1079" }, { "kind": "enum", @@ -164273,7 +164273,7 @@ "name": "JinaAISimilarityType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1068-L1072" + "specLocation": "inference/_types/CommonTypes.ts#L1081-L1085" }, { "kind": "interface", @@ -164319,7 +164319,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1036-L1057" + "specLocation": "inference/_types/CommonTypes.ts#L1049-L1070" }, { "kind": "enum", @@ -164335,7 +164335,7 @@ "name": "JinaAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1059-L1062" + "specLocation": "inference/_types/CommonTypes.ts#L1072-L1075" }, { "kind": "enum", @@ -164357,7 +164357,7 @@ "name": "JinaAITextEmbeddingTask", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1074-L1079" + "specLocation": "inference/_types/CommonTypes.ts#L1087-L1092" }, { "kind": "interface", @@ -164515,7 +164515,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1081-L1108" + "specLocation": "inference/_types/CommonTypes.ts#L1094-L1121" }, { "kind": "enum", @@ -164528,7 +164528,7 @@ "name": "MistralServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1116-L1118" + "specLocation": "inference/_types/CommonTypes.ts#L1129-L1131" }, { "kind": "enum", @@ -164547,7 +164547,7 @@ "name": "MistralTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1110-L1114" + "specLocation": "inference/_types/CommonTypes.ts#L1123-L1127" }, { "kind": "interface", @@ -164634,7 +164634,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1120-L1162" + "specLocation": "inference/_types/CommonTypes.ts#L1133-L1175" }, { "kind": "enum", @@ -164647,7 +164647,7 @@ "name": "OpenAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1178-L1180" + "specLocation": "inference/_types/CommonTypes.ts#L1191-L1193" }, { "kind": "interface", @@ -164669,7 +164669,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1164-L1170" + "specLocation": "inference/_types/CommonTypes.ts#L1177-L1183" }, { "kind": "enum", @@ -164688,7 +164688,7 @@ "name": "OpenAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1172-L1176" + "specLocation": "inference/_types/CommonTypes.ts#L1185-L1189" }, { "kind": "interface", @@ -165298,7 +165298,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1182-L1213" + "specLocation": "inference/_types/CommonTypes.ts#L1195-L1226" }, { "kind": "enum", @@ -165311,7 +165311,7 @@ "name": "VoyageAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1246-L1248" + "specLocation": "inference/_types/CommonTypes.ts#L1259-L1261" }, { "kind": "interface", @@ -165371,7 +165371,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1215-L1239" + "specLocation": "inference/_types/CommonTypes.ts#L1228-L1252" }, { "kind": "enum", @@ -165387,7 +165387,7 @@ "name": "VoyageAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1241-L1244" + "specLocation": "inference/_types/CommonTypes.ts#L1254-L1257" }, { "kind": "interface", @@ -165475,7 +165475,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1250-L1287" + "specLocation": "inference/_types/CommonTypes.ts#L1263-L1300" }, { "kind": "enum", @@ -165488,7 +165488,7 @@ "name": "WatsonxServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1293-L1295" + "specLocation": "inference/_types/CommonTypes.ts#L1306-L1308" }, { "kind": "enum", @@ -165501,7 +165501,7 @@ "name": "WatsonxTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1289-L1291" + "specLocation": "inference/_types/CommonTypes.ts#L1302-L1304" }, { "kind": "request", diff --git a/specification/inference/_types/CommonTypes.ts b/specification/inference/_types/CommonTypes.ts index 04335c0bab..932038c81b 100644 --- a/specification/inference/_types/CommonTypes.ts +++ b/specification/inference/_types/CommonTypes.ts @@ -771,13 +771,26 @@ export class EisServiceSettings { } export enum EisTaskType { - chat_completion + chat_completion, + rerank } export enum EisServiceType { elastic } +export class EisTaskSettings { + /** + * For a `rerank` task, return doc text within the results. + */ + return_documents?: boolean + + /** + * For a `rerank` task, the number of the top N documents that should be returned. + */ + top_n?: integer +} + export class ElasticsearchServiceSettings { /** * Adaptive allocations configuration details.