chore: initial import
This commit is contained in:
25
Runner.py
Normal file
25
Runner.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from AIInteraction import AIInteraction
|
||||
|
||||
|
||||
class Runner:
|
||||
"""Small façade so other modules only import one thing."""
|
||||
|
||||
@staticmethod
|
||||
def run(userId, category, promptName, context, history=None, modeHint=None):
|
||||
message = AIInteraction.callAI(
|
||||
userId,
|
||||
category,
|
||||
promptName,
|
||||
context,
|
||||
history=history,
|
||||
modeHint=modeHint,
|
||||
)
|
||||
return message
|
||||
|
||||
@staticmethod
|
||||
def sendToDiscord(userId, message):
|
||||
if not userId:
|
||||
return
|
||||
from DiscordGateway import DiscordGateway # lazy import to avoid dependency in simple runs
|
||||
|
||||
DiscordGateway.sendMessage(userId, message)
|
||||
Reference in New Issue
Block a user