Tortoise based database models

This commit is contained in:
Shivering Ocelot committed 2026-01-03 12:41:17 -05:00
1 parent 2c7b3d61d1
commit cccdb7d231
12 files changed
+469 -382

No files matched your search

+5 -5
View File
@@ -65,10 +65,10 @@ class DebugAgent(Agent):
tools = []
async def received_message(self, message):
chat_view = self.app.get_chat_view(message.chat_id)
chat_view = await self.app.get_chat_view(message.chat_id)
response = chat_view.debug_string()
self.app.send_chat_message(
await self.app.send_chat_message(
chat_id=message.chat_id,
sender=self.id,
content=response,
@@ -178,7 +178,7 @@ class ToolUsingAgent:
system_prologue="You are given the entire context of the conversation, respond with your next message in the conversation by using the '!!response' command."
)
self.app.send_chat_message(
await self.app.send_chat_message(
chat_id=message.chat_id,
sender=self.id,
content=response,
@@ -235,7 +235,7 @@ class LlamaAgent(Agent):
is_self = is_digit and str(sender) == str(self.id)
return self.name if is_self else sender
chat_view = self.app.get_chat_view(message.chat_id)
chat_view = await self.app.get_chat_view(message.chat_id)
thread_messages = chat_view.get_thread(message.thread_id).messages
chat_summary = "\n".join(f"[{sender_name(message)}]: {message.content}" for message in thread_messages)
messages = [
@@ -244,7 +244,7 @@ class LlamaAgent(Agent):
]
response = await replicate_llama_completion(self.app, messages)
self.app.send_chat_message(
await self.app.send_chat_message(
chat_id=message.chat_id,
sender=self.id,
content=response,