From this tutorial, you will learn how to create and deploy a simple Echo application for AI DIAL Chat. Echo application 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 AI 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.
AI DIAL presents a robust Extension Framework and plug-in infrastructure, enabling seamless integration of your data and business workflows with Language Models (LLM) to enrich your enterprise applications. Harness the full potential of our solutions to drive innovation and efficiency within your organization.
Refer to the AI DIAL website to learn more.
In the AI DIAL framework, Applications refer to predefined configurations of Addons and other services, or any other custom logic packaged as a ready-to-use solution.
Applications enable the customization of LLM behavior by integrating Addons with any desired logic. It can be any component that conforms to DIAL API requirements. Applications can be used for implementing non-LLM related logic, such as repeating user messages, a fully deterministic chatbot, or even a complex multi-LLM interaction. This versatility in Applications allows for tailored handling of unique scenarios and requirements.
Examples of Applications: guided conversations, hierarchical search.
- 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).
Download AI DIAL.
Create a python file in your project folder and name it app.py
.
Refer to the application file.
We use a dockerfile to launch the Echo application.
-
Your AI DIAL installation has a
core/config.json
file. Open it and add the following lines in the applications section:"echo": { "displayName": "My Echo App", "description": "Simple application that repeats user's message", "endpoint": "http://echo:5000/openai/deployments/echo/chat/completions" }
-
Add your Echo app to the roles you want it to be exposed to. For example, to add it to the
default
role, add the following lines in the roles section:"default": { "limits": { "echo": {} } }
Run docker compose up
in the console from the folder with the docker-compose file.
Once AI DIAL Chat is up on http://localhost:3000/, select the Echo Application and start typing in prompts to see how the Echo application mirrors them.