> For the complete documentation index, see [llms.txt](https://docs.goless.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goless.com/blocks/premium/chatgpt.md).

# ChatGPT Block

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2FLamvVMvLdcSltEqXKRHi%2Fimage.png?alt=media&amp;token=74e12878-6871-4024-9b9a-cff95f6c1278" alt=""><figcaption></figcaption></figure>

To use the chatGPT block in your workflow, you must purchase a [subscription](https://goless.com/pricing).

When inserting the chatGPT block into the workflow, you must choose the AI version that best suits your purposes (only version 3.5 turbo is available for now).

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2Fgit-blob-2b94aeda26d16fd9853aa21ddcffba624aa592ea%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202023-05-03%20%D0%B2%2012.11.02.png?alt=media" alt="" width="321"><figcaption></figcaption></figure>

For further use in our example, set the [Get text](https://docs.goless.com/blocks/web-interaction/get-text-block) block before the chatGPT block to send text to the chatGPT block.

In the [Get text](https://docs.goless.com/blocks/web-interaction/get-text-block) block, set the parameters of the text you want to pass to the chatGPT block, and store the data in a [variable](https://docs.goless.com/workflow/variables).

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2Fgit-blob-8062da6189a3a28c79cd2a11b3784df68dc16bcd%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202023-05-03%20%D0%B2%2012.15.07.png?alt=media" alt="" width="321"><figcaption></figcaption></figure>

Next, use a [variable](https://docs.goless.com/workflow/variables) from the [Get text](https://docs.goless.com/blocks/web-interaction/get-text-block) block and pass it to chatGPT and add an explanation of what the neural network should do with the text it received from the variable: e.g. "Rewrite: {{ globalData.key }}".

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2Fgit-blob-249922fe5ea337c37882e3e8f7c404f0f7fa0f89%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202023-05-03%20%D0%B2%2012.17.08.png?alt=media" alt="" width="316"><figcaption></figcaption></figure>

Next, you need to save the chatGPT response in a [variable](https://docs.goless.com/workflow/variables) and pass it to the next [Forms](https://docs.goless.com/blocks/web-interaction/forms-block) block.

{% hint style="info" %}
Example: the data transfer will take place in the [Forms](https://docs.goless.com/blocks/web-interaction/forms-block) block, but you can use any block that can accept parameters.
{% endhint %}

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2Fgit-blob-0168793e6742fefca1b4047589419442bcf7cac2%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202023-05-03%20%D0%B2%2012.22.28.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

In the [Forms ](https://docs.goless.com/blocks/web-interaction/forms-block)block you need to pass the data via a [variable](https://docs.goless.com/workflow/variables) from chatGPT and insert it into the desired form, in your workflow.

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2Fgit-blob-785ac5fe1b20b4cc6d40d656385c917d91e4951b%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202023-05-03%20%D0%B2%2012.41.27.png?alt=media" alt="" width="325"><figcaption></figcaption></figure>
