Skip to main content
All CollectionsBuilding Bots
Displaying Media in Bot Responses
Displaying Media in Bot Responses
O
Written by Om Kamath
Updated over a week ago

One of the most interesting features of Cody — the ability to embed media in the responses. When embedding media such as images, GIFs or videos, it is always recommended to import the media to a separate document or import the entire raw document using the built-in Cody text editor wherein you can add media. You can embed them into the document using URLs.

It is necessary to include the alt text with the images in the knowledge base for Cody to be able to display them properly.

An image illustrating the media buttons.

After successfully importing the media, you need to specify the same in your bot personality prompt. The prompt can be broken into two parts: Initialisation and Illustration.

Include the following in your Bot Personality Prompt:

Initialisation:
Incorporate relevant media from the knowledge base whenever suitable.

Illustration:

Add images using the <img> tag and videos using the <iframe>

For example:
<img src=”[Image URL]” alt="[alt text]">
<iframe src=”[Video URL]”></iframe>

Did this answer your question?