# Интеграция Chat GPT c чат-ботом

Для интеграции мы использовали сервис [chadgpt.ru](https://chadgpt.ru/)

Стоимость и тарифы смотрите на сайте (для работы данного бота хватит минимального тарифа)&#x20;

<figure><img src="/files/ClWwWSIbhKSMVOm2RIsT" alt=""><figcaption><p>Переменная "вопрос" записывается в блоке, где пользователь задает вопрос </p></figcaption></figure>

URL:&#x20;

```
https://ask.chadgpt.ru/api/public/gpt-3.5?
```

Method: POST

Body: json

```
{
"message": "{{$Вопрос}}",
"api_key": "ваш ключ"
}
```

Где найти Апи-ключ (api\_key):

1. Перейти на сайт [chadgpt.ru](https://chadgpt.ru/)
2. Нажать "использовать бесплатно"

<figure><img src="/files/J96awhmUaTnPzqyxYpM2" alt=""><figcaption></figcaption></figure>

3. Нажать на меню

<figure><img src="/files/03YbvBE9B3nmtQvZi7bP" alt=""><figcaption></figcaption></figure>

4. Перейти в личный кабинет

<figure><img src="/files/isd1vGHfI2lzty0dtPx2" alt=""><figcaption></figcaption></figure>

5. Перейти в раздел API для разработчиков

<figure><img src="/files/BcdToM0YTZLEe7xrVNkK" alt=""><figcaption></figcaption></figure>

6. Зайти в раздел мой API ключ

&#x20;

<figure><img src="/files/yUXf7bjx2oBLjjua0VYo" alt=""><figcaption></figcaption></figure>

7. Скопировать API ключ и вставить его в json-массив (см.скриншот блока)


---

# 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://help.watbot.ru/chat-boty/bloki/nastroiki-http-blokov-iz-video/integraciya-chat-gpt-c-chat-botom.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.
