Module Completions.Tool

Tool definition for function calling and OpenRouter server-side tools. Server tools (web search, web fetch, datetime, image generation) are executed by OpenRouter on your behalf and their results fed back to the model — no local function dispatch required.

module Function : sig ... end
module Web_fetch : sig ... end
module Image_generation : sig ... end
module Search_models : sig ... end
type t =
  1. | Function of Function.t
  2. | Web_fetch of Web_fetch.t
  3. | Datetime
  4. | Image_generation of Image_generation.t
  5. | Search_models of Search_models.t
include Ppx_jsonaf_conv_lib.Jsonafable.S with type t := t
val t_of_jsonaf : Jsonaf_kernel__.Type.t -> t
val jsonaf_of_t : t -> Jsonaf_kernel__.Type.t
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val function_ : name:string -> ?description:string -> ?parameters:Jsonaf.t -> ?strict:bool -> unit -> t
val web_fetch : ?engine:string -> ?max_uses:int -> ?max_content_tokens:int -> ?allowed_domains:string list -> ?blocked_domains:string list -> unit -> t
val datetime : t
val image_generation : ?model:string -> ?prompt:string -> ?parameters:(string * Jsonaf.t) list -> unit -> t
val search_models : ?max_results:int -> unit -> t