@tinyweb_dev/agent-framework-llm 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/dist/cache-policy.d.ts +3 -0
  2. package/dist/cache-policy.d.ts.map +1 -0
  3. package/dist/index.cjs +2968 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.ts +23 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +2843 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/llm.cjs +1718 -0
  10. package/dist/llm.cjs.map +1 -0
  11. package/dist/llm.d.ts +284 -0
  12. package/dist/llm.d.ts.map +1 -0
  13. package/dist/llm.js +1692 -0
  14. package/dist/llm.js.map +1 -0
  15. package/dist/protocols/openai-chat.cjs +2455 -0
  16. package/dist/protocols/openai-chat.cjs.map +1 -0
  17. package/dist/protocols/openai-chat.d.ts +359 -0
  18. package/dist/protocols/openai-chat.d.ts.map +1 -0
  19. package/dist/protocols/openai-chat.js +2426 -0
  20. package/dist/protocols/openai-chat.js.map +1 -0
  21. package/dist/protocols/openai-compatible-chat.cjs +2455 -0
  22. package/dist/protocols/openai-compatible-chat.cjs.map +1 -0
  23. package/dist/protocols/openai-compatible-chat.d.ts +77 -0
  24. package/dist/protocols/openai-compatible-chat.d.ts.map +1 -0
  25. package/dist/protocols/openai-compatible-chat.js +2431 -0
  26. package/dist/protocols/openai-compatible-chat.js.map +1 -0
  27. package/dist/protocols/shared.cjs +904 -0
  28. package/dist/protocols/shared.cjs.map +1 -0
  29. package/dist/protocols/shared.d.ts +51 -0
  30. package/dist/protocols/shared.d.ts.map +1 -0
  31. package/dist/protocols/shared.js +857 -0
  32. package/dist/protocols/shared.js.map +1 -0
  33. package/dist/protocols/utils/openai-options.d.ts +15 -0
  34. package/dist/protocols/utils/openai-options.d.ts.map +1 -0
  35. package/dist/protocols/utils/tool-stream.d.ts +78 -0
  36. package/dist/protocols/utils/tool-stream.d.ts.map +1 -0
  37. package/dist/provider.cjs +20 -0
  38. package/dist/provider.cjs.map +1 -0
  39. package/dist/provider.d.ts +19 -0
  40. package/dist/provider.d.ts.map +1 -0
  41. package/dist/provider.js +17 -0
  42. package/dist/provider.js.map +1 -0
  43. package/{src/providers/openai-compatible-profile.ts → dist/providers/openai-compatible-profile.cjs} +12 -12
  44. package/dist/providers/openai-compatible-profile.cjs.map +1 -0
  45. package/dist/providers/openai-compatible-profile.d.ts +52 -0
  46. package/dist/providers/openai-compatible-profile.d.ts.map +1 -0
  47. package/dist/providers/openai-compatible-profile.js +21 -0
  48. package/dist/providers/openai-compatible-profile.js.map +1 -0
  49. package/dist/providers/openai-compatible.cjs +2545 -0
  50. package/dist/providers/openai-compatible.cjs.map +1 -0
  51. package/dist/providers/openai-compatible.d.ts +128 -0
  52. package/dist/providers/openai-compatible.d.ts.map +1 -0
  53. package/dist/providers/openai-compatible.js +2507 -0
  54. package/dist/providers/openai-compatible.js.map +1 -0
  55. package/dist/providers/openai-options.cjs +797 -0
  56. package/dist/providers/openai-options.cjs.map +1 -0
  57. package/dist/providers/openai-options.d.ts +29 -0
  58. package/dist/providers/openai-options.d.ts.map +1 -0
  59. package/dist/providers/openai-options.js +792 -0
  60. package/dist/providers/openai-options.js.map +1 -0
  61. package/dist/providers/openai.cjs +2529 -0
  62. package/dist/providers/openai.cjs.map +1 -0
  63. package/dist/providers/openai.d.ts +87 -0
  64. package/dist/providers/openai.d.ts.map +1 -0
  65. package/dist/providers/openai.js +2501 -0
  66. package/dist/providers/openai.js.map +1 -0
  67. package/dist/route/auth-options.cjs +855 -0
  68. package/dist/route/auth-options.cjs.map +1 -0
  69. package/dist/route/auth-options.d.ts +25 -0
  70. package/dist/route/auth-options.d.ts.map +1 -0
  71. package/dist/route/auth-options.js +852 -0
  72. package/dist/route/auth-options.js.map +1 -0
  73. package/dist/route/auth.cjs +855 -0
  74. package/dist/route/auth.cjs.map +1 -0
  75. package/dist/route/auth.d.ts +51 -0
  76. package/dist/route/auth.d.ts.map +1 -0
  77. package/dist/route/auth.js +836 -0
  78. package/dist/route/auth.js.map +1 -0
  79. package/dist/route/client.cjs +1844 -0
  80. package/dist/route/client.cjs.map +1 -0
  81. package/dist/route/client.d.ts +268 -0
  82. package/dist/route/client.d.ts.map +1 -0
  83. package/dist/route/client.js +1830 -0
  84. package/dist/route/client.js.map +1 -0
  85. package/dist/route/endpoint.cjs +756 -0
  86. package/dist/route/endpoint.cjs.map +1 -0
  87. package/dist/route/endpoint.d.ts +13 -0
  88. package/dist/route/endpoint.d.ts.map +1 -0
  89. package/dist/route/endpoint.js +752 -0
  90. package/dist/route/endpoint.js.map +1 -0
  91. package/dist/route/executor.cjs +1077 -0
  92. package/dist/route/executor.cjs.map +1 -0
  93. package/dist/route/executor.d.ts +13 -0
  94. package/dist/route/executor.d.ts.map +1 -0
  95. package/dist/route/executor.js +1072 -0
  96. package/dist/route/executor.js.map +1 -0
  97. package/dist/route/framing.cjs +773 -0
  98. package/dist/route/framing.cjs.map +1 -0
  99. package/dist/route/framing.d.ts +9 -0
  100. package/dist/route/framing.d.ts.map +1 -0
  101. package/dist/route/framing.js +750 -0
  102. package/dist/route/framing.js.map +1 -0
  103. package/dist/route/overflow-detect.d.ts +18 -0
  104. package/dist/route/overflow-detect.d.ts.map +1 -0
  105. package/dist/route/protocol.cjs +25 -0
  106. package/dist/route/protocol.cjs.map +1 -0
  107. package/dist/route/protocol.d.ts +40 -0
  108. package/dist/route/protocol.d.ts.map +1 -0
  109. package/dist/route/protocol.js +21 -0
  110. package/dist/route/protocol.js.map +1 -0
  111. package/dist/route/transport/http.d.ts +48 -0
  112. package/dist/route/transport/http.d.ts.map +1 -0
  113. package/dist/route/transport/index.cjs +969 -0
  114. package/dist/route/transport/index.cjs.map +1 -0
  115. package/dist/route/transport/index.d.ts +13 -0
  116. package/dist/route/transport/index.d.ts.map +1 -0
  117. package/dist/route/transport/index.js +967 -0
  118. package/dist/route/transport/index.js.map +1 -0
  119. package/dist/schema/errors.d.ts +181 -0
  120. package/dist/schema/errors.d.ts.map +1 -0
  121. package/dist/schema/events.d.ts +3224 -0
  122. package/dist/schema/events.d.ts.map +1 -0
  123. package/dist/schema/ids.d.ts +31 -0
  124. package/dist/schema/ids.d.ts.map +1 -0
  125. package/dist/schema/index.cjs +847 -0
  126. package/dist/schema/index.cjs.map +1 -0
  127. package/dist/schema/index.d.ts +6 -0
  128. package/dist/schema/index.d.ts.map +1 -0
  129. package/dist/schema/index.js +777 -0
  130. package/dist/schema/index.js.map +1 -0
  131. package/dist/schema/messages.d.ts +292 -0
  132. package/dist/schema/messages.d.ts.map +1 -0
  133. package/dist/schema/options.d.ts +123 -0
  134. package/dist/schema/options.d.ts.map +1 -0
  135. package/dist/tool-runtime.cjs +907 -0
  136. package/dist/tool-runtime.cjs.map +1 -0
  137. package/dist/tool-runtime.d.ts +50 -0
  138. package/dist/tool-runtime.d.ts.map +1 -0
  139. package/dist/tool-runtime.js +901 -0
  140. package/dist/tool-runtime.js.map +1 -0
  141. package/dist/tool.cjs +802 -0
  142. package/dist/tool.cjs.map +1 -0
  143. package/dist/tool.d.ts +111 -0
  144. package/dist/tool.d.ts.map +1 -0
  145. package/dist/tool.js +796 -0
  146. package/dist/tool.js.map +1 -0
  147. package/package.json +112 -29
  148. package/src/cache-policy.ts +0 -92
  149. package/src/index.ts +0 -62
  150. package/src/llm.ts +0 -210
  151. package/src/protocols/openai-chat.ts +0 -464
  152. package/src/protocols/openai-compatible-chat.ts +0 -29
  153. package/src/protocols/shared.ts +0 -204
  154. package/src/protocols/utils/openai-options.ts +0 -56
  155. package/src/protocols/utils/tool-stream.ts +0 -135
  156. package/src/provider.ts +0 -32
  157. package/src/providers/openai-compatible.ts +0 -69
  158. package/src/providers/openai-options.ts +0 -71
  159. package/src/providers/openai.ts +0 -39
  160. package/src/route/auth-options.ts +0 -48
  161. package/src/route/auth.ts +0 -198
  162. package/src/route/client.ts +0 -459
  163. package/src/route/endpoint.ts +0 -28
  164. package/src/route/executor.ts +0 -396
  165. package/src/route/framing.ts +0 -13
  166. package/src/route/overflow-detect.ts +0 -74
  167. package/src/route/protocol.ts +0 -48
  168. package/src/route/transport/http.ts +0 -123
  169. package/src/route/transport/index.ts +0 -21
  170. package/src/schema/errors.ts +0 -225
  171. package/src/schema/events.ts +0 -335
  172. package/src/schema/ids.ts +0 -44
  173. package/src/schema/index.ts +0 -6
  174. package/src/schema/messages.ts +0 -250
  175. package/src/schema/options.ts +0 -231
  176. package/src/tool-runtime.ts +0 -301
  177. package/src/tool.ts +0 -212
