> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recite Message Function

> Configure a function that defines a phrase as read-verbatim

The Recite Message function allows you to define a specific phrase that GenerativeAgent will recite exactly as written, without any modifications or paraphrasing.

This can be useful for ensuring that certain information is conveyed precisely as intended, such as:

* Legal disclaimers
* Specific instructions
* Product names or technical terms that should not be altered
* Any content that requires verbatim repetition

To create a Recite Message function:

1. [Create a function](#step-1:-create-a-new-function)
2. [Specify the name and purpose](#step-2:-specify-the-name-and-purpose-of-the-function)
3. [Define input parameters (optional)](#step-3:-configure-optional-input-parameters)
4. [Configure the message to recite](#step-4:-configure-the-message-to-recite)
5. [Use the function in a task](#step-5:-use-the-function-in-a-task)

## Step 1: Create a New Function

Navigate to the Functions page and click "Create Function."

Select "Recite Message" and click "Next: Function details"

<Frame>
  <img src="https://mintcdn.com/asapp/GjZ4im-J4tWK9O1w/images/generativeagent/ReciteMessageFunction.png?fit=max&auto=format&n=GjZ4im-J4tWK9O1w&q=85&s=f75de95fb8085d5637a626468289f720" width="857" height="580" data-path="images/generativeagent/ReciteMessageFunction.png" />
</Frame>

## Step 2: Specify the Name and Purpose of the Function

* **Function Name**: Provide a concise, unique name, using underscores (e.g., `recite_privacy_policy`).
* **Function Purpose**: Briefly describe what the function does (e.g., "Recites the privacy policy statement verbatim when called").
  * GenerativeAgent uses this description to determine if/when it should call the function.

<Frame>
  <img src="https://mintcdn.com/asapp/GjZ4im-J4tWK9O1w/images/generativeagent/ReciteMessageFunctionDetails.png?fit=max&auto=format&n=GjZ4im-J4tWK9O1w&q=85&s=ce70b01c89ac840bd48c96db2f3d7888" width="816" height="316" data-path="images/generativeagent/ReciteMessageFunctionDetails.png" />
</Frame>

## Step 3: Configure Optional Input Parameters

If you want to pass any parameters to the function for dynamic content insertion, you can define them in the Input Parameters section.

For example, you could define an `additional_disclaimer` parameter to include extra information in the recited message.

<Frame>
  <img src="https://mintcdn.com/asapp/GjZ4im-J4tWK9O1w/images/generativeagent/ReciteMessageFunctionParameters.png?fit=max&auto=format&n=GjZ4im-J4tWK9O1w&q=85&s=eaccfa4f479186db0b222fd432a3f1dd" width="819" height="399" data-path="images/generativeagent/ReciteMessageFunctionParameters.png" />
</Frame>

## Step 4: Configure the Message to Recite

In the **Message Body** configuration, you have to provide the message template in jinja2 format that you want GenerativeAgent to recite verbatim.

For example, if you want GenerativeAgent to recite a cancellation confirmation message with specific details, you could set the message body as follows:

```
Hi, I would like to cancel my subscription to {{ plan_name }}.
My account email is {{ email }} and my reason for cancelling is {{ cancellation_reason }}.
```

If you want to include an input parameter in the message, you can reference it using the syntax `{{ params.<parameter_name> }}`.

For example, if you defined an `additional_disclaimer` parameter, you could include it in the message body like this:

```
Please note the following disclaimer: {{ params.additional_disclaimer }}
```

Once you have configured the message body, click "Create Function" to save the function.

<Frame>
  <img src="https://mintcdn.com/asapp/GjZ4im-J4tWK9O1w/images/generativeagent/ReciteMessageFunctionMessageBody.png?fit=max&auto=format&n=GjZ4im-J4tWK9O1w&q=85&s=9d343097db7011bc25d0e391980f5542" width="823" height="348" data-path="images/generativeagent/ReciteMessageFunctionMessageBody.png" />
</Frame>

## Step 5: Use the Function in a Task

After creating your Recite Message function, you must add the function to the task's list of available functions for GenerativeAgent to use it.

GenerativeAgent will call the function when it determines that the specific phrase or information needs to be recited verbatim during a conversation.

Here's how the function works within a task and conversation flow:

1. GenerativeAgent analyzes the user's request and determines if it needs to recite a specific message verbatim.
2. If the function requires input parameters, GenerativeAgent gathers the necessary information.
3. GenerativeAgent calls the Recite Message function with the appropriate parameters (if any).
4. The function returns the exact message as configured, which GenerativeAgent then delivers to the customer without any modifications or paraphrasing.

This ensures that critical information is communicated precisely as intended, maintaining the integrity of the message and providing a consistent customer experience.

## Next Steps

<CardGroup>
  <Card title="API Functions" href="/generativeagent/configuring/tasks-and-functions/api-functions">
    Learn how to create functions that connect to your APIs for data retrieval and actions.
  </Card>

  <Card title="System Transfer Functions" href="/generativeagent/configuring/tasks-and-functions/system-transfer">
    Learn how to create functions that transfer control to other systems or human agents.
  </Card>

  <Card title="HILA Functions" href="/generativeagent/configuring/tasks-and-functions/hila-function">
    Learn how to create functions that use ASAPP's HILA technology for advanced reasoning and logic.
  </Card>

  <Card title="Set Variable Functions" href="/generativeagent/configuring/tasks-and-functions/set-variable">
    Learn how to create functions that set conversation variables for context and conditional logic.
  </Card>
</CardGroup>
