Connect to Discord, switch to NVIDIA NIM providers
- Enable Discord channel, respond to all messages from allowed users - Switch all agents to NVIDIA NIM (Kimi K2.5, DeepSeek V3.1) - Auto-approve all tools for non-interactive Docker deployment - Fix tool call arguments serialization (dict → JSON string) - Fix Dockerfile to copy source before uv sync Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,16 +45,10 @@ class DiscordChannel(BaseChannel):
|
||||
if message.author.bot:
|
||||
return
|
||||
|
||||
# Check allowlist
|
||||
# Check allowlist — if set, only respond to listed users
|
||||
if self.allowed_users and str(message.author.id) not in self.allowed_users:
|
||||
return
|
||||
|
||||
# Only respond to mentions or DMs
|
||||
is_dm = isinstance(message.channel, discord.DMChannel)
|
||||
is_mentioned = self.client.user in message.mentions if self.client.user else False
|
||||
if not is_dm and not is_mentioned:
|
||||
return
|
||||
|
||||
content = message.content
|
||||
# Strip bot mention from content
|
||||
if self.client.user:
|
||||
|
||||
@@ -7,6 +7,8 @@ from typing import Any
|
||||
from loguru import logger
|
||||
|
||||
from xtrm_agent.config import AgentFileConfig
|
||||
import json
|
||||
|
||||
from xtrm_agent.llm.provider import LLMProvider, LLMResponse
|
||||
from xtrm_agent.tools.approval import ApprovalEngine
|
||||
from xtrm_agent.tools.registry import ToolRegistry
|
||||
@@ -100,7 +102,7 @@ class Engine:
|
||||
{
|
||||
"id": tc.id,
|
||||
"type": "function",
|
||||
"function": {"name": tc.name, "arguments": tc.arguments},
|
||||
"function": {"name": tc.name, "arguments": json.dumps(tc.arguments)},
|
||||
}
|
||||
for tc in response.tool_calls
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user