# easy-chatgpt

> Невеличкий та зручний модуль, який полегшить та покращить Ваш досвід взаємодії з ШІ

Latest version **0.1.4** (published 2023-11-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install easy-chatgpt
pnpm add easy-chatgpt
yarn add easy-chatgpt
bun add easy-chatgpt
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2023-11-22 |
| First published | 2023-11-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 97.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Elitezen |
| Maintainers | conservator |
| Keywords | chatgpt, chat-gpt, openai, ai, discord.js, discord, discord bots, ua, ukraine, easy-chatgpt |

## Links

- npm: https://www.npmjs.com/package/easy-chatgpt
- Repository: https://github.com/iConservator/easy-chatgpt
- Homepage: https://github.com/iConservator/easy-chatgpt#readme
- Issues: https://github.com/iConservator/easy-chatgpt/issues
- npm.io page: https://npm.io/package/easy-chatgpt

## Dependencies (2)

- [chatgpt](https://npm.io/package/chatgpt.md) ^5.1.2
- [discord.js](https://npm.io/package/discord.js.md) ^14.8.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2023-11-22
- 0.1.3 — 2023-11-22
- 0.2.3 — 2023-11-22
- 0.2.2 — 2023-11-21
- 0.2.1 — 2023-11-21

## README

[![Support Server](https://img.shields.io/discord/1141748711546949753.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/CxATkUXPAw)

**"easy-chatgpt"** - модуль, який максимально спростить Ваше життя та привнесе легкість там комфорт у роботу з ШІ. Звертайстесь напряму чи опосередковано. Керуйте та витрачайте свій час на оформлення та функціонал, а не на логіку звернень!

---

**Встановлення**

```ssh
npm i easy-chatgpt
```

## Варіанти використання

### Прямий запит. 
> Повертає об'єкт відповіді ШІ напряму
---
![Alt text](https://i.ibb.co/9YKKCbJ/image-1.png)
```js
const { ChatGPTClient } = require('easy-chatgpt');
const chatgpt = new ChatGPTClient(Config.GPT_Token);

client.on('messageCreate', async message => {
    
  
    if(message.content.split(' ').includes('.gpt'))
    {

    // Замінює команду порожнечою, щоб отримати увесь наступний контекст
    const MessageContent = message.content.replace('.gpt', '');
    // **

    // Надсилає сповіщення "Бот друкує"
    await message.channel.sendTyping();
    // **

    // Надсилає повідомлення ШІ та повертає Об'єкт
    await chatgpt.send(MessageContent).then(async msg => {
        await message.reply({content: msg.text});
    })
    // **
}
})
```

### Автоматизований запит з вбудуванням. 
> Повертає повністю сформоване повідомлення у якості відповіді (Можливе додавання шаблону)
---
![Alt text](https://i.ibb.co/L0GbJJy/image.png)
```js
const { ChatGPTClient } = require('easy-chatgpt');
const chatgpt = new ChatGPTClient(Config.GPT_Token);

client.on('messageCreate', async message => {
    
  
    if(message.content.split(' ').includes('.gpt'))
    {

    // Замінює команду порожнечою, щоб отримати увесь наступний контекст
    const MessageContent = message.content.replace('.gpt', '');
    // **

    // Запускає функцію, яка генерую повідомлення та відповідає на повідомлення-тригер
    await chatgpt.requestMessageGPT(message, MessageContent);
    // **
}
})
```

---
_Source: https://npm.io/package/easy-chatgpt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
