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

@@ -242,7 +242,7 @@ public class GreetService : INService, IReadyExecutor
guild: channel.Guild,
channel: channel,
users: users.ToArray());
var text = SmartText.CreateFrom(conf.ChannelGreetMessageText);
text = await _repSvc.ReplaceAsync(text, repCtx);
try
@@ -630,6 +630,13 @@ public class GreetService : INService, IReadyExecutor
return conf.SendChannelByeMessage;
}
public bool GetBoostEnabled(ulong guildId)
{
using var uow = _db.GetDbContext();
var conf = uow.GuildConfigsForId(guildId, set => set);
return conf.SendBoostMessage;
}
#endregion
#region Test Messages