Documentation
¶
Index ¶
- func FilePartFromBase64(filename, fileData string) lipapi.Part
- func ImagePartFromURL(imageURL string) (lipapi.Part, error)
- func MarshalBlock(blk map[string]json.RawMessage) ([]byte, error)
- func ModelFromExtensions(c *lipapi.Call, extKey string) string
- func WriteErrorJSON(w http.ResponseWriter, status int, message, errType, code string) error
- type APIError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilePartFromBase64 ¶
FilePartFromBase64 builds a data-URL file part from base64 payload and optional filename.
func ImagePartFromURL ¶
ImagePartFromURL maps a URL or data-URL string to a canonical image part.
func MarshalBlock ¶
func MarshalBlock(blk map[string]json.RawMessage) ([]byte, error)
func ModelFromExtensions ¶
ModelFromExtensions returns the wire model string stored under extKey during decode.
func WriteErrorJSON ¶
func WriteErrorJSON(w http.ResponseWriter, status int, message, errType, code string) error
WriteErrorJSON writes an OpenAI-shaped JSON error before any streamed bytes.
Types ¶
Click to show internal directories.
Click to hide internal directories.