From f24ca35c74d5527d90838d19d5d0050a5bc19ab5 Mon Sep 17 00:00:00 2001 From: Max Kammler Date: Fri, 3 Feb 2023 15:57:24 +0100 Subject: [PATCH] removed openai pro setting in env --- .env.example | 2 -- src/env.ts | 2 -- src/index.ts | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.env.example b/.env.example index 3eb8d48..762b920 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,6 @@ # ChatGPT Settings (required) # Set the API Key from OpenAI OPENAI_API_KEY= -# Set the next line to true if you are using a ChatGPT pro account. -OPENAI_PRO=false # Set the ChatGPT conversation context to 'thread', 'room' or 'both'. CHATGPT_CONTEXT=thread diff --git a/src/env.ts b/src/env.ts index de2a56c..032be26 100644 --- a/src/env.ts +++ b/src/env.ts @@ -24,7 +24,6 @@ export const { MATRIX_DEFAULT_PREFIX_REPLY, /** ChatGPT Settings */ OPENAI_API_KEY, - OPENAI_PRO, CHATGPT_CONTEXT, CHATGPT_TIMEOUT, CHATGPT_MODEL @@ -49,7 +48,6 @@ export const { MATRIX_DEFAULT_PREFIX_REPLY: { schema: z.boolean().default(false), description: "Set to false if you want the bot to answer to all messages in a thread/conversation" }, /** ChatGPT Settings */ OPENAI_API_KEY: { schema: z.string().default(""), description: "Set to the API key from https://platform.openai.com/account/api-keys"}, - OPENAI_PRO: { schema: z.boolean().default(false), description: "Set to true if you have a paid ChatGPT subscription." }, CHATGPT_TIMEOUT: { schema: z.number().default(2 * 60 * 1000), description: "Set number of milliseconds to wait for ChatGPT responses" }, CHATGPT_CONTEXT: { schema: z.enum(["thread", "room", "both"]).default("thread"), description: "Set the ChatGPT conversation context to 'thread', 'room' or 'both'" }, CHATGPT_MODEL: { schema: z.string().default("text-chat-davinci-002-20221122"), description: "The model for the ChatGPT-API to use" } diff --git a/src/index.ts b/src/index.ts index 45a4409..40e311b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ import { } from "matrix-bot-sdk"; import * as path from "path"; -import { DATA_PATH, OPENAI_API_KEY, OPENAI_PRO, MATRIX_HOMESERVER_URL, MATRIX_ACCESS_TOKEN, MATRIX_AUTOJOIN, MATRIX_BOT_PASSWORD, MATRIX_BOT_USERNAME, MATRIX_ENCRYPTION, MATRIX_THREADS, CHATGPT_CONTEXT, CHATGPT_MODEL } from './env.js' +import { DATA_PATH, OPENAI_API_KEY, MATRIX_HOMESERVER_URL, MATRIX_ACCESS_TOKEN, MATRIX_AUTOJOIN, MATRIX_BOT_PASSWORD, MATRIX_BOT_USERNAME, MATRIX_ENCRYPTION, MATRIX_THREADS, CHATGPT_CONTEXT, CHATGPT_MODEL } from './env.js' import { parseMatrixUsernamePretty } from './utils.js'; import CommandHandler from "./handlers.js" import { ChatGPTAPI } from 'chatgpt'