diff --git a/bot/vikingbot/agent/context.py b/bot/vikingbot/agent/context.py index 25570043..a989cdb5 100644 --- a/bot/vikingbot/agent/context.py +++ b/bot/vikingbot/agent/context.py @@ -303,7 +303,10 @@ def add_assistant_message( Returns: Updated message list. """ - msg: dict[str, Any] = {"role": "assistant", "content": content or ""} + msg: dict[str, Any] = {"role": "assistant"} + + if content: + msg["content"] = content if tool_calls: msg["tool_calls"] = tool_calls diff --git a/bot/vikingbot/channels/telegram.py b/bot/vikingbot/channels/telegram.py index 2e76a32d..e0c2f2e0 100644 --- a/bot/vikingbot/channels/telegram.py +++ b/bot/vikingbot/channels/telegram.py @@ -99,11 +99,11 @@ class TelegramChannel(BaseChannel): def __init__( self, - config: TelegramConfig, + config: TelegramChannelConfig, bus: MessageBus, groq_api_key: str = "", ): - super().__init__(config, bus, **kwargs) + super().__init__(config, bus) self.config: TelegramChannelConfig = config self.groq_api_key = groq_api_key self._app: Application | None = None