Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
navopw committed Feb 19, 2023
1 parent 85487e8 commit 00a7664
Show file tree
Hide file tree
Showing 9 changed files with 1,604 additions and 2,682 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Prettier
on:
push:
branches:
- master
- main
push:
branches:
- master
- main

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: npm ci
- name: Install dependencies
run: npm ci

- name: Run Prettier
run: npm run prettier
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Prettier
run: npm run prettier
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 9 additions & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"semi": true,
"tabWidth": 4,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"jsxBracketSameLine": true,
"bracketSameLine": true,
"endOfLine": "crlf"
"semi": true,
"tabWidth": 4,
"useTabs": true,
"printWidth": 140,
"singleQuote": false,
"trailingComma": "none",
"jsxBracketSameLine": true,
"bracketSameLine": true,
"endOfLine": "lf"
}
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ Whatsapp bot that uses OpenAI's GPT & DALLE to respond to user inputs.
![Example](https://i.imgur.com/Za4s6aR.png)

### Dalle Example

![Example](https://i.imgur.com/nqDT4E4.png)

## Requirements

- Node.js
- A recent version of npm
- An OpenAI Account
- Node.js
- A recent version of npm
- An OpenAI Account

## .env File example

Expand All @@ -36,17 +37,19 @@ PREFIX_ENABLED=false

## Docker

``` docker build . -t [image-name] ```
`docker build . -t [image-name]`

## Usage

To use the bot, simply send a message with the `!gpt`/`!dalle` command followed by your prompt. For example:

GPT:
- `!gpt What is the meaning of life?`

- `!gpt What is the meaning of life?`

DALLE:
- `!dalle A frog with a red hat is walking on a bridge.`

- `!dalle A frog with a red hat is walking on a bridge.`

The bot only responds to messages that are received by you, not sent by you.

Expand All @@ -57,12 +60,15 @@ You can disable the `!gpt` prefix by setting `PREFIX_ENABLED` to `false` in the
If you disable the prefix, the bot will not support DALLE and only GPT will be used.

## Disclaimer

The operations performed by this bot are not free. You will be charged by OpenAI for each request you make.

## Contributors
- [andrewssobral](https://github.com/andrewssobral) - DALLE integration
- [RG7279805](https://github.com/RG7279805) - Docker support

- [andrewssobral](https://github.com/andrewssobral) - DALLE integration
- [RG7279805](https://github.com/RG7279805) - Docker support

## Used libraries
- https://github.com/pedroslopez/whatsapp-web.js
- https://github.com/transitive-bullshit/chatgpt-api

- https://github.com/pedroslopez/whatsapp-web.js
- https://github.com/transitive-bullshit/chatgpt-api
Loading

0 comments on commit 00a7664

Please sign in to comment.