Update pkg/channels/wecom/aibot.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
ZHANG RUI 2026-02-28 15:29:51 +08:00 committed by Zhang Rui
parent e33712deff
commit aa9ce6955b

View file

@ -93,10 +93,8 @@ type WeComAIBotMessage struct {
} `json:"event,omitempty"` } `json:"event,omitempty"`
} }
// WeComAIBotStreamResponse represents the streaming response format // WeComAIBotStreamInfo represents the detailed stream content in streaming responses
type WeComAIBotStreamResponse struct { type WeComAIBotStreamInfo struct {
MsgType string `json:"msgtype"`
Stream struct {
ID string `json:"id"` ID string `json:"id"`
Finish bool `json:"finish"` Finish bool `json:"finish"`
Content string `json:"content,omitempty"` Content string `json:"content,omitempty"`
@ -107,7 +105,12 @@ type WeComAIBotStreamResponse struct {
MD5 string `json:"md5"` MD5 string `json:"md5"`
} `json:"image,omitempty"` } `json:"image,omitempty"`
} `json:"msg_item,omitempty"` } `json:"msg_item,omitempty"`
} `json:"stream"` }
// WeComAIBotStreamResponse represents the streaming response format
type WeComAIBotStreamResponse struct {
MsgType string `json:"msgtype"`
Stream WeComAIBotStreamInfo `json:"stream"`
} }
// WeComAIBotEncryptedResponse represents the encrypted response wrapper // WeComAIBotEncryptedResponse represents the encrypted response wrapper