Update pkg/channels/wecom/aibot.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
e33712deff
commit
aa9ce6955b
1 changed files with 16 additions and 13 deletions
|
|
@ -93,21 +93,24 @@ type WeComAIBotMessage struct {
|
||||||
} `json:"event,omitempty"`
|
} `json:"event,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WeComAIBotStreamInfo represents the detailed stream content in streaming responses
|
||||||
|
type WeComAIBotStreamInfo struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
Finish bool `json:"finish"`
|
||||||
|
Content string `json:"content,omitempty"`
|
||||||
|
MsgItem []struct {
|
||||||
|
MsgType string `json:"msgtype"`
|
||||||
|
Image *struct {
|
||||||
|
Base64 string `json:"base64"`
|
||||||
|
MD5 string `json:"md5"`
|
||||||
|
} `json:"image,omitempty"`
|
||||||
|
} `json:"msg_item,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// WeComAIBotStreamResponse represents the streaming response format
|
// WeComAIBotStreamResponse represents the streaming response format
|
||||||
type WeComAIBotStreamResponse struct {
|
type WeComAIBotStreamResponse struct {
|
||||||
MsgType string `json:"msgtype"`
|
MsgType string `json:"msgtype"`
|
||||||
Stream struct {
|
Stream WeComAIBotStreamInfo `json:"stream"`
|
||||||
ID string `json:"id"`
|
|
||||||
Finish bool `json:"finish"`
|
|
||||||
Content string `json:"content,omitempty"`
|
|
||||||
MsgItem []struct {
|
|
||||||
MsgType string `json:"msgtype"`
|
|
||||||
Image *struct {
|
|
||||||
Base64 string `json:"base64"`
|
|
||||||
MD5 string `json:"md5"`
|
|
||||||
} `json:"image,omitempty"`
|
|
||||||
} `json:"msg_item,omitempty"`
|
|
||||||
} `json:"stream"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// WeComAIBotEncryptedResponse represents the encrypted response wrapper
|
// WeComAIBotEncryptedResponse represents the encrypted response wrapper
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue