Re-fix adding trump things
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 13s
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 13s
This commit is contained in:
parent
cc4198dffe
commit
03f222a1a3
1 changed files with 10 additions and 3 deletions
|
@ -1041,8 +1041,15 @@ class Ollama(commands.Cog):
|
||||||
truths: list[TruthPayload] = list(map(lambda t: TruthPayload.model_validate(t), truths))
|
truths: list[TruthPayload] = list(map(lambda t: TruthPayload.model_validate(t), truths))
|
||||||
for truth in truths:
|
for truth in truths:
|
||||||
if truth.author == "trump":
|
if truth.author == "trump":
|
||||||
self.history.add_message(thread_id, "assistant", truth.content, save=False)
|
await asyncio.to_thread(
|
||||||
break
|
functools.partial(
|
||||||
|
self.history.add_message,
|
||||||
|
thread_id,
|
||||||
|
"assistant",
|
||||||
|
truth.content,
|
||||||
|
save=False
|
||||||
|
)
|
||||||
|
)
|
||||||
self.history.add_message(thread_id, "user", "Generate a new truth post.")
|
self.history.add_message(thread_id, "user", "Generate a new truth post.")
|
||||||
|
|
||||||
tried = set()
|
tried = set()
|
||||||
|
@ -1078,7 +1085,7 @@ class Ollama(commands.Cog):
|
||||||
last_edit = time.time()
|
last_edit = time.time()
|
||||||
|
|
||||||
for truth in truths:
|
for truth in truths:
|
||||||
if truth["content"] == embed.description:
|
if truth.content == embed.description:
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name="Repeated truth :(",
|
name="Repeated truth :(",
|
||||||
value="This truth was already truthed. Shit AI."
|
value="This truth was already truthed. Shit AI."
|
||||||
|
|
Loading…
Reference in a new issue