Skip to content

Commit

Permalink
Update callback for Oryx.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed May 20, 2024
1 parent 5975c4d commit a493212
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,35 @@ Response:
* The `artifact_url` is the URL path to access the artifact mp4.
* Ignore any response error.

### HTTP Callback: on_ocr

For HTTP callback `on_ocr` event:

```json
Request:
{
"request_id": "d13a0e60-e2fe-42cd-a8d8-f04c7e71b5f5",
"action": "on_ocr",
"opaque": "mytoken",
"vhost": "__defaultVhost__",
"app": "live",
"stream": "livestream",
"uuid": "824b96f9-8d51-4046-ba1e-a9aec7d57c95",
"prompt": "What is in the image?",
"result": "The image shows a scene featuring a character from a film, likely set in a military or high-tech environment."
}

Response:
{
"code": 0
}
```

* The `uuid` is the UUID of OCR task.
* The `prompt` the AI model used for OCR.
* The `result` is the OCR result.
* Ignore any response error.

![](https://ossrs.io/gif/v1/sls.gif?site=ossrs.io&path=/lts/doc/en/v6/getting-started-oryx)


Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,35 @@ Response:
* The `artifact_url` is the URL path to access the artifact mp4.
* Ignore any response error.

### HTTP Callback: on_ocr

For HTTP callback `on_ocr` event:

```json
Request:
{
"request_id": "d13a0e60-e2fe-42cd-a8d8-f04c7e71b5f5",
"action": "on_ocr",
"opaque": "mytoken",
"vhost": "__defaultVhost__",
"app": "live",
"stream": "livestream",
"uuid": "824b96f9-8d51-4046-ba1e-a9aec7d57c95",
"prompt": "What is in the image?",
"result": "The image shows a scene featuring a character from a film, likely set in a military or high-tech environment."
}

Response:
{
"code": 0
}
```

* The `uuid` is the UUID of OCR task.
* The `prompt` the AI model used for OCR.
* The `result` is the OCR result.
* Ignore any response error.

![](https://ossrs.net/gif/v1/sls.gif?site=ossrs.net&path=/lts/doc/zh/v6/getting-started-oryx)


Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,35 @@ Response:
* The `artifact_url` is the URL path to access the artifact mp4.
* Ignore any response error.

### HTTP Callback: on_ocr

For HTTP callback `on_ocr` event:

```json
Request:
{
"request_id": "d13a0e60-e2fe-42cd-a8d8-f04c7e71b5f5",
"action": "on_ocr",
"opaque": "mytoken",
"vhost": "__defaultVhost__",
"app": "live",
"stream": "livestream",
"uuid": "824b96f9-8d51-4046-ba1e-a9aec7d57c95",
"prompt": "What is in the image?",
"result": "The image shows a scene featuring a character from a film, likely set in a military or high-tech environment."
}

Response:
{
"code": 0
}
```

* The `uuid` is the UUID of OCR task.
* The `prompt` the AI model used for OCR.
* The `result` is the OCR result.
* Ignore any response error.

![](https://ossrs.net/gif/v1/sls.gif?site=ossrs.net&path=/lts/doc/zh/v5/getting-started-oryx)


29 changes: 29 additions & 0 deletions versioned_docs/version-5.0/doc/getting-started-oryx.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,35 @@ Response:
* The `artifact_url` is the URL path to access the artifact mp4.
* Ignore any response error.

### HTTP Callback: on_ocr

For HTTP callback `on_ocr` event:

```json
Request:
{
"request_id": "d13a0e60-e2fe-42cd-a8d8-f04c7e71b5f5",
"action": "on_ocr",
"opaque": "mytoken",
"vhost": "__defaultVhost__",
"app": "live",
"stream": "livestream",
"uuid": "824b96f9-8d51-4046-ba1e-a9aec7d57c95",
"prompt": "What is in the image?",
"result": "The image shows a scene featuring a character from a film, likely set in a military or high-tech environment."
}

Response:
{
"code": 0
}
```

* The `uuid` is the UUID of OCR task.
* The `prompt` the AI model used for OCR.
* The `result` is the OCR result.
* Ignore any response error.

![](https://ossrs.io/gif/v1/sls.gif?site=ossrs.io&path=/lts/doc/en/v5/getting-started-oryx)


0 comments on commit a493212

Please sign in to comment.