Skip to content

Commit 2c4bcb5

Browse files
Add examples for chat_completion and completion tasks using various Google Model Garden providers with updated URL formats
1 parent 226e656 commit 2c4bcb5

24 files changed

+475
-183
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 82 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 82 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 132 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/inference/_types/CommonTypes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,7 @@ export class GoogleVertexAIServiceSettings {
14461446
* If `provider` is not provided or set to `google` (Google Vertex AI), do not set `url` (or `streaming_url`).
14471447
* At least one of `url` or `streaming_url` must be provided for Google Model Garden endpoint usage.
14481448
* Certain providers require separate URLs for streaming and non-streaming operations (e.g., Anthropic, Mistral, AI21). Others support both operation types through a single URL (e.g., Meta, Hugging Face).
1449+
* Information on constructing the URL for various providers can be found in the Google Model Garden documentation for the model, or on the endpoint’s `Sample request` page. The request examples also illustrate the proper formatting for the `url`.
14491450
*/
14501451
url?: string
14511452
/**
@@ -1455,6 +1456,7 @@ export class GoogleVertexAIServiceSettings {
14551456
* If `provider` is not provided or set to `google` (Google Vertex AI), do not set `streaming_url` (or `url`).
14561457
* At least one of `streaming_url` or `url` must be provided for Google Model Garden endpoint usage.
14571458
* Certain providers require separate URLs for streaming and non-streaming operations (e.g., Anthropic, Mistral, AI21). Others support both operation types through a single URL (e.g., Meta, Hugging Face).
1459+
* Information on constructing the URL for various providers can be found in the Google Model Garden documentation for the model, or on the endpoint’s `Sample request` page. The request examples also illustrate the proper formatting for the `streaming_url`.
14581460
*/
14591461
streaming_url?: string
14601462
/**
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
summary: A chat_completion task for Google Model Garden Mistral endpoint with single streaming URL provided
2-
description: Run `PUT _inference/chat_completion/google_model_garden_mistral_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Mistral's model hosted on Google Model Garden with single streaming URL provided.
3-
method_request: 'PUT _inference/chat_completion/google_model_garden_mistral_chat_completion'
1+
summary: A chat_completion task for Google Model Garden Meta shared endpoint with single streaming URL provided
2+
description: Run `PUT _inference/chat_completion/google_model_garden_meta_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Meta's model hosted on Google Model Garden shared endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.
3+
method_request: 'PUT _inference/chat_completion/google_model_garden_meta_chat_completion'
44
# type: "request"
55
value: |-
66
{
77
"service": "googlevertexai",
88
"service_settings": {
9-
"provider": "mistral",
10-
"model_id": "mistral-small-2503",
9+
"provider": "meta",
1110
"service_account_json": "service-account-json",
12-
"streaming_url": "https://url:streamRawPredict"
11+
"streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
1312
}
1413
}
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
summary: A completion task for Google Model Garden AI21 endpoint with separate URLs for streaming and non-streaming tasks
2-
description: Run `PUT _inference/completion/google_model_garden_ai21_completion` to create an inference endpoint to perform a `completion` task using AI21's model hosted on Google Model Garden with separate URLs for streaming and non-streaming tasks.
3-
method_request: 'PUT _inference/completion/google_model_garden_ai21_completion'
1+
summary: A completion task for Google Model Garden Hugging Face dedicated endpoint with single URL provided for both streaming and non-streaming tasks
2+
description: Run `PUT _inference/completion/google_model_garden_hugging_face_completion` to create an inference endpoint to perform a `completion` task using Hugging Face's model hosted on Google Model Garden dedicated endpoint with single URL provided for both streaming and non-streaming tasks. See the endpoint's `Sample request` page for the variable values used in the URL.
3+
method_request: 'PUT _inference/completion/google_model_garden_hugging_face_completion'
44
# type: "request"
55
value: |-
66
{
77
"service": "googlevertexai",
88
"service_settings": {
9-
"provider": "ai21",
9+
"provider": "hugging_face",
1010
"service_account_json": "service-account-json",
11-
"url": "https://url:rawPredict",
12-
"streaming_url": "https://url:streamRawPredict"
11+
"url": "https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
1312
}
1413
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
summary: A chat_completion task for Google Model Garden AI21 endpoint with single streaming URL provided
2-
description: Run `PUT _inference/chat_completion/google_model_garden_ai21_chat_completion` to create an inference endpoint to perform a `chat_completion` task using AI21's model hosted on Google Model Garden with single streaming URL provided.
3-
method_request: 'PUT _inference/chat_completion/google_model_garden_ai21_chat_completion'
1+
summary: A chat_completion task for Google Model Garden Hugging Face dedicated endpoint with single streaming URL provided
2+
description: Run `PUT _inference/chat_completion/google_model_garden_hugging_face_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Hugging Face's model hosted on Google Model Garden dedicated endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.
3+
method_request: 'PUT _inference/chat_completion/google_model_garden_hugging_face_chat_completion'
44
# type: "request"
55
value: |-
66
{
77
"service": "googlevertexai",
88
"service_settings": {
9-
"provider": "ai21",
9+
"provider": "hugging_face",
1010
"service_account_json": "service-account-json",
11-
"streaming_url": "https://url:streamRawPredict"
11+
"streaming_url": "https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
1212
}
1313
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
summary: A completion task for Google Model Garden Hugging Face shared endpoint with single URL provided for both streaming and non-streaming tasks
2+
description: Run `PUT _inference/completion/google_model_garden_hugging_face_completion` to create an inference endpoint to perform a `completion` task using Hugging Face's model hosted on Google Model Garden shared endpoint with single URL provided for both streaming and non-streaming tasks. See the endpoint's `Sample request` page for the variable values used in the URL.
3+
method_request: 'PUT _inference/completion/google_model_garden_hugging_face_completion'
4+
# type: "request"
5+
value: |-
6+
{
7+
"service": "googlevertexai",
8+
"service_settings": {
9+
"provider": "hugging_face",
10+
"service_account_json": "service-account-json",
11+
"url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
summary: A chat_completion task for Google Model Garden Hugging Face shared endpoint with single streaming URL provided
2+
description: Run `PUT _inference/chat_completion/google_model_garden_hugging_face_chat_completion` to create an inference endpoint to perform a `chat_completion` task using Hugging Face's model hosted on Google Model Garden shared endpoint with single streaming URL provided. See the endpoint's `Sample request` page for the variable values used in the URL.
3+
method_request: 'PUT _inference/chat_completion/google_model_garden_hugging_face_chat_completion'
4+
# type: "request"
5+
value: |-
6+
{
7+
"service": "googlevertexai",
8+
"service_settings": {
9+
"provider": "hugging_face",
10+
"service_account_json": "service-account-json",
11+
"streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
12+
}
13+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
summary: A completion task for Google Model Garden Mistral serverless endpoint with separate URLs for streaming and non-streaming tasks
2+
description: Run `PUT _inference/completion/google_model_garden_mistral_completion` to create an inference endpoint to perform a `completion` task using Mistral's serverless model hosted on Google Model Garden with separate URLs for streaming and non-streaming tasks. See the Mistral model documentation for instructions on how to construct URLs.
3+
method_request: 'PUT _inference/completion/google_model_garden_mistral_completion'
4+
# type: "request"
5+
value: |-
6+
{
7+
"service": "googlevertexai",
8+
"service_settings": {
9+
"provider": "mistral",
10+
"model_id": "mistral-small-2503",
11+
"service_account_json": "service-account-json",
12+
"url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/mistralai/models/%MODEL_ID%:rawPredict",
13+
"streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/mistralai/models/%MODEL_ID%:streamRawPredict"
14+
}
15+
}

0 commit comments

Comments
 (0)