Documentation
¶
Index ¶
- func CheckModelPrefix(model string, prefix string) bool
- func CheckModelSubPrefix(model string, prefix string) bool
- func ConvertDataUserFile(blockText string) (bool, *uctypes.UIMessagePart)
- func CreateToolUseData(toolCallID, toolName string, arguments string, chatOpts uctypes.WaveChatOpts) uctypes.UIMessageDataToolUse
- func ExtractImageUrl(data []byte, url, mimeType string) (string, error)
- func ExtractTextData(data []byte, url string) ([]byte, error)
- func ExtractXmlAttribute(tag, attrName string) (string, bool)
- func FormatAttachedDirectoryListing(directoryName, jsonContent string) string
- func FormatAttachedTextFile(fileName string, textContent []byte) string
- func GeminiSupportsImageToolResults(model string) bool
- func GenerateDeterministicSuffix(inputs ...string) string
- func IsOpenAIReasoningModel(model string) bool
- func JsonEncodeRequestBody(reqBody any) (bytes.Buffer, error)
- func SendToolProgress(toolCallID, toolName string, jsonData []byte, chatOpts uctypes.WaveChatOpts, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckModelPrefix ¶
func CheckModelSubPrefix ¶
func ConvertDataUserFile ¶
func ConvertDataUserFile(blockText string) (bool, *uctypes.UIMessagePart)
ConvertDataUserFile converts OpenAI attached file/directory blocks to UIMessagePart Returns (found, part) where found indicates if the prefix was matched, and part is the converted UIMessagePart (can be nil if parsing failed)
func CreateToolUseData ¶
func CreateToolUseData(toolCallID, toolName string, arguments string, chatOpts uctypes.WaveChatOpts) uctypes.UIMessageDataToolUse
CreateToolUseData creates a UIMessageDataToolUse from tool call information
func ExtractImageUrl ¶
ExtractImageUrl extracts an image URL from either URL field (http/https/data) or raw Data
func ExtractTextData ¶
ExtractTextData extracts text data from either Data field or URL field (data: URLs only)
func ExtractXmlAttribute ¶
ExtractXmlAttribute extracts an attribute value from an XML-like tag. Expects double-quoted strings where internal quotes are encoded as ". Returns the unquoted value and true if found, or empty string and false if not found or invalid.
func FormatAttachedDirectoryListing ¶
FormatAttachedDirectoryListing formats a directory listing attachment with proper encoding and deterministic suffix
func FormatAttachedTextFile ¶
FormatAttachedTextFile formats a text file attachment with proper encoding and deterministic suffix
func GeminiSupportsImageToolResults ¶
GeminiSupportsImageToolResults returns true if the model supports multimodal function responses (images in tool results) This is only supported by Gemini 3 Pro and later models
func GenerateDeterministicSuffix ¶
GenerateDeterministicSuffix creates an 8-character hash from input strings
func IsOpenAIReasoningModel ¶
func SendToolProgress ¶
func SendToolProgress(toolCallID, toolName string, jsonData []byte, chatOpts uctypes.WaveChatOpts, sseHandler *sse.SSEHandlerCh, usePartialParse bool)
SendToolProgress sends tool progress updates via SSE if the tool has a progress descriptor
Types ¶
This section is empty.