diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index 4122ecb..c9c251e 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -1041,8 +1041,15 @@ class Ollama(commands.Cog): truths: list[TruthPayload] = list(map(lambda t: TruthPayload.model_validate(t), truths)) for truth in truths: if truth.author == "trump": - self.history.add_message(thread_id, "assistant", truth.content, save=False) - break + await asyncio.to_thread( + 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.") tried = set() @@ -1078,7 +1085,7 @@ class Ollama(commands.Cog): last_edit = time.time() for truth in truths: - if truth["content"] == embed.description: + if truth.content == embed.description: embed.add_field( name="Repeated truth :(", value="This truth was already truthed. Shit AI."