---
description: Interact with the OpenAI ChatGPT API using commands and auto-reply.
---

# ChatGPT

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2FxOZ99TCarjilvr5ZH8w7%2Fc1.png?alt=media&#x26;token=09c423bd-e089-4d6a-8b7e-dbc78e674743" alt=""><figcaption></figcaption></figure>

The [ChatGPT](https://vyral.bot/dashboard/demo/module/6e8c5384-e6f8-4282-8125-5ca9b53242c8) module allows users to hold conversations with their bot by using the OpenAI GPT 3.5 Turbo - GPT 4 software. Get it to tell you stories or ask some advanced questions.

### Common Issues <a href="#common-issues" id="common-issues"></a>

Experiencing issues with the module? Check out the common issues below. If your issue is not listed in this page, make sure your module is updated to the latest version.&#x20;

#### AI commands return a 429 error <a href="#ai-commands-return-a-429-error" id="ai-commands-return-a-429-error"></a>

If a `429` error is returned when trying to use ChatGPT's AI commands, please try the steps below.

1. The OpenAI (ChatGPT) 429 error means your free trial of the API key you're using has expired. To extend your quota and continue using OpenAI, you need to enter your billing details. You can do that in the [OpenAI Developer Platform](https://openai.com/api/).

{% hint style="danger" %}
If you are still experiencing issues with the module, join our [support server](https://discord.gg/support) to ask for further help.
{% endhint %}

***

### Credentials Setup <a href="#credentials-setup" id="credentials-setup"></a>

Click [here](https://platform.openai.com/account/api-keys) to get started. Log into OpenAI. \
If you haven't already, Open AI might ask you to verify your phone number before proceeding.

* [x] Once you logged in, click on the "Create new secret key button.

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2FyMMVe6QJEO50uMU8oFmL%2F11.png?alt=media&#x26;token=73889187-72c6-4659-8e24-7206f14fbaa7" alt=""><figcaption></figcaption></figure>

* [x] This will prompt you to make a key. Set Owned by "You" and give your app a name. Set the "Permissions" to all. Once done, click on "Create Secret Key"

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2FsSkS4LVAEmVUJ2jbHdOf%2F12.png?alt=media&#x26;token=35746085-9678-4360-b17a-8e1b42084662" alt=""><figcaption></figcaption></figure>

* [x] Copy your key. Make sure to not share it with anyone.

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2FO9yiuSjSC7OdcEJ69Tv5%2F13.png?alt=media&#x26;token=40e429fb-789c-4be2-951a-77005c888fa7" alt=""><figcaption></figcaption></figure>

* [x] Paste your key into the Vyral Dashboard in the [OpenAI API Key](https://docs.botghost.com/ai/chatgpt#openai-api-key) field.

***

### Settings <a href="#settings" id="settings"></a>

#### API Key <a href="#api-key" id="api-key"></a>

In this area, you can configure all of the important parts of this module, from entering your API key to setting the version type.

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2FKfnwBBD6O3EvfdCTkwG4%2Fc2.png?alt=media&#x26;token=ffcfbd58-8743-4e85-9b4a-e719f859a61d" alt=""><figcaption></figcaption></figure>

#### **OpenAI API Key**

In this field is where you will need to enter your OpenAI API key to be able to use the module, you can follow this guide [here](https://platform.openai.com/docs/api-reference/authentication), to generate your own API key.

#### **Model**

Here you can select the AIs model, you can select from 4 different models.

#### **Chatmode**

With this toggle you can enable / disable an auto response from the bot if it gets mentioned in the [Chatmode Channel](#chatmode-channel).

#### **Chatmode Channel**

Here you can set the channel in which the bot will automatically reply to its @mentions with a ChatGPT-generated reply if the setting is enabled.

***

## Commands <a href="#commands" id="commands"></a>

Below you may find some information on each command of the module.

<details>

<summary>/chatgpt edit-text</summary>

This command when triggered will edit any text that is input.

</details>

<details>

<summary>/chatgpt respond</summary>

This command when triggered, will send an AI-generated chat response to whatever prompt you input.

</details>

***

## Events <a href="#events" id="events"></a>

Below you may find some information on each event of the module

<details>

<summary>ChatGPT</summary>

This is the only event for the GPT module, it handles all the auto responses from the AI and more. You can edit the event to add new additions, fine tune responses and much more.

</details>
