add llms and make it easier to add new ones i think (#1)
hopefully this isn't totally dogass have fun!! Reviewed-on: #1 Co-authored-by: Neeko iko <Neeko@iko.pink> Co-committed-by: Neeko iko <Neeko@iko.pink>
This commit is contained in:
parent
1d2e9c2f2c
commit
513924b1bb
2 changed files with 23 additions and 3 deletions
|
@ -26,7 +26,6 @@ local magicEightBall = {
|
|||
"[b]IndexOutOfRangeException[/b]: [i]Index was outside the bounds of the array.[/i]",
|
||||
"You've reached our limit of messages per 1 minute. Please try again later.",
|
||||
}
|
||||
|
||||
-- @gorque c'est vrai?
|
||||
local bouleMagiqueNumeroHuit = {
|
||||
"D'après moi oui",
|
||||
|
@ -56,6 +55,18 @@ local bouleMagiqueNumeroHuit = {
|
|||
"Vous avez atteint notre limite de messages par 1 minute. Veuillez réessayer plus tard.",
|
||||
}
|
||||
|
||||
local englishNames = { -- new LLMs are added every week, making this into a list allows you to add new ones easier, i think.
|
||||
["grok"]=4,
|
||||
["chatgpt"]=5,
|
||||
["askperplexity"]=8,
|
||||
["gemini"]=5,
|
||||
["bard"]=3,
|
||||
["copilot"]=6,
|
||||
["deepseek"]=5,
|
||||
["supergrok"]=7,
|
||||
["siri"]=1
|
||||
}
|
||||
|
||||
-- levenshtein distance thing
|
||||
local function lesbian(str1, str2, caseSensitive)
|
||||
if not caseSensitive then
|
||||
|
@ -111,6 +122,14 @@ local function lesbian(str1, str2, caseSensitive)
|
|||
return matrix[len1][len2]
|
||||
end
|
||||
|
||||
local function superLesbian(stringTable, str1)
|
||||
for key, dist in pairs(stringTable) do -- lame string chceker thing
|
||||
if lesbian(key, str1) < dist then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
-- keep track for cooldowns
|
||||
local lastInvokes = {}
|
||||
|
||||
|
@ -123,9 +142,10 @@ kmj.satori.addMessageHandler(function(msg, isSelf)
|
|||
local matchAt = msg.textClean:sub(2, spacePos - 1):lower()
|
||||
local eightBall
|
||||
|
||||
|
||||
if matchAt == "gorque" then
|
||||
eightBall = bouleMagiqueNumeroHuit
|
||||
elseif lesbian("grok", matchAt) < 4 or lesbian("askperplexity", matchAt) < 8 then
|
||||
elseif superLesbian(englishNames, matchAt) then
|
||||
eightBall = magicEightBall
|
||||
else return true end
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version = "1.0.0"
|
||||
version = "1.1.0"
|
||||
description = "the gork ball"
|
||||
authors = ["flashwave <me@flash.moe>"]
|
||||
sources = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue