refactor: update ClaudeMessageSource struct to include optional Url field and adjust media source handling in relay-claude #993

This commit is contained in:
CaIon
2025-04-24 00:39:09 +08:00
parent 2b1470d5f7
commit 3169bfe362
2 changed files with 7 additions and 12 deletions
+3 -2
View File
@@ -70,8 +70,9 @@ func (c *ClaudeMediaMessage) ParseMediaContent() []ClaudeMediaMessage {
type ClaudeMessageSource struct {
Type string `json:"type"`
MediaType string `json:"media_type"`
Data any `json:"data"`
MediaType string `json:"media_type,omitempty"`
Data any `json:"data,omitempty"`
Url string `json:"url,omitempty"`
}
type ClaudeMessage struct {