feat: add xAI handling and response processing

This commit is contained in:
CaIon
2025-04-10 17:20:59 +08:00
parent 8efa12b941
commit 8723e3f239
6 changed files with 137 additions and 9 deletions

View File

@@ -45,15 +45,16 @@ type RealtimeUsage struct {
type InputTokenDetails struct {
CachedTokens int `json:"cached_tokens"`
CachedCreationTokens int
CachedCreationTokens int `json:"-"`
TextTokens int `json:"text_tokens"`
AudioTokens int `json:"audio_tokens"`
ImageTokens int `json:"image_tokens"`
}
type OutputTokenDetails struct {
TextTokens int `json:"text_tokens"`
AudioTokens int `json:"audio_tokens"`
TextTokens int `json:"text_tokens"`
AudioTokens int `json:"audio_tokens"`
ReasoningTokens int `json:"reasoning_tokens"`
}
type RealtimeSession struct {