-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated image-size and render-text examples with file api (#68)
- Loading branch information
Showing
13 changed files
with
243 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Overview | ||
|
||
An example of a simple text-to-text DIAL application. | ||
|
||
It returns back the content and attachments from the last user message. | ||
|
||
Upon start the Docker image exposes `openai/deployments/echo/chat/completions` endpoint at port `5000`. | ||
|
||
## Usage | ||
|
||
Find how to integrate the application into the DIAL Core and call it using DIAL API in the [cookbook](https://github.com/epam/ai-dial/blob/main/dial-cookbook/examples/how_to_call_text_to_text_applications.ipynb). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Overview | ||
|
||
An example of a simple image-to-text DIAL application. | ||
|
||
It takes an image from the last user message attachments and returns back the image dimensions. | ||
|
||
Upon start the Docker image exposes `openai/deployments/image-size/chat/completions` endpoint at port `5000`. | ||
|
||
## Configuration | ||
|
||
The application supports image attachments provided in one of the following format: | ||
|
||
1. Base64 encoded image | ||
2. URL to the image, which might be either | ||
* public URL or | ||
* URL pointing to a file in the DIAL file storage. `DIAL_URL` environment variable should be set to support image stored in the storage. | ||
|
||
|Variable|Default|Description| | ||
|---|---|---| | ||
|DIAL_URL||URL of the core DIAL server. Optional. Used to access images stored in the DIAL file storage| | ||
|
||
## Usage | ||
|
||
Find how to integrate the application into the DIAL Core and call it using DIAL API in the [cookbook](https://github.com/epam/ai-dial/blob/main/dial-cookbook/examples/how_to_call_image_to_text_applications.ipynb). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
aidial-sdk>=0.2 | ||
pillow==10.2.0 | ||
pillow==10.2.0 | ||
aiohttp==3.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Overview | ||
|
||
An example of a simple text-to-image DIAL application. | ||
|
||
It takes a text from the last user message attachments and returns back the image with the rasterized text. | ||
|
||
The generated image is added as an image attachment to the response message and also as a Markdown image in the response text. | ||
|
||
Upon start the Docker image exposes `openai/deployments/render-text/chat/completions` endpoint at port `5000`. | ||
|
||
## Configuration | ||
|
||
The application returns the image in one of the following formats: | ||
1. Base64 encoded image | ||
2. URL to the image stored in the DIAL file storage. `DIAL_URL` environment variable should be set to support image uploading to the storage. | ||
|
||
The format of the image attachment is controlled by the user message, which is expected to have the following format: `(base64|url),<text to render>`. | ||
|
||
|Variable|Default|Description| | ||
|---|---|---| | ||
|DIAL_URL||URL of the core DIAL server. Optional. Used to upload generated images the DIAL file storage| | ||
|
||
## Usage | ||
|
||
Find how to integrate the application into the DIAL Core and call it using DIAL API in the [cookbook](https://github.com/epam/ai-dial/blob/main/dial-cookbook/examples/how_to_call_text_to_image_applications.ipynb). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
aidial-sdk>=0.2 | ||
pillow==10.2.0 | ||
pillow==10.2.0 | ||
aiohttp==3.9.0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters