工具路由还没实现

This commit is contained in:
2026-06-18 08:14:09 +08:00
parent dfb3fdd3e5
commit 45822fd333
18 changed files with 172 additions and 223 deletions
+21 -18
View File
@@ -290,24 +290,27 @@ func insertInboundBotDirectMessage(s *store, record map[string]any, clientInfo m
}
_ = clientInfo // mqtt 元数据已经记录在 content_json 里,这里保留参数以保持队列签名一致
// 同时将消息添加到 LLM 队列
longName := nullableString(record["long_name"])
shortName := nullableString(record["short_name"])
channelID := nullableString(record["channel_id"])
_, err = s.EnqueueLLMMessage(LLMMessageQueueInput{
BotID: bot.ID,
BotNodeID: bot.NodeID,
BotNodeNum: bot.NodeNum,
FromNodeID: peerNodeID,
FromNodeNum: int64(peerNum),
LongName: longName,
ShortName: shortName,
Text: text,
PacketID: int64(packetID),
ChannelID: channelID,
Topic: topic,
ContentJSON: contentPtr,
})
// 同时将消息添加到 LLM 队列(忽略机器人自己发送的消息)
if peerNodeID != bot.NodeID {
longName := nullableString(record["long_name"])
shortName := nullableString(record["short_name"])
channelID := nullableString(record["channel_id"])
_, err = s.EnqueueLLMMessage(LLMMessageQueueInput{
BotID: bot.ID,
BotNodeID: bot.NodeID,
BotNodeNum: bot.NodeNum,
FromNodeID: peerNodeID,
FromNodeNum: int64(peerNum),
LongName: longName,
ShortName: shortName,
Text: text,
PacketID: int64(packetID),
ChannelID: channelID,
Topic: topic,
MessageType: "direct",
ContentJSON: contentPtr,
})
}
if err != nil {
printJSON(map[string]any{
"event": "llm_queue_enqueue_failed",