The copilot offer the ability to respond with highly customizable UIs. This way you can create a more interactive experience for your users. These UIs can be used for a variety of purposes, such as:Documentation Index
Fetch the complete documentation index at: https://openchat-not-gen-ui.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Displaying information in a more user-friendly way
- Collecting user input
- Providing a more interactive experience for the user (from simple buttons to complex forms)
- Showing progress or status updates, videos, images, and more
- Toggle dark mode, change language, and other settings.
Example
We will create a simple copilot that have access to real time weather data and display it in a UI.- After creating the copilot, create a new action called
getTheWeather, make sure the action type isGET, and pass the following URL:
-
Now, embed the copilot using our React component :
-
Create a new file called
WeatherRenderer.jsand add the following code:
GetWetherDataRenderer function return a valid JSX.
Also, notice that the UI will consume the data that the copilot action will return, so make sure to define the type of the data that the action will return in the Props type.
-
Make sure that component you created is being defined in the copilot options:
-
Now, when we try to chat with the copilot and ask for the weather, we will get a UI that display the current weather and the hourly forecast.