@@ -0,0 +1,359 @@
1
+ import { Schema } from "effect";
2
+ import { Route } from "../route/client";
3
+ import { HttpTransport } from "../route/transport";
4
+ import { Protocol } from "../route/protocol";
5
+ import { LLMEvent, Usage, type FinishReason } from "../schema";
6
+ import { ToolStream } from "./utils/tool-stream";
7
+ export declare const DEFAULT_BASE_URL = "https://api.openai.com/v1";
8
+ export declare const PATH = "/chat/completions";
9
+ export declare const bodyFields: {
10
+ model: Schema.String;
11
+ messages: Schema.$Array<Schema.toTaggedUnion<"role", readonly [Schema.Struct<{
12
+ readonly role: Schema.Literal<"system">;
13
+ readonly content: Schema.String;
14
+ }>, Schema.Struct<{
15
+ readonly role: Schema.Literal<"user">;
16
+ readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
17
+ readonly type: Schema.Literal<"text">;
18
+ readonly text: Schema.String;
19
+ }>, Schema.Struct<{
20
+ readonly type: Schema.Literal<"image_url">;
21
+ readonly image_url: Schema.Struct<{
22
+ readonly url: Schema.String;
23
+ }>;
24
+ }>]>>]>;
25
+ }>, Schema.Struct<{
26
+ readonly role: Schema.Literal<"assistant">;
27
+ readonly content: Schema.NullOr<Schema.String>;
28
+ readonly tool_calls: Schema.optional<Schema.$Array<Schema.Struct<{
29
+ readonly id: Schema.String;
30
+ readonly type: Schema.tag<"function">;
31
+ readonly function: Schema.Struct<{
32
+ readonly name: Schema.String;
33
+ readonly arguments: Schema.String;
34
+ }>;
35
+ }>>>;
36
+ readonly reasoning_content: Schema.optional<Schema.String>;
37
+ }>, Schema.Struct<{
38
+ readonly role: Schema.Literal<"tool">;
39
+ readonly tool_call_id: Schema.String;
40
+ readonly content: Schema.String;
41
+ }>]>>;
42
+ tools: Schema.optional<Schema.$Array<Schema.Struct<{
43
+ readonly type: Schema.tag<"function">;
44
+ readonly function: Schema.Struct<{
45
+ readonly name: Schema.String;
46
+ readonly description: Schema.String;
47
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
48
+ }>;
49
+ }>>>;
50
+ tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
51
+ readonly type: Schema.tag<"function">;
52
+ readonly function: Schema.Struct<{
53
+ readonly name: Schema.String;
54
+ }>;
55
+ }>]>>;
56
+ stream: Schema.Literal<true>;
57
+ stream_options: Schema.optional<Schema.Struct<{
58
+ readonly include_usage: Schema.Boolean;
59
+ }>>;
60
+ store: Schema.optional<Schema.Boolean>;
61
+ reasoning_effort: Schema.optional<Schema.Literals<("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[]>>;
62
+ max_tokens: Schema.optional<Schema.Number>;
63
+ temperature: Schema.optional<Schema.Number>;
64
+ top_p: Schema.optional<Schema.Number>;
65
+ frequency_penalty: Schema.optional<Schema.Number>;
66
+ presence_penalty: Schema.optional<Schema.Number>;
67
+ seed: Schema.optional<Schema.Number>;
68
+ stop: Schema.optional<Schema.$Array<Schema.String>>;
69
+ };
70
+ declare const OpenAIChatBody: Schema.Struct<{
71
+ model: Schema.String;
72
+ messages: Schema.$Array<Schema.toTaggedUnion<"role", readonly [Schema.Struct<{
73
+ readonly role: Schema.Literal<"system">;
74
+ readonly content: Schema.String;
75
+ }>, Schema.Struct<{
76
+ readonly role: Schema.Literal<"user">;
77
+ readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
78
+ readonly type: Schema.Literal<"text">;
79
+ readonly text: Schema.String;
80
+ }>, Schema.Struct<{
81
+ readonly type: Schema.Literal<"image_url">;
82
+ readonly image_url: Schema.Struct<{
83
+ readonly url: Schema.String;
84
+ }>;
85
+ }>]>>]>;
86
+ }>, Schema.Struct<{
87
+ readonly role: Schema.Literal<"assistant">;
88
+ readonly content: Schema.NullOr<Schema.String>;
89
+ readonly tool_calls: Schema.optional<Schema.$Array<Schema.Struct<{
90
+ readonly id: Schema.String;
91
+ readonly type: Schema.tag<"function">;
92
+ readonly function: Schema.Struct<{
93
+ readonly name: Schema.String;
94
+ readonly arguments: Schema.String;
95
+ }>;
96
+ }>>>;
97
+ readonly reasoning_content: Schema.optional<Schema.String>;
98
+ }>, Schema.Struct<{
99
+ readonly role: Schema.Literal<"tool">;
100
+ readonly tool_call_id: Schema.String;
101
+ readonly content: Schema.String;
102
+ }>]>>;
103
+ tools: Schema.optional<Schema.$Array<Schema.Struct<{
104
+ readonly type: Schema.tag<"function">;
105
+ readonly function: Schema.Struct<{
106
+ readonly name: Schema.String;
107
+ readonly description: Schema.String;
108
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
109
+ }>;
110
+ }>>>;
111
+ tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
112
+ readonly type: Schema.tag<"function">;
113
+ readonly function: Schema.Struct<{
114
+ readonly name: Schema.String;
115
+ }>;
116
+ }>]>>;
117
+ stream: Schema.Literal<true>;
118
+ stream_options: Schema.optional<Schema.Struct<{
119
+ readonly include_usage: Schema.Boolean;
120
+ }>>;
121
+ store: Schema.optional<Schema.Boolean>;
122
+ reasoning_effort: Schema.optional<Schema.Literals<("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[]>>;
123
+ max_tokens: Schema.optional<Schema.Number>;
124
+ temperature: Schema.optional<Schema.Number>;
125
+ top_p: Schema.optional<Schema.Number>;
126
+ frequency_penalty: Schema.optional<Schema.Number>;
127
+ presence_penalty: Schema.optional<Schema.Number>;
128
+ seed: Schema.optional<Schema.Number>;
129
+ stop: Schema.optional<Schema.$Array<Schema.String>>;
130
+ }>;
131
+ export type OpenAIChatBody = Schema.Schema.Type<typeof OpenAIChatBody>;
132
+ interface ParserState {
133
+ readonly tools: ToolStream.State<number>;
134
+ readonly toolCallEvents: ReadonlyArray<LLMEvent>;
135
+ readonly usage?: Usage;
136
+ readonly finishReason?: FinishReason;
137
+ /** Running assistant text used to normalise cumulative `delta.content` providers. */
138
+ readonly textAcc: string;
139
+ }
140
+ export declare const protocol: Protocol<{
141
+ readonly messages: readonly ({
142
+ readonly content: string;
143
+ readonly role: "system";
144
+ } | {
145
+ readonly content: string | readonly ({
146
+ readonly type: "text";
147
+ readonly text: string;
148
+ } | {
149
+ readonly type: "image_url";
150
+ readonly image_url: {
151
+ readonly url: string;
152
+ };
153
+ })[];
154
+ readonly role: "user";
155
+ } | {
156
+ readonly content: string | null;
157
+ readonly role: "assistant";
158
+ readonly tool_calls?: readonly {
159
+ readonly function: {
160
+ readonly name: string;
161
+ readonly arguments: string;
162
+ };
163
+ readonly id: string;
164
+ readonly type: "function";
165
+ }[] | undefined;
166
+ readonly reasoning_content?: string | undefined;
167
+ } | {
168
+ readonly content: string;
169
+ readonly role: "tool";
170
+ readonly tool_call_id: string;
171
+ })[];
172
+ readonly model: string;
173
+ readonly stream: true;
174
+ readonly stop?: readonly string[] | undefined;
175
+ readonly temperature?: number | undefined;
176
+ readonly seed?: number | undefined;
177
+ readonly tools?: readonly {
178
+ readonly function: {
179
+ readonly name: string;
180
+ readonly description: string;
181
+ readonly parameters: {
182
+ readonly [x: string]: unknown;
183
+ };
184
+ };
185
+ readonly type: "function";
186
+ }[] | undefined;
187
+ readonly store?: boolean | undefined;
188
+ readonly tool_choice?: "required" | "none" | "auto" | {
189
+ readonly function: {
190
+ readonly name: string;
191
+ };
192
+ readonly type: "function";
193
+ } | undefined;
194
+ readonly stream_options?: {
195
+ readonly include_usage: boolean;
196
+ } | undefined;
197
+ readonly reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
198
+ readonly max_tokens?: number | undefined;
199
+ readonly top_p?: number | undefined;
200
+ readonly frequency_penalty?: number | undefined;
201
+ readonly presence_penalty?: number | undefined;
202
+ }, string, {
203
+ readonly choices: readonly {
204
+ readonly delta?: {
205
+ readonly reasoning?: string | null | undefined;
206
+ readonly content?: string | null | undefined;
207
+ readonly tool_calls?: readonly {
208
+ readonly index: number;
209
+ readonly function?: {
210
+ readonly name?: string | null | undefined;
211
+ readonly arguments?: string | null | undefined;
212
+ } | null | undefined;
213
+ readonly id?: string | null | undefined;
214
+ }[] | null | undefined;
215
+ readonly reasoning_content?: string | null | undefined;
216
+ } | null | undefined;
217
+ readonly finish_reason?: string | null | undefined;
218
+ }[];
219
+ readonly usage?: {
220
+ readonly prompt_tokens?: number | undefined;
221
+ readonly completion_tokens?: number | undefined;
222
+ readonly total_tokens?: number | undefined;
223
+ readonly prompt_tokens_details?: {
224
+ readonly cached_tokens?: number | undefined;
225
+ } | null | undefined;
226
+ readonly completion_tokens_details?: {
227
+ readonly reasoning_tokens?: number | undefined;
228
+ } | null | undefined;
229
+ } | null | undefined;
230
+ }, ParserState>;
231
+ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
232
+ readonly messages: readonly ({
233
+ readonly content: string;
234
+ readonly role: "system";
235
+ } | {
236
+ readonly content: string | readonly ({
237
+ readonly type: "text";
238
+ readonly text: string;
239
+ } | {
240
+ readonly type: "image_url";
241
+ readonly image_url: {
242
+ readonly url: string;
243
+ };
244
+ })[];
245
+ readonly role: "user";
246
+ } | {
247
+ readonly content: string | null;
248
+ readonly role: "assistant";
249
+ readonly tool_calls?: readonly {
250
+ readonly function: {
251
+ readonly name: string;
252
+ readonly arguments: string;
253
+ };
254
+ readonly id: string;
255
+ readonly type: "function";
256
+ }[] | undefined;
257
+ readonly reasoning_content?: string | undefined;
258
+ } | {
259
+ readonly content: string;
260
+ readonly role: "tool";
261
+ readonly tool_call_id: string;
262
+ })[];
263
+ readonly model: string;
264
+ readonly stream: true;
265
+ readonly stop?: readonly string[] | undefined;
266
+ readonly temperature?: number | undefined;
267
+ readonly seed?: number | undefined;
268
+ readonly tools?: readonly {
269
+ readonly function: {
270
+ readonly name: string;
271
+ readonly description: string;
272
+ readonly parameters: {
273
+ readonly [x: string]: unknown;
274
+ };
275
+ };
276
+ readonly type: "function";
277
+ }[] | undefined;
278
+ readonly store?: boolean | undefined;
279
+ readonly tool_choice?: "required" | "none" | "auto" | {
280
+ readonly function: {
281
+ readonly name: string;
282
+ };
283
+ readonly type: "function";
284
+ } | undefined;
285
+ readonly stream_options?: {
286
+ readonly include_usage: boolean;
287
+ } | undefined;
288
+ readonly reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
289
+ readonly max_tokens?: number | undefined;
290
+ readonly top_p?: number | undefined;
291
+ readonly frequency_penalty?: number | undefined;
292
+ readonly presence_penalty?: number | undefined;
293
+ }, string>;
294
+ export declare const route: Route<{
295
+ readonly messages: readonly ({
296
+ readonly content: string;
297
+ readonly role: "system";
298
+ } | {
299
+ readonly content: string | readonly ({
300
+ readonly type: "text";
301
+ readonly text: string;
302
+ } | {
303
+ readonly type: "image_url";
304
+ readonly image_url: {
305
+ readonly url: string;
306
+ };
307
+ })[];
308
+ readonly role: "user";
309
+ } | {
310
+ readonly content: string | null;
311
+ readonly role: "assistant";
312
+ readonly tool_calls?: readonly {
313
+ readonly function: {
314
+ readonly name: string;
315
+ readonly arguments: string;
316
+ };
317
+ readonly id: string;
318
+ readonly type: "function";
319
+ }[] | undefined;
320
+ readonly reasoning_content?: string | undefined;
321
+ } | {
322
+ readonly content: string;
323
+ readonly role: "tool";
324
+ readonly tool_call_id: string;
325
+ })[];
326
+ readonly model: string;
327
+ readonly stream: true;
328
+ readonly stop?: readonly string[] | undefined;
329
+ readonly temperature?: number | undefined;
330
+ readonly seed?: number | undefined;
331
+ readonly tools?: readonly {
332
+ readonly function: {
333
+ readonly name: string;
334
+ readonly description: string;
335
+ readonly parameters: {
336
+ readonly [x: string]: unknown;
337
+ };
338
+ };
339
+ readonly type: "function";
340
+ }[] | undefined;
341
+ readonly store?: boolean | undefined;
342
+ readonly tool_choice?: "required" | "none" | "auto" | {
343
+ readonly function: {
344
+ readonly name: string;
345
+ };
346
+ readonly type: "function";
347
+ } | undefined;
348
+ readonly stream_options?: {
349
+ readonly include_usage: boolean;
350
+ } | undefined;
351
+ readonly reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
352
+ readonly max_tokens?: number | undefined;
353
+ readonly top_p?: number | undefined;
354
+ readonly frequency_penalty?: number | undefined;
355
+ readonly presence_penalty?: number | undefined;
356
+ }, HttpTransport.HttpPrepared<string>>;
357
+ export declare const model: <Input extends import("..").RouteModelInput = import("..").RouteModelInput>(input: Input) => import("..").ModelRef;
358
+ export * as OpenAIChat from "./openai-chat";
359
+ //# sourceMappingURL=openai-chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai-chat.d.ts","sourceRoot":"","sources":["../../src/protocols/openai-chat.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,MAAM,EAAE,MAAM,QAAQ,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAIvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EACL,QAAQ,EACR,KAAK,EACL,KAAK,YAAY,EAMlB,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAGhD,eAAO,MAAM,gBAAgB,8BAA8B,CAAA;AAC3D,eAAO,MAAM,IAAI,sBAAsB,CAAA;AA8DvC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBtB,CAAA;AACD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA4B,CAAA;AAChD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC,CAAA;AA0DtE,UAAU,WAAW;IACnB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACxC,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAChD,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;IACtB,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAA;IACpC,qFAAqF;IACrF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAyQD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAgBnB,CAAA;AAIF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAKxB,CAAA;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAQhB,CAAA;AAKF,eAAO,MAAM,KAAK,oHAAc,CAAA;AAEhC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAA"}