Documentation
¶
Index ¶
- func AppendSSEEventBytes(out []byte, event string, payload []byte, trailingNewlines int) []byte
- func AppendSSEEventString(out []byte, event, payload string, trailingNewlines int) []byte
- func AttachCacheControl(dst []byte, src gjson.Result) []byte
- func AttachMessageCacheControl(msg []byte, src gjson.Result) []byte
- func ClaudeInputTokensJSON(count int64) []byte
- func ClaudeMessageSystemReminderText(content gjson.Result) (string, bool)
- func GeminiTokenCountJSON(count int64) []byte
- func InteractionsUsage(root gjson.Result) gjson.Result
- func SSEEventData(event string, payload []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendSSEEventBytes ¶
func AppendSSEEventString ¶
func AttachCacheControl ¶ added in v7.2.55
AttachCacheControl copies a Claude-compatible cache_control object from src onto dst. Returns dst unchanged when cache_control is missing or not an object.
func AttachMessageCacheControl ¶ added in v7.2.55
AttachMessageCacheControl applies message-level cache_control onto the last content block. Part-level cache_control wins when the last block already has one. String content is promoted to a content array so Claude can accept cache_control.
func ClaudeInputTokensJSON ¶
func ClaudeMessageSystemReminderText ¶ added in v7.2.30
ClaudeMessageSystemReminderText converts a Claude message-level system value into ordinary user-visible reminder text for non-Claude upstream formats.
func GeminiTokenCountJSON ¶
func SSEEventData ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.