> For the complete documentation index, see [llms.txt](https://docs.charlielounge.com/documentations/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.charlielounge.com/documentations/builders-handbook/development-environment-setup/accessing-make/action-chat-completion.md).

# 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="https://836404826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQ4hA4C1XnKNWXPHa2Cbr%2Fuploads%2FkzIDnsUZQEi5YIahYXZP%2FScreenshot%202024-04-29%20at%2020.36.17.png?alt=media&amp;token=39603431-8b30-4ca1-b66d-4beb51b59984" alt="" width="266"><figcaption></figcaption></figure>

<div align="center"><figure><img src="https://836404826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQ4hA4C1XnKNWXPHa2Cbr%2Fuploads%2FGzM79hJwRLATjhuofJCh%2FScreenshot%202024-04-29%20at%2020.36.39.png?alt=media&amp;token=75edb1a9-6055-473c-860f-dd6939472945" 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.
