# Action - Chat Completion

**Overview:**

The Chat Completion action in MAKE enables users to configure automated chat functionalities in Charlie Lounge, employing both general and personal settings for varied interaction needs.

**Actor:**

* **Make User:** This individual configures and activates chat scenarios using the MAKE platform, integrating with Charlie Lounge.

**Design:**

<figure><img src="/files/Mq7b5JuyY69gGAYsJXhC" alt="" width="266"><figcaption></figcaption></figure>

<div align="center"><figure><img src="/files/VPIXLnASKogNh0fcNWvc" alt="" width="265"><figcaption></figcaption></figure></div>

#### Fields Description and Data Validation:

1. **Connection**
   * **Username (Required)**
     * **Input Control:** Text field
     * **Explanation:** Enter your Charlie Lounge username here to establish a connection.
     * **Validation:** Must match the username registered in the Charlie Lounge account. Accepts any text format.
   * **Password (Required)**
     * **Input Control:** Text field
     * **Explanation:** Enter your password associated with the Charlie Lounge account.
     * **Validation:** Text entered will be encrypted and displayed as dots for security.
2. **Select Type (Required)**
   * **Input Control:** Dropdown list
   * **Explanation:** Choose between 'General' for bots that utilize generalized knowledge, or 'Personal' for bots that use personalized data specific to your account.
   * **Validation:**
     * **General:** Select for generic responses that do not require personal data.
     * **Personal:** Select for responses that utilize personalized data and settings from your Charlie Lounge profile.
3. **Model (Conditional on 'General')**
   * **Input Control:** Dropdown list
   * **Explanation:** Choose the 'Cloudi 3' model which can process large amounts of data, suitable for comprehensive interactions.
   * **Validation:** Option available only if 'General' type is selected. This model supports up to 400,000 characters in both input and output.
4. **Role (Conditional on 'General')**
   * **Input Control:** Dropdown list
   * **Explanation:** Define the role of the bot in the interaction—either as a 'System' where the bot can influence the prompt, or as a 'User' where it follows a set script.
   * **Validation:** Option available only under 'General' type. Choosing 'System' allows for custom prompt modification; 'User' does not.
5. **Prompt Role (Conditional on 'System' Role)**
   * **Input Control:** Text field
   * **Explanation:** Input the custom prompt you wish the bot to use during the interaction.
   * **Validation:** Allows free text input. Active only if 'System' role is selected.
6. **Message Content (Required)**
   * **Input Control:** Text field
   * **Explanation:** Enter the message content here that will be processed by the bot. This can include inputs derived from other platforms or directly entered text.
   * **Validation:** Supports text input, which can include outputs from other platforms as input for the bot.
7. **Personal Assistant (Conditional on 'Personal')**
   * **Input Control:** Dropdown list
   * **Explanation:** Select from a list of your personalized bots configured within Charlie Lounge.
   * **Validation:** Available only if 'Personal' type is selected. Selecting a bot here allows for tailored interactions using your personal data.
8. **Moderate Your Content (Optional)**
   * **Input Control:** Checkbox
   * **Explanation:** Check this box if you want the system to automatically moderate the content to ensure it does not contain objectionable material.
   * **Validation:** When enabled, moderates the output for sensitive content. Default is set to enabled.
9. **Name (Optional)**
   * **Input Control:** Text field
   * **Explanation:** Provide a name for this particular chat scenario, which helps in managing and identifying scenarios within Charlie Lounge.
   * **Validation:** Accepts free text. This name will appear in the chat logs on Charlie Lounge.

#### Business Rules:

* **Content Moderation:** If enabled, content is checked against parameters like sexual content, hate speech, and harassment. Violations result in a standard message indicating potential policy breaches.
* **Character Limits:** Distinct limits based on model type—'Cloudi 3' supports up to 400,000 characters; 'Personal' bots using GPT4 and GPT 3.5 are limited to 1,500 characters.

#### Workflow:

1. **Entry/Entrance Step:**
   * Description: Users create and activate scenarios on MAKE.
2. **Transfer Input and Output:**
   * Description: Trigger events cause systems to send and receive data to/from CHL, processing and passing along responses accordingly.

#### MAKE Help Field:

* **Select Type:** Guide on choosing between general and personal types based on the nature of the interaction.
* **Moderate Your Content:** Information on how content moderation works to prevent inappropriate output.
* **Personal Assistant:** Instructions for selecting a personal assistant
* **Name:** For easy management, label your scenario clearly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.charlielounge.com/documentations/builders-handbook/development-environment-setup/accessing-make/action-chat-completion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
