From 8316b03c8c5ff73f5aec9900bb170dee03ca534b Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 19 Jul 2024 15:31:09 +1200 Subject: [PATCH] Fixed some miscellaneous warnings in the build process And also updated games.yml and creds_example.yml --- CHANGELOG.md | 2 ++ .../Games/ChatterBot/_common/Choice.cs | 3 ++- .../Games/ChatterBot/_common/Message.cs | 3 ++- .../_common/OpenAiApi/OpenAiApiMessage.cs | 3 ++- .../_common/OpenAiApi/OpenAiApiRequest.cs | 3 ++- .../Modules/Searches/ReligiousCommands.cs | 3 ++- src/EllieBot/creds_example.yml | 2 +- src/EllieBot/data/games.yml | 22 +++++++++++++------ 8 files changed, 28 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5722a6..e842b1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o +## Unreleased + ### Added - Added: Added a `'afk ?` command which sets an afk message which will trigger whenever someone pings you diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs index db71eee..0d3cbe8 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/Choice.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable disable +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs index 04532f5..bd85a77 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/Message.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable disable +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs index 0fdaf71..efadfc0 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable disable +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs index 1ea5d69..cf06ac1 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiRequest.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable disable +using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; diff --git a/src/EllieBot/Modules/Searches/ReligiousCommands.cs b/src/EllieBot/Modules/Searches/ReligiousCommands.cs index a15bc74..97bd82a 100644 --- a/src/EllieBot/Modules/Searches/ReligiousCommands.cs +++ b/src/EllieBot/Modules/Searches/ReligiousCommands.cs @@ -1,4 +1,5 @@ -using EllieBot.Modules.Searches.Common; +#nullable disable +using EllieBot.Modules.Searches.Common; using System.Net.Http.Json; using System.Text.Json.Serialization; diff --git a/src/EllieBot/creds_example.yml b/src/EllieBot/creds_example.yml index c21a350..17e45e9 100644 --- a/src/EllieBot/creds_example.yml +++ b/src/EllieBot/creds_example.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 7 +version: 9 # Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/ token: "" # List of Ids of the users who have bot owner permissions diff --git a/src/EllieBot/data/games.yml b/src/EllieBot/data/games.yml index b46f69e..b5fa9c1 100644 --- a/src/EllieBot/data/games.yml +++ b/src/EllieBot/data/games.yml @@ -57,18 +57,26 @@ raceAnimals: # Which chatbot API should bot use. # 'cleverbot' - bot will use Cleverbot API. # 'gpt' - bot will use GPT API -chatBot: Gpt +chatBot: OpenAi chatGpt: + # Url to any openai api compatible url. + # Make sure to modify the modelName appropriately + # DO NOT add /v1/chat/completions suffix to the url + apiUrl: https://api.openai.com # Which GPT Model should bot use. - # gpt35turbo - cheapest - # gpt4o - more expensive, higher quality + # gpt-3.5-turbo - cheapest + # gpt-4o - more expensive, higher quality # - modelName: Gpt35Turbo - # How should the chat bot behave, what's its personality? (Usage of this counts towards the max tokens) + # If you are using another openai compatible api, you may use any of the models supported by that api + modelName: gpt-3.5-turbo + # How should the chatbot behave, what's its personality? + # This will be sent as a system message. + # Usage of this counts towards the max tokens. personalityPrompt: You are a chat bot willing to have a conversation with anyone about anything. - # The maximum number of messages in a conversation that can be remembered. (This will increase the number of tokens used) + # The maximum number of messages in a conversation that can be remembered. + # This will increase the number of tokens used. chatHistory: 5 - # The maximum number of tokens to use per GPT API call + # The maximum number of tokens to use per OpenAi API call maxTokens: 100 # The minimum number of tokens to use per GPT API call, such that chat history is removed to make room. minTokens: 30