···
(** Roles for conversation participants *)
type t = [ `User | `Assistant ]
11
-
val to_string : t -> string
12
-
val of_string : string -> t
14
-
val yojson_of_t : t -> Json.t
15
-
val t_of_yojson : Json.t -> t
10
+
include Json.Jsonable.S with type t := t
(** Progress tokens for long-running operations *)
module ProgressToken : sig
type t = [ `String of string | `Int of int ]
include Json.Jsonable.S with type t := t
type t = [ `String of string | `Int of int ]
include Json.Jsonable.S with type t := t
(** Cursors for pagination *)
36
-
val yojson_of_t : t -> Json.t
37
-
val t_of_yojson : Json.t -> t
28
+
include Json.Jsonable.S with type t := t
(** Annotations for objects *)
···
audience: Role.t list option;
50
-
val yojson_of_annotation : annotation -> Json.t
51
-
val annotation_of_yojson : Json.t -> annotation
53
-
val yojson_of_t : t -> Json.t
54
-
val t_of_yojson : Json.t -> t
40
+
include Json.Jsonable.S with type t := t
···
annotations: Annotated.annotation option;
64
-
val yojson_of_t : t -> Json.t
65
-
val t_of_yojson : Json.t -> t
49
+
include Json.Jsonable.S with type t := t
···
annotations: Annotated.annotation option;
76
-
val yojson_of_t : t -> Json.t
77
-
val t_of_yojson : Json.t -> t
59
+
include Json.Jsonable.S with type t := t
···
annotations: Annotated.annotation option;
88
-
val yojson_of_t : t -> Json.t
89
-
val t_of_yojson : Json.t -> t
69
+
include Json.Jsonable.S with type t := t
(** Base resource contents *)
···
mime_type: string option;
99
-
val yojson_of_t : t -> Json.t
100
-
val t_of_yojson : Json.t -> t
78
+
include Json.Jsonable.S with type t := t
(** Text resource contents *)
···
mime_type: string option;
111
-
val yojson_of_t : t -> Json.t
112
-
val t_of_yojson : Json.t -> t
88
+
include Json.Jsonable.S with type t := t
(** Binary resource contents *)
···
mime_type: string option;
123
-
val yojson_of_t : t -> Json.t
124
-
val t_of_yojson : Json.t -> t
98
+
include Json.Jsonable.S with type t := t
···
resource: [ `Text of TextResourceContents.t | `Blob of BlobResourceContents.t ];
annotations: Annotated.annotation option;
134
-
val yojson_of_t : t -> Json.t
135
-
val t_of_yojson : Json.t -> t
107
+
include Json.Jsonable.S with type t := t
(** Content type used in messages *)
···
155
-
val yojson_of_t : t -> Json.t
156
-
val t_of_yojson : Json.t -> t
126
+
include Json.Jsonable.S with type t := t
(** Message for sampling *)
···
content: [ `Text of TextContent.t | `Image of ImageContent.t | `Audio of AudioContent.t ];
166
-
val yojson_of_t : t -> Json.t
167
-
val t_of_yojson : Json.t -> t
135
+
include Json.Jsonable.S with type t := t
(** Implementation information *)
···
177
-
val yojson_of_t : t -> Json.t
178
-
val t_of_yojson : Json.t -> t
144
+
include Json.Jsonable.S with type t := t
(** JSONRPC message types *)
···
client_info: Implementation.t;
protocol_version: string;
241
-
val yojson_of_t : t -> Json.t
242
-
val t_of_yojson : Json.t -> t
206
+
include Json.Jsonable.S with type t := t
val create : capabilities:Json.t -> client_info:Implementation.t -> protocol_version:string -> t
val to_jsonrpc : id:RequestId.t -> t -> JSONRPCMessage.t
···
instructions: string option;
258
-
val yojson_of_t : t -> Json.t
259
-
val t_of_yojson : Json.t -> t
221
+
include Json.Jsonable.S with type t := t
val create : capabilities:Json.t -> server_info:Implementation.t -> protocol_version:string -> ?instructions:string -> ?meta:Json.t -> unit -> t
val to_jsonrpc : id:RequestId.t -> t -> JSONRPCMessage.t
···
273
-
val yojson_of_t : t -> Json.t
274
-
val t_of_yojson : Json.t -> t
234
+
include Json.Jsonable.S with type t := t
val create : ?meta:Json.t -> unit -> t
val to_jsonrpc : t -> JSONRPCMessage.t