For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sending images in chat

Sending images via a Knowledge Base file call

To send an image to the chat at the right moment in the dialogue, you need to perform a few simple steps.

  1. Create a file in Direct Questions and name it appropriately.

For example: Photograph of Portrait Sizes

  1. Attach the photo you need to send

You can read in detail how to attach a photo to a file in the Direct Questions section.

  1. In the main prompt, include instructions for the agent as to when they should call the file and send the photo to the chat.

For example:

In this case, Savvi will call this file, execute the text instructions specified in the file's Contents, and send the attached photo to the chat.

Sending images via a spreadsheet

The essence of this method is that the agent takes a link to an image from a table and sends the full-size image stored at this link to the user in the chat.

If you need an agent to find data in a table for a specific client request and send a photo corresponding to that item, you need to complete a few simple steps:

  1. We create a table and fill it with the necessary data.

You can read about how to properly prepare and upload a table in the Working with Tables section.

  1. We fill one of the table columns with links to images that will be sent to the chat.

Please note that image links must be direct. This means all links must end in .jpg , .jpeg , etc.

The correct format for links is:

One of the services that can provide you with a direct link to the image: https://postimages.org/ .

Please note that the Postimages service is not our responsibility and we cannot guarantee its functionality.

  1. After connecting the spreadsheet to Suvvy, you need to create an additional action with a webhook that will convert the link into an image before sending it to the chat.

To do this:

1

Go to the Actions tab and click Add

2

Select the Step type - Webhook

3

Fill in the action settings fields and enter the url_photo argument.

4

In the URL field, add our argument, enable the Return response as file flag, and select Type - Image.

5

Click Save

  1. We add instructions for this action to our agent's main Prompt.

After that, you should get all the url_photo parameters from the photo_works column and pass these parameters to the url_to_photo function.

This instruction is used to pass the resulting links to a function with a webhook after a table query to convert the link into a full-size image and send the images to the chat.

Last updated