diff --git a/.env.example b/.env.example index ca91d53..a691438 100644 --- a/.env.example +++ b/.env.example @@ -8,7 +8,7 @@ CHATGPT_CONTEXT=thread #CHATGPT_MODEL=text-chat-davinci-002-20221122 # (Optional) Explicitly set the prefix sent to model at the beginning of a conversation #CHATGPT_PROMPT_PREFIX=Instructions:\nYou are ChatGPT, a large language model trained by OpenAI. -# (Optional) Set to true if ChatGPT should ignore any attachments which are not text +# (Optional) Set to true if ChatGPT should ignore any messages which are not text #CHATGPT_IGNORE_MEDIA=false # Set data store settings diff --git a/src/handlers.ts b/src/handlers.ts index ac2bb60..c6854f4 100644 --- a/src/handlers.ts +++ b/src/handlers.ts @@ -35,7 +35,7 @@ export default class CommandHandler { if (MATRIX_WHITELIST && !MATRIX_WHITELIST.split(" ").find(w => event.sender.endsWith(w))) return true; // Ignore if not on whitelist if set if (Date.now() - event.origin_server_ts > 10000) return true; // Ignore old messages if (event.content["m.relates_to"]?.["rel_type"] === "m.replace") return true; // Ignore edits - if (CHATGPT_IGNORE_MEDIA && event.content.msgtype !== "m.text") return true; // Ignore everything which is not text + if (CHATGPT_IGNORE_MEDIA && event.content.msgtype !== "m.text") return true; // Ignore everything which is not text if set return false; }