Skip to content

Commit

Permalink
Add parameter values
Browse files Browse the repository at this point in the history
Signed-off-by: Fanit Kolchina <[email protected]>
  • Loading branch information
kolchfa-aws committed Sep 17, 2024
1 parent 9d42770 commit f69b2fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion _ml-commons-plugin/api/model-apis/batch-predict.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ POST /_plugins/_ml/models/<model_id>/_batch_predict

## Prerequisites

Before using the Batch Predict API, you need to create a connector to the externally hosted model. For example, to create a connector to an OpenAI `text-embedding-ada-002` model, send the following request. The optional `action_type` parameter supports canceling the batch job running on OpenAI:
Before using the Batch Predict API, you need to create a connector to the externally hosted model. For every action, specify the `action_type` parameter that describes the action:

Check failure on line 34 in _ml-commons-plugin/api/model-apis/batch-predict.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SpacingPunctuation] There should be no space before and one space after the punctuation mark in 'model. For'. Raw Output: {"message": "[OpenSearch.SpacingPunctuation] There should be no space before and one space after the punctuation mark in 'model. For'.", "location": {"path": "_ml-commons-plugin/api/model-apis/batch-predict.md", "range": {"start": {"line": 34, "column": 93}}}, "severity": "ERROR"}

- `batch_predict`: Runs the batch predict operation.
- `batch_predict_status`: Checks the batch predict operation status.
- `cancel_batch_predict`: Cancels the batch predict operation.

For example, to create a connector to an OpenAI `text-embedding-ada-002` model, send the following request. The `cancel_batch_predict` action is optional and supports canceling the batch job running on OpenAI:

```json
POST /_plugins/_ml/connectors/_create
Expand Down

0 comments on commit f69b2fc

Please sign in to comment.