This commit is contained in:
Max Kammler 2023-02-07 10:36:08 +01:00
parent d72b0ba772
commit 58ec2f7f10
2 changed files with 2 additions and 2 deletions

View File

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

View File

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