mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 12:31:07 -05:00
ChatGPT: add some spammy junk options...
This commit is contained in:
parent
dfac3d2772
commit
585ef8f2de
@ -77,6 +77,32 @@ conf.registerChannelValue(
|
||||
),
|
||||
)
|
||||
|
||||
conf.registerChannelValue(
|
||||
ChatGPT,
|
||||
"reply_intact",
|
||||
registry.Boolean(
|
||||
False,
|
||||
_(
|
||||
"""
|
||||
Get spammy and enable line per line reply...
|
||||
"""
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
conf.registerChannelValue(
|
||||
ChatGPT,
|
||||
"nick_prefix",
|
||||
registry.Boolean(
|
||||
True,
|
||||
_(
|
||||
"""
|
||||
Prefix nick on replies true/false...
|
||||
"""
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
conf.registerChannelValue(
|
||||
ChatGPT,
|
||||
"temperature",
|
||||
|
@ -59,8 +59,14 @@ class ChatGPT(callbacks.Plugin):
|
||||
frequency_penalty=self.registryValue("frequency_penalty", msg.channel),
|
||||
user=msg.nick,
|
||||
)
|
||||
response = " ".join(completion.choices[0].message.content.splitlines())
|
||||
irc.reply(response)
|
||||
prefix = self.registryValue("nick_prefix", msg.channel)
|
||||
if self.registryValue("reply_intact", msg.channel):
|
||||
for line in completion.choices[0].message.content.splitlines():
|
||||
if line:
|
||||
irc.reply(line, prefixNick=prefix)
|
||||
else:
|
||||
response = " ".join(completion.choices[0].message.content.splitlines())
|
||||
irc.reply(response, prefixNick=prefix)
|
||||
|
||||
chat = wrap(chat, ["text"])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user