Skip to content

Commit

Permalink
added debug toggle in env var
Browse files Browse the repository at this point in the history
  • Loading branch information
itskdhere committed Feb 20, 2023
1 parent e4879aa commit 83d9eac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
13 changes: 7 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ LOGIN_TYPE=
ACCOUNT_TYPE=

# --------------------------------------------------------------------------------------------------
# Bot Typing Effect i.e Stream ChatGPT response in real-time ( Value: 'true' or 'false' )
# TYPING_EFFECT=true
# [Experimental] Bot Typing Effect i.e Stream ChatGPT response in real-time ( Value: 'true' or 'false' )
TYPING_EFFECT=false

# --------------------------------------------------------------------------------------------------
# Change these if you know what you're doing
DISCORD_MAX_RESPONSE_LENGTH=2000
UWU=true
CHATGPT_INITIAL_PROMPT=hi
# Change these if you know what you're doing :)
DISCORD_MAX_RESPONSE_LENGTH=1900
CHATGPT_INITIAL_PROMPT=hi
DEBUG=false
UWU=true
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ ChatGPT Discord BOT
<a href="https://github.com/itskdhere/ChatGPT-Discord-BOT/actions/workflows/ossar.yml" title="OSSAR">
<img alt="OSSAR" src="https://github.com/itskdhere/ChatGPT-Discord-BOT/actions/workflows/ossar.yml/badge.svg?branch=main">
</a>
<a href="https://github.com/itskdhere/ChatGPT-Discord-BOT/actions/workflows/dependency-review.yml" title="Dependency Review">
<img alt="Dependency Review" src="https://github.com/itskdhere/ChatGPT-Discord-BOT/actions/workflows/dependency-review.yml/badge.svg">
</a>
</p>

<p align="center">
<a href="https://redirect.itskdhere.workers.dev/server/support/invite" title="Join Support Server"><img alt="Discord" src="https://img.shields.io/discord/917792741054894131?color=%235865F2&label=Join Support Server&logo=discord&logoColor=%23FFFFFF&style=for-the-badge"></a>
</p>
Expand Down
12 changes: 8 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ async function initOpenAI() {
if (loginType === 'openai' && accountType === 'free') {
const api = new ChatGPTAPIBrowser({
email: process.env.EMAIL,
password: process.env.PASSWORD
password: process.env.PASSWORD,
debug: process.env.DEBUG
});
await api.initSession();
return api;
Expand All @@ -47,7 +48,8 @@ async function initOpenAI() {
const api = new ChatGPTAPIBrowser({
email: process.env.EMAIL,
password: process.env.PASSWORD,
isGoogleLogin: true
isGoogleLogin: true,
debug: process.env.DEBUG
});
await api.initSession();
return api;
Expand All @@ -56,7 +58,8 @@ async function initOpenAI() {
const api = new ChatGPTAPIBrowser({
email: process.env.EMAIL,
password: process.env.PASSWORD,
isProAccount: true
isProAccount: true,
debug: process.env.DEBUG
});
await api.initSession();
return api;
Expand All @@ -66,7 +69,8 @@ async function initOpenAI() {
email: process.env.EMAIL,
password: process.env.PASSWORD,
isGoogleLogin: true,
isProAccount: true
isProAccount: true,
debug: process.env.DEBUG
});
await api.initSession();
return api;
Expand Down

0 comments on commit 83d9eac

Please sign in to comment.