@@ -51,6 +51,7 @@ public class AuthorizationResponseEntityTests extends AbstractBWCWireSerializati
5151
5252 // gp-llm-v2
5353 public static final String GP_LLM_V2_CHAT_COMPLETION_ENDPOINT_ID = ".gp-llm-v2-chat_completion" ;
54+ public static final String GP_LLM_V2_COMPLETION_ENDPOINT_ID = ".gp-llm-v2-completion" ;
5455 public static final String GP_LLM_V2_MODEL_NAME = "gp-llm-v2" ;
5556
5657 // elser-2
@@ -190,6 +191,19 @@ public record EisAuthorizationResponse(
190191 ],
191192 "release_date": "2024-05-01"
192193 },
194+ {
195+ "id": ".gp-llm-v2-completion",
196+ "model_name": "gp-llm-v2",
197+ "task_types": {
198+ "eis": "chat",
199+ "elasticsearch": "completion"
200+ },
201+ "status": "ga",
202+ "properties": [
203+ "multilingual"
204+ ],
205+ "release_date": "2024-05-01"
206+ },
193207 {
194208 "id": ".elser-2-elastic",
195209 "model_name": "elser_model_2",
@@ -300,7 +314,8 @@ public static AuthorizationResponseEntity.TaskTypeObject createTaskTypeObject(St
300314 public static EisAuthorizationResponse getEisAuthorizationResponseWithMultipleEndpoints (String url ) {
301315 var authorizedEndpoints = List .of (
302316 createRainbowSprinklesAuthorizedEndpoint (),
303- createGpLlmV2AuthorizedEndpoint (),
317+ createGpLlmV2ChatCompletionAuthorizedEndpoint (),
318+ createGpLlmV2CompletionAuthorizedEndpoint (),
304319 createElserAuthorizedEndpoint (),
305320 createJinaEmbedAuthorizedEndpoint (),
306321 new AuthorizationResponseEntity .AuthorizedEndpoint (
@@ -322,7 +337,8 @@ public static EisAuthorizationResponse getEisAuthorizationResponseWithMultipleEn
322337 new AuthorizationResponseEntity (authorizedEndpoints ),
323338 List .of (
324339 createRainbowSprinklesExpectedEndpoint (url ),
325- createGpLlmV2ExpectedEndpoint (url ),
340+ createGpLlmV2ChatCompletionExpectedEndpoint (url ),
341+ createGpLlmV2CompletionExpectedEndpoint (url ),
326342 createElserExpectedEndpoint (url ),
327343 createJinaExpectedEndpoint (url ),
328344 new ElasticInferenceServiceRerankModel (
@@ -352,7 +368,7 @@ private static AuthorizationResponseEntity.AuthorizedEndpoint createRainbowSprin
352368 );
353369 }
354370
355- private static ElasticInferenceServiceModel createGpLlmV2ExpectedEndpoint (String url ) {
371+ private static ElasticInferenceServiceModel createGpLlmV2ChatCompletionExpectedEndpoint (String url ) {
356372 return new ElasticInferenceServiceCompletionModel (
357373 GP_LLM_V2_CHAT_COMPLETION_ENDPOINT_ID ,
358374 TaskType .CHAT_COMPLETION ,
@@ -364,7 +380,19 @@ private static ElasticInferenceServiceModel createGpLlmV2ExpectedEndpoint(String
364380 );
365381 }
366382
367- private static AuthorizationResponseEntity .AuthorizedEndpoint createGpLlmV2AuthorizedEndpoint () {
383+ private static ElasticInferenceServiceModel createGpLlmV2CompletionExpectedEndpoint (String url ) {
384+ return new ElasticInferenceServiceCompletionModel (
385+ GP_LLM_V2_COMPLETION_ENDPOINT_ID ,
386+ TaskType .COMPLETION ,
387+ ElasticInferenceService .NAME ,
388+ new ElasticInferenceServiceCompletionServiceSettings (GP_LLM_V2_MODEL_NAME ),
389+ EmptyTaskSettings .INSTANCE ,
390+ EmptySecretSettings .INSTANCE ,
391+ new ElasticInferenceServiceComponents (url )
392+ );
393+ }
394+
395+ private static AuthorizationResponseEntity .AuthorizedEndpoint createGpLlmV2ChatCompletionAuthorizedEndpoint () {
368396 return new AuthorizationResponseEntity .AuthorizedEndpoint (
369397 GP_LLM_V2_CHAT_COMPLETION_ENDPOINT_ID ,
370398 GP_LLM_V2_MODEL_NAME ,
@@ -377,6 +405,19 @@ private static AuthorizationResponseEntity.AuthorizedEndpoint createGpLlmV2Autho
377405 );
378406 }
379407
408+ private static AuthorizationResponseEntity .AuthorizedEndpoint createGpLlmV2CompletionAuthorizedEndpoint () {
409+ return new AuthorizationResponseEntity .AuthorizedEndpoint (
410+ GP_LLM_V2_COMPLETION_ENDPOINT_ID ,
411+ GP_LLM_V2_MODEL_NAME ,
412+ createTaskTypeObject (EIS_CHAT_PATH , "completion" ),
413+ "ga" ,
414+ List .of ("multilingual" ),
415+ "2024-05-01" ,
416+ null ,
417+ null
418+ );
419+ }
420+
380421 private static ElasticInferenceServiceModel createRainbowSprinklesExpectedEndpoint (String url ) {
381422 return new ElasticInferenceServiceCompletionModel (
382423 RAINBOW_SPRINKLES_ENDPOINT_ID ,
0 commit comments