mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -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(
|
conf.registerChannelValue(
|
||||||
ChatGPT,
|
ChatGPT,
|
||||||
"temperature",
|
"temperature",
|
||||||
|
@ -59,8 +59,14 @@ class ChatGPT(callbacks.Plugin):
|
|||||||
frequency_penalty=self.registryValue("frequency_penalty", msg.channel),
|
frequency_penalty=self.registryValue("frequency_penalty", msg.channel),
|
||||||
user=msg.nick,
|
user=msg.nick,
|
||||||
)
|
)
|
||||||
response = " ".join(completion.choices[0].message.content.splitlines())
|
prefix = self.registryValue("nick_prefix", msg.channel)
|
||||||
irc.reply(response)
|
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"])
|
chat = wrap(chat, ["text"])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user