Message.Content_partmodule Cache_control : sig ... endAnthropic-style prompt-cache annotation. Attach to a content part and successive identical-prefix requests will hit the cache, yielding a non-zero usage.prompt_tokens_details.cached_tokens.
module Text : sig ... endmodule Image_url : sig ... endmodule File : sig ... endmodule Input_audio : sig ... endmodule Video_url : sig ... endtype t = | Text of Text.t| Image_url of Image_url.t| File of File.t| Input_audio of Input_audio.t| Video_url of Video_url.tval text : ?cache_control:Cache_control.t -> string -> tval image_base64 :
?cache_control:Cache_control.t ->
mime_type:string ->
data:string ->
unit ->
tmime_type should be e.g. "image/jpeg", "image/png", "image/webp", "image/gif"
val file :
?cache_control:Cache_control.t ->
filename:string ->
file_data:string ->
unit ->
tfile_data can be either a URL (for publicly accessible files) or a data URL like "data:application/pdf;base64,..." for local files
val audio :
?cache_control:Cache_control.t ->
format:string ->
data:string ->
unit ->
tdata is base64-encoded audio bytes (no data: prefix); format is e.g. "wav", "mp3".
val video_url : ?cache_control:Cache_control.t -> url:string -> unit -> tval video_base64 :
?cache_control:Cache_control.t ->
mime_type:string ->
data:string ->
unit ->
t