Launch DIAL Chat with a Sample Application
Introduction
From this tutorial, you will learn how to launch DIAL with a sample Echo application which mirrors all user prompts.
Watch a demo video to see in action how to develop a simple application.
Take note that this document covers the most basic aspects of developing and testing DIAL applications. Deploying and distributing these applications for production purposes will require additional configurations that guarantee secure access to the application endpoints through the implementation of firewalls and other network security settings to prevent unauthorized intrusion to the deployed applications.
- Refer to the Extensibility to learn about system extensions supported in DIAL.
- Refer to DIAL-Native Apps to learn about applications in DIAL.
Prerequisites
- Docker engine installed on your machine (Docker Compose Version 2.20.0 +). Refer to Docker documentation.
- Python 3.8 or higher installed on your machine.
- pip for Python installed.
- IDE for the Python development. VS Code or PyCharm are recommended.
- IDE is configured to use the PEP-8 compatible formatting (i.e. Black).
Step 1: Get DIAL
Download a folder with the necessary files to launch DIAL with a sample application using Docker Compose.
Step 2: Launch DIAL Chat
Run docker compose up
in the console from the folder with the docker-compose file.
Once DIAL Chat is up on http://localhost:3000/, select the Echo Application in DIAL Marketplace and start typing in prompts to see how the Echo application mirrors them.
Additional Information
DIAL's configuration and its components are defined in the common.yaml file. It includes DIAL Chat, Core, Chat Themes and Redis.
Refer to Architecture to learn more about available DIAL setups and system components.
We use a dockerfile to launch the Echo application.
DIAL Core configuration is defined in the config.json file.
Refer to Configuration to learn how to configure DIAL Core.
In the DIAL Core configuration, the sample application is defined as follows:
"echo": {
"displayName": "My Echo App",
"description": "Simple application that repeats user's message",
"endpoint": "http://echo:5000/openai/deployments/echo/chat/completions" // chat completion endpoint of the application
}
Refer to Enable Apps to learn how to enable apps in DIAL.
The application is available for the default
role, which is defined in the DIAL Core configuration as follows:
"default": {
"limits": {
"echo": {}
}
}
Refer to Access & Cost Control to learn about roles and access control for API keys and JWT.