Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MimeTypes = map[string]string{}/* 732 elements not displayed */
MimeTypes is a comprehensive map of file extensions to their corresponding MIME types. This is used to identify the type of file being uploaded or processed.
Functions ¶
func ConvertCliToOpenAI ¶
ConvertCliToOpenAI translates a single chunk of a streaming response from the backend client format to the OpenAI Server-Sent Events (SSE) format. It returns an empty string if the chunk contains no useful data.
func ConvertCliToOpenAINonStream ¶
ConvertCliToOpenAINonStream aggregates response chunks from the backend client into a single, non-streaming OpenAI-compatible JSON response.
func PrepareRequest ¶
PrepareRequest translates a raw JSON request from an OpenAI-compatible format to the internal format expected by the backend client. It parses messages, roles, content types (text, image, file), and tool calls.
Types ¶
This section is empty.