initial commit heh
This commit is contained in:
78 files changed
+11181
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""Base agent interface for HomeAgent."""
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any, Awaitable, Callable, Optional
|
||||
|
||||
|
||||
class BaseAgent(ABC):
|
||||
"""Abstract base class for all LLM agents."""
|
||||
|
||||
@abstractmethod
|
||||
async def chat(
|
||||
self,
|
||||
chat_id: int,
|
||||
thread_id: Optional[int],
|
||||
user_message: str,
|
||||
max_tool_iterations: int = 8,
|
||||
on_progress: Optional[Callable[[str], Awaitable[None]]] = None,
|
||||
) -> str:
|
||||
"""Process user message within chat topic and execute tools as needed.
|
||||
|
||||
Args:
|
||||
chat_id: Telegram Chat ID
|
||||
thread_id: Optional Telegram Forum Topic ID
|
||||
user_message: Incoming user prompt
|
||||
max_tool_iterations: Safety cap on consecutive tool call loops
|
||||
on_progress: Optional async callback for reporting status updates to the user
|
||||
|
||||
Returns:
|
||||
Final markdown response text for the user
|
||||
"""
|
||||
pass
|
||||
Reference in new issue
Block a user