From 245beba2411c76cc9e5206d5af74df5c6db8981d Mon Sep 17 00:00:00 2001 From: lxRbckl Date: Tue, 30 Jan 2024 05:11:58 -0600 Subject: [PATCH] Update --- Dockerfile | 4 ++++ source/client.js | 6 +++--- source/command/discussion.js | 7 ++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c1958e..c0d48a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,12 @@ FROM node:19.5.0 # referencing kubernetes environment # +ENV guildId ${guildId} +ENV gptModel ${gptModel} +ENV channelId ${channelId} ENV tokenopenai ${tokenopenai} ENV tokendiscord ${tokendiscord} +ENV applicationId ${applicationId} WORKDIR /usr/app diff --git a/source/client.js b/source/client.js index fa58ff6..580fd5f 100644 --- a/source/client.js +++ b/source/client.js @@ -22,9 +22,9 @@ class client { openaiToken, discordToken, - guildId = '974210528958369863', - channelId = '1061387142082863104', - applicationId = '970221184065081374' + guildId = process.env.guildId, + channelId = process.env.channelId, + applicationId = process.env.applicationId ) { diff --git a/source/command/discussion.js b/source/command/discussion.js index f8b09b9..cce5212 100644 --- a/source/command/discussion.js +++ b/source/command/discussion.js @@ -8,7 +8,12 @@ class discussion { constructor(openaiToken) { - this.gpt = new gpt({token : openaiToken}); + this.gpt = new gpt({ + + token : openaiToken, + model : process.env.gptModel + + }); this.query = 'Ask me a very interesting question.'; }