add: Added support for any openai compatible api for the chatterbot feature

change: Changed games.yml to allow input of the apiUrl (needs to be openai compatible) and modelName as a string.
This commit is contained in:
Kwoth
2024-07-13 15:26:00 +00:00
parent ae1ddd82d0
commit db66264bc6
15 changed files with 260 additions and 170 deletions

View File

@@ -1,5 +1,5 @@
# DO NOT CHANGE
version: 4
version: 5
# Hangman related settings (.hangman command)
hangman:
# The amount of currency awarded to the winner of a hangman game
@@ -56,19 +56,27 @@ raceAnimals:
name: Unicorn
# Which chatbot API should bot use.
# 'cleverbot' - bot will use Cleverbot API.
# 'gpt' - bot will use GPT API
chatBot: Gpt
# 'openai' - bot will use OpenAi API
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