removed openai pro setting in env

This commit is contained in:
Max Kammler 2023-02-03 15:57:24 +01:00
parent 06e2b75c43
commit f24ca35c74
3 changed files with 1 additions and 5 deletions

View File

@ -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

View File

@ -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" }

View File

@ -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'