@effect/ai 0.26.0 → 0.27.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.
- package/Chat/package.json +6 -0
- package/EmbeddingModel/package.json +6 -0
- package/IdGenerator/package.json +6 -0
- package/LanguageModel/package.json +6 -0
- package/Model/package.json +6 -0
- package/Prompt/package.json +6 -0
- package/Response/package.json +6 -0
- package/Telemetry/package.json +6 -0
- package/Tool/package.json +6 -0
- package/Toolkit/package.json +6 -0
- package/dist/cjs/AiError.js +575 -11
- package/dist/cjs/AiError.js.map +1 -1
- package/dist/cjs/Chat.js +302 -0
- package/dist/cjs/Chat.js.map +1 -0
- package/dist/cjs/EmbeddingModel.js +184 -0
- package/dist/cjs/EmbeddingModel.js.map +1 -0
- package/dist/cjs/IdGenerator.js +255 -0
- package/dist/cjs/IdGenerator.js.map +1 -0
- package/dist/cjs/LanguageModel.js +584 -0
- package/dist/cjs/LanguageModel.js.map +1 -0
- package/dist/cjs/McpServer.js +12 -4
- package/dist/cjs/McpServer.js.map +1 -1
- package/dist/cjs/Model.js +118 -0
- package/dist/cjs/Model.js.map +1 -0
- package/dist/cjs/Prompt.js +649 -0
- package/dist/cjs/Prompt.js.map +1 -0
- package/dist/cjs/Response.js +635 -0
- package/dist/cjs/Response.js.map +1 -0
- package/dist/cjs/Telemetry.js +176 -0
- package/dist/cjs/Telemetry.js.map +1 -0
- package/dist/cjs/Tokenizer.js +87 -8
- package/dist/cjs/Tokenizer.js.map +1 -1
- package/dist/cjs/Tool.js +556 -0
- package/dist/cjs/Tool.js.map +1 -0
- package/dist/cjs/Toolkit.js +279 -0
- package/dist/cjs/Toolkit.js.map +1 -0
- package/dist/cjs/index.js +21 -19
- package/dist/dts/AiError.d.ts +577 -9
- package/dist/dts/AiError.d.ts.map +1 -1
- package/dist/dts/Chat.d.ts +356 -0
- package/dist/dts/Chat.d.ts.map +1 -0
- package/dist/dts/EmbeddingModel.d.ts +153 -0
- package/dist/dts/EmbeddingModel.d.ts.map +1 -0
- package/dist/dts/IdGenerator.d.ts +272 -0
- package/dist/dts/IdGenerator.d.ts.map +1 -0
- package/dist/dts/LanguageModel.d.ts +458 -0
- package/dist/dts/LanguageModel.d.ts.map +1 -0
- package/dist/dts/McpSchema.d.ts +25 -25
- package/dist/dts/McpServer.d.ts +6 -4
- package/dist/dts/McpServer.d.ts.map +1 -1
- package/dist/dts/Model.d.ts +124 -0
- package/dist/dts/Model.d.ts.map +1 -0
- package/dist/dts/Prompt.d.ts +1119 -0
- package/dist/dts/Prompt.d.ts.map +1 -0
- package/dist/dts/Response.d.ts +1519 -0
- package/dist/dts/Response.d.ts.map +1 -0
- package/dist/dts/Telemetry.d.ts +520 -0
- package/dist/dts/Telemetry.d.ts.map +1 -0
- package/dist/dts/Tokenizer.d.ts +131 -13
- package/dist/dts/Tokenizer.d.ts.map +1 -1
- package/dist/dts/Tool.d.ts +876 -0
- package/dist/dts/Tool.d.ts.map +1 -0
- package/dist/dts/Toolkit.d.ts +310 -0
- package/dist/dts/Toolkit.d.ts.map +1 -0
- package/dist/dts/index.d.ts +498 -13
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/AiError.js +570 -10
- package/dist/esm/AiError.js.map +1 -1
- package/dist/esm/Chat.js +291 -0
- package/dist/esm/Chat.js.map +1 -0
- package/dist/esm/EmbeddingModel.js +173 -0
- package/dist/esm/EmbeddingModel.js.map +1 -0
- package/dist/esm/IdGenerator.js +245 -0
- package/dist/esm/IdGenerator.js.map +1 -0
- package/dist/esm/LanguageModel.js +572 -0
- package/dist/esm/LanguageModel.js.map +1 -0
- package/dist/esm/McpServer.js +12 -4
- package/dist/esm/McpServer.js.map +1 -1
- package/dist/esm/Model.js +108 -0
- package/dist/esm/Model.js.map +1 -0
- package/dist/esm/Prompt.js +633 -0
- package/dist/esm/Prompt.js.map +1 -0
- package/dist/esm/Response.js +619 -0
- package/dist/esm/Response.js.map +1 -0
- package/dist/esm/Telemetry.js +166 -0
- package/dist/esm/Telemetry.js.map +1 -0
- package/dist/esm/Tokenizer.js +87 -8
- package/dist/esm/Tokenizer.js.map +1 -1
- package/dist/esm/Tool.js +534 -0
- package/dist/esm/Tool.js.map +1 -0
- package/dist/esm/Toolkit.js +269 -0
- package/dist/esm/Toolkit.js.map +1 -0
- package/dist/esm/index.js +498 -13
- package/dist/esm/index.js.map +1 -1
- package/package.json +76 -68
- package/src/AiError.ts +739 -9
- package/src/Chat.ts +546 -0
- package/src/EmbeddingModel.ts +311 -0
- package/src/IdGenerator.ts +320 -0
- package/src/LanguageModel.ts +1074 -0
- package/src/McpServer.ts +337 -194
- package/src/Model.ts +155 -0
- package/src/Prompt.ts +1616 -0
- package/src/Response.ts +2131 -0
- package/src/Telemetry.ts +655 -0
- package/src/Tokenizer.ts +145 -24
- package/src/Tool.ts +1267 -0
- package/src/Toolkit.ts +516 -0
- package/src/index.ts +499 -13
- package/AiChat/package.json +0 -6
- package/AiEmbeddingModel/package.json +0 -6
- package/AiInput/package.json +0 -6
- package/AiLanguageModel/package.json +0 -6
- package/AiModel/package.json +0 -6
- package/AiResponse/package.json +0 -6
- package/AiTelemetry/package.json +0 -6
- package/AiTool/package.json +0 -6
- package/AiToolkit/package.json +0 -6
- package/dist/cjs/AiChat.js +0 -122
- package/dist/cjs/AiChat.js.map +0 -1
- package/dist/cjs/AiEmbeddingModel.js +0 -109
- package/dist/cjs/AiEmbeddingModel.js.map +0 -1
- package/dist/cjs/AiInput.js +0 -458
- package/dist/cjs/AiInput.js.map +0 -1
- package/dist/cjs/AiLanguageModel.js +0 -351
- package/dist/cjs/AiLanguageModel.js.map +0 -1
- package/dist/cjs/AiModel.js +0 -37
- package/dist/cjs/AiModel.js.map +0 -1
- package/dist/cjs/AiResponse.js +0 -681
- package/dist/cjs/AiResponse.js.map +0 -1
- package/dist/cjs/AiTelemetry.js +0 -58
- package/dist/cjs/AiTelemetry.js.map +0 -1
- package/dist/cjs/AiTool.js +0 -150
- package/dist/cjs/AiTool.js.map +0 -1
- package/dist/cjs/AiToolkit.js +0 -157
- package/dist/cjs/AiToolkit.js.map +0 -1
- package/dist/cjs/internal/common.js +0 -21
- package/dist/cjs/internal/common.js.map +0 -1
- package/dist/dts/AiChat.d.ts +0 -101
- package/dist/dts/AiChat.d.ts.map +0 -1
- package/dist/dts/AiEmbeddingModel.d.ts +0 -65
- package/dist/dts/AiEmbeddingModel.d.ts.map +0 -1
- package/dist/dts/AiInput.d.ts +0 -590
- package/dist/dts/AiInput.d.ts.map +0 -1
- package/dist/dts/AiLanguageModel.d.ts +0 -302
- package/dist/dts/AiLanguageModel.d.ts.map +0 -1
- package/dist/dts/AiModel.d.ts +0 -25
- package/dist/dts/AiModel.d.ts.map +0 -1
- package/dist/dts/AiResponse.d.ts +0 -863
- package/dist/dts/AiResponse.d.ts.map +0 -1
- package/dist/dts/AiTelemetry.d.ts +0 -242
- package/dist/dts/AiTelemetry.d.ts.map +0 -1
- package/dist/dts/AiTool.d.ts +0 -334
- package/dist/dts/AiTool.d.ts.map +0 -1
- package/dist/dts/AiToolkit.d.ts +0 -96
- package/dist/dts/AiToolkit.d.ts.map +0 -1
- package/dist/dts/internal/common.d.ts +0 -2
- package/dist/dts/internal/common.d.ts.map +0 -1
- package/dist/esm/AiChat.js +0 -111
- package/dist/esm/AiChat.js.map +0 -1
- package/dist/esm/AiEmbeddingModel.js +0 -98
- package/dist/esm/AiEmbeddingModel.js.map +0 -1
- package/dist/esm/AiInput.js +0 -433
- package/dist/esm/AiInput.js.map +0 -1
- package/dist/esm/AiLanguageModel.js +0 -340
- package/dist/esm/AiLanguageModel.js.map +0 -1
- package/dist/esm/AiModel.js +0 -29
- package/dist/esm/AiModel.js.map +0 -1
- package/dist/esm/AiResponse.js +0 -657
- package/dist/esm/AiResponse.js.map +0 -1
- package/dist/esm/AiTelemetry.js +0 -48
- package/dist/esm/AiTelemetry.js.map +0 -1
- package/dist/esm/AiTool.js +0 -134
- package/dist/esm/AiTool.js.map +0 -1
- package/dist/esm/AiToolkit.js +0 -147
- package/dist/esm/AiToolkit.js.map +0 -1
- package/dist/esm/internal/common.js +0 -14
- package/dist/esm/internal/common.js.map +0 -1
- package/src/AiChat.ts +0 -251
- package/src/AiEmbeddingModel.ts +0 -169
- package/src/AiInput.ts +0 -602
- package/src/AiLanguageModel.ts +0 -685
- package/src/AiModel.ts +0 -53
- package/src/AiResponse.ts +0 -986
- package/src/AiTelemetry.ts +0 -333
- package/src/AiTool.ts +0 -579
- package/src/AiToolkit.ts +0 -265
- package/src/internal/common.ts +0 -12
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.makePart = exports.isPart = exports.Usage = exports.UrlSourcePart = exports.ToolResultPart = exports.ToolParamsStartPart = exports.ToolParamsEndPart = exports.ToolParamsDeltaPart = exports.ToolCallPart = exports.TextStartPart = exports.TextPart = exports.TextEndPart = exports.TextDeltaPart = exports.StreamPart = exports.ResponseMetadataPart = exports.ReasoningStartPart = exports.ReasoningPart = exports.ReasoningEndPart = exports.ReasoningDeltaPart = exports.ProviderMetadata = exports.PartTypeId = exports.Part = exports.FinishReason = exports.FinishPart = exports.FilePart = exports.ErrorPart = exports.DocumentSourcePart = exports.AllParts = void 0;
|
|
7
|
+
var _effect = require("effect");
|
|
8
|
+
var Effect = _interopRequireWildcard(require("effect/Effect"));
|
|
9
|
+
var _Function = require("effect/Function");
|
|
10
|
+
var Predicate = _interopRequireWildcard(require("effect/Predicate"));
|
|
11
|
+
var Schema = _interopRequireWildcard(require("effect/Schema"));
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
+
/**
|
|
14
|
+
* The `Response` module provides data structures to represent responses from
|
|
15
|
+
* large language models.
|
|
16
|
+
*
|
|
17
|
+
* This module defines the complete structure of AI model responses, including
|
|
18
|
+
* various content parts for text, reasoning, tool calls, files, and metadata,
|
|
19
|
+
* supporting both streaming and non-streaming responses.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { Response } from "@effect/ai"
|
|
24
|
+
*
|
|
25
|
+
* // Create a simple text response part
|
|
26
|
+
* const textResponse = Response.makePart("text", {
|
|
27
|
+
* text: "The weather is sunny today!"
|
|
28
|
+
* })
|
|
29
|
+
*
|
|
30
|
+
* // Create a tool call response part
|
|
31
|
+
* const toolCallResponse = Response.makePart("tool-call", {
|
|
32
|
+
* id: "call_123",
|
|
33
|
+
* name: "get_weather",
|
|
34
|
+
* params: { city: "San Francisco" },
|
|
35
|
+
* providerExecuted: false
|
|
36
|
+
* })
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @since 1.0.0
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
const constEmptyObject = () => ({});
|
|
43
|
+
// =============================================================================
|
|
44
|
+
// All Parts
|
|
45
|
+
// =============================================================================
|
|
46
|
+
/**
|
|
47
|
+
* Unique identifier for Response Part instances.
|
|
48
|
+
*
|
|
49
|
+
* @since 1.0.0
|
|
50
|
+
* @category Type Ids
|
|
51
|
+
*/
|
|
52
|
+
const PartTypeId = exports.PartTypeId = "~effect/ai/Content/Part";
|
|
53
|
+
/**
|
|
54
|
+
* Type guard to check if a value is a Response Part.
|
|
55
|
+
*
|
|
56
|
+
* @since 1.0.0
|
|
57
|
+
* @category Guards
|
|
58
|
+
*/
|
|
59
|
+
const isPart = u => Predicate.hasProperty(u, PartTypeId);
|
|
60
|
+
/**
|
|
61
|
+
* Creates a Schema for all response parts based on a toolkit.
|
|
62
|
+
*
|
|
63
|
+
* Generates a schema that includes all possible response parts, with tool call
|
|
64
|
+
* and tool result parts dynamically created based on the provided toolkit.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* import { Response, Tool, Toolkit } from "@effect/ai"
|
|
69
|
+
* import { Schema } from "effect"
|
|
70
|
+
*
|
|
71
|
+
* const myToolkit = Toolkit.make(
|
|
72
|
+
* Tool.make("GetWeather", {
|
|
73
|
+
* parameters: { city: Schema.String },
|
|
74
|
+
* success: Schema.Struct({ temperature: Schema.Number })
|
|
75
|
+
* })
|
|
76
|
+
* )
|
|
77
|
+
*
|
|
78
|
+
* const allPartsSchema = Response.AllParts(myToolkit)
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @since 1.0.0
|
|
82
|
+
* @category Schemas
|
|
83
|
+
*/
|
|
84
|
+
exports.isPart = isPart;
|
|
85
|
+
const AllParts = toolkit => {
|
|
86
|
+
const toolCalls = [];
|
|
87
|
+
const toolCallResults = [];
|
|
88
|
+
for (const tool of Object.values(toolkit.tools)) {
|
|
89
|
+
toolCalls.push(ToolCallPart(tool.name, tool.parametersSchema));
|
|
90
|
+
toolCallResults.push(ToolResultPart(tool.name, tool.successSchema));
|
|
91
|
+
}
|
|
92
|
+
return Schema.Union(TextPart, TextStartPart, TextDeltaPart, TextEndPart, ReasoningPart, ReasoningStartPart, ReasoningDeltaPart, ReasoningEndPart, ToolParamsStartPart, ToolParamsDeltaPart, ToolParamsEndPart, FilePart, DocumentSourcePart, UrlSourcePart, ResponseMetadataPart, FinishPart, ErrorPart, ...toolCalls, ...toolCallResults);
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Creates a Schema for non-streaming response parts based on a toolkit.
|
|
96
|
+
*
|
|
97
|
+
* @since 1.0.0
|
|
98
|
+
* @category Schemas
|
|
99
|
+
*/
|
|
100
|
+
exports.AllParts = AllParts;
|
|
101
|
+
const Part = toolkit => {
|
|
102
|
+
const toolCalls = [];
|
|
103
|
+
const toolCallResults = [];
|
|
104
|
+
for (const tool of Object.values(toolkit.tools)) {
|
|
105
|
+
toolCalls.push(ToolCallPart(tool.name, tool.parametersSchema));
|
|
106
|
+
toolCallResults.push(ToolResultPart(tool.name, tool.successSchema));
|
|
107
|
+
}
|
|
108
|
+
return Schema.Union(TextPart, ReasoningPart, FilePart, DocumentSourcePart, UrlSourcePart, ResponseMetadataPart, FinishPart, ...toolCalls, ...toolCallResults);
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Creates a Schema for streaming response parts based on a toolkit.
|
|
112
|
+
*
|
|
113
|
+
* @since 1.0.0
|
|
114
|
+
* @category Schemas
|
|
115
|
+
*/
|
|
116
|
+
exports.Part = Part;
|
|
117
|
+
const StreamPart = toolkit => {
|
|
118
|
+
const toolCalls = [];
|
|
119
|
+
const toolCallResults = [];
|
|
120
|
+
for (const tool of Object.values(toolkit.tools)) {
|
|
121
|
+
toolCalls.push(ToolCallPart(tool.name, tool.parametersSchema));
|
|
122
|
+
toolCallResults.push(ToolResultPart(tool.name, tool.successSchema));
|
|
123
|
+
}
|
|
124
|
+
return Schema.Union(TextStartPart, TextDeltaPart, TextEndPart, ReasoningStartPart, ReasoningDeltaPart, ReasoningEndPart, ToolParamsStartPart, ToolParamsDeltaPart, ToolParamsEndPart, FilePart, DocumentSourcePart, UrlSourcePart, ResponseMetadataPart, FinishPart, ErrorPart, ...toolCalls, ...toolCallResults);
|
|
125
|
+
};
|
|
126
|
+
// =============================================================================
|
|
127
|
+
// Base Part
|
|
128
|
+
// =============================================================================
|
|
129
|
+
/**
|
|
130
|
+
* Schema for provider-specific metadata which can be attached to response parts.
|
|
131
|
+
*
|
|
132
|
+
* Provider-specific metadata is namespaced by provider and has the structure:
|
|
133
|
+
*
|
|
134
|
+
* ```
|
|
135
|
+
* {
|
|
136
|
+
* "<provider-specific-key>": {
|
|
137
|
+
* // Provider-specific metadata
|
|
138
|
+
* }
|
|
139
|
+
* }
|
|
140
|
+
* ```
|
|
141
|
+
*
|
|
142
|
+
* @since 1.0.0
|
|
143
|
+
* @category Schemas
|
|
144
|
+
*/
|
|
145
|
+
exports.StreamPart = StreamPart;
|
|
146
|
+
const ProviderMetadata = exports.ProviderMetadata = /*#__PURE__*/Schema.Record({
|
|
147
|
+
key: Schema.String,
|
|
148
|
+
value: /*#__PURE__*/Schema.UndefinedOr(/*#__PURE__*/Schema.Record({
|
|
149
|
+
key: Schema.String,
|
|
150
|
+
value: Schema.Unknown
|
|
151
|
+
}))
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Creates a new response content part of the specified type.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```ts
|
|
158
|
+
* import { Response } from "@effect/ai"
|
|
159
|
+
*
|
|
160
|
+
* const textPart = Response.makePart("text", {
|
|
161
|
+
* text: "Hello, world!"
|
|
162
|
+
* })
|
|
163
|
+
*
|
|
164
|
+
* const toolCallPart = Response.makePart("tool-call", {
|
|
165
|
+
* id: "call_123",
|
|
166
|
+
* name: "get_weather",
|
|
167
|
+
* params: { city: "San Francisco" },
|
|
168
|
+
* providerExecuted: false
|
|
169
|
+
* })
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* @since 1.0.0
|
|
173
|
+
* @category Constructors
|
|
174
|
+
*/
|
|
175
|
+
const makePart = (
|
|
176
|
+
/**
|
|
177
|
+
* The type of part to create.
|
|
178
|
+
*/
|
|
179
|
+
type,
|
|
180
|
+
/**
|
|
181
|
+
* Parameters specific to the part type being created.
|
|
182
|
+
*/
|
|
183
|
+
params) => ({
|
|
184
|
+
...params,
|
|
185
|
+
[PartTypeId]: PartTypeId,
|
|
186
|
+
type,
|
|
187
|
+
metadata: params.metadata
|
|
188
|
+
});
|
|
189
|
+
/**
|
|
190
|
+
* Schema for validation and encoding of text parts.
|
|
191
|
+
*
|
|
192
|
+
* @since 1.0.0
|
|
193
|
+
* @category Schemas
|
|
194
|
+
*/
|
|
195
|
+
exports.makePart = makePart;
|
|
196
|
+
const TextPart = exports.TextPart = /*#__PURE__*/Schema.Struct({
|
|
197
|
+
type: Schema.Literal("text"),
|
|
198
|
+
text: Schema.String,
|
|
199
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
200
|
+
default: constEmptyObject
|
|
201
|
+
})
|
|
202
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
203
|
+
identifier: "TextPart"
|
|
204
|
+
}));
|
|
205
|
+
/**
|
|
206
|
+
* Schema for validation and encoding of text start parts.
|
|
207
|
+
*
|
|
208
|
+
* @since 1.0.0
|
|
209
|
+
* @category Schemas
|
|
210
|
+
*/
|
|
211
|
+
const TextStartPart = exports.TextStartPart = /*#__PURE__*/Schema.Struct({
|
|
212
|
+
type: Schema.Literal("text-start"),
|
|
213
|
+
id: Schema.String,
|
|
214
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
215
|
+
default: constEmptyObject
|
|
216
|
+
})
|
|
217
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
218
|
+
identifier: "TextStartPart"
|
|
219
|
+
}));
|
|
220
|
+
/**
|
|
221
|
+
* Schema for validation and encoding of text delta parts.
|
|
222
|
+
*
|
|
223
|
+
* @since 1.0.0
|
|
224
|
+
* @category Schemas
|
|
225
|
+
*/
|
|
226
|
+
const TextDeltaPart = exports.TextDeltaPart = /*#__PURE__*/Schema.Struct({
|
|
227
|
+
type: Schema.Literal("text-delta"),
|
|
228
|
+
id: Schema.String,
|
|
229
|
+
delta: Schema.String,
|
|
230
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
231
|
+
default: constEmptyObject
|
|
232
|
+
})
|
|
233
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
234
|
+
identifier: "TextDeltaPart"
|
|
235
|
+
}));
|
|
236
|
+
/**
|
|
237
|
+
* Schema for validation and encoding of text end parts.
|
|
238
|
+
*
|
|
239
|
+
* @since 1.0.0
|
|
240
|
+
* @category Schemas
|
|
241
|
+
*/
|
|
242
|
+
const TextEndPart = exports.TextEndPart = /*#__PURE__*/Schema.Struct({
|
|
243
|
+
type: Schema.Literal("text-end"),
|
|
244
|
+
id: Schema.String,
|
|
245
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
246
|
+
default: constEmptyObject
|
|
247
|
+
})
|
|
248
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
249
|
+
identifier: "TextEndPart"
|
|
250
|
+
}));
|
|
251
|
+
/**
|
|
252
|
+
* Schema for validation and encoding of reasoning parts.
|
|
253
|
+
*
|
|
254
|
+
* @since 1.0.0
|
|
255
|
+
* @category Schemas
|
|
256
|
+
*/
|
|
257
|
+
const ReasoningPart = exports.ReasoningPart = /*#__PURE__*/Schema.Struct({
|
|
258
|
+
type: Schema.Literal("reasoning"),
|
|
259
|
+
text: Schema.String,
|
|
260
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
261
|
+
default: constEmptyObject
|
|
262
|
+
})
|
|
263
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
264
|
+
identifier: "ReasoningPart"
|
|
265
|
+
}));
|
|
266
|
+
/**
|
|
267
|
+
* Schema for validation and encoding of reasoning start parts.
|
|
268
|
+
*
|
|
269
|
+
* @since 1.0.0
|
|
270
|
+
* @category Schemas
|
|
271
|
+
*/
|
|
272
|
+
const ReasoningStartPart = exports.ReasoningStartPart = /*#__PURE__*/Schema.Struct({
|
|
273
|
+
type: Schema.Literal("reasoning-start"),
|
|
274
|
+
id: Schema.String,
|
|
275
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
276
|
+
default: constEmptyObject
|
|
277
|
+
})
|
|
278
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
279
|
+
identifier: "ReasoningStartPart"
|
|
280
|
+
}));
|
|
281
|
+
/**
|
|
282
|
+
* Schema for validation and encoding of reasoning delta parts.
|
|
283
|
+
*
|
|
284
|
+
* @since 1.0.0
|
|
285
|
+
* @category Schemas
|
|
286
|
+
*/
|
|
287
|
+
const ReasoningDeltaPart = exports.ReasoningDeltaPart = /*#__PURE__*/Schema.Struct({
|
|
288
|
+
type: Schema.Literal("reasoning-delta"),
|
|
289
|
+
id: Schema.String,
|
|
290
|
+
delta: Schema.String,
|
|
291
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
292
|
+
default: constEmptyObject
|
|
293
|
+
})
|
|
294
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
295
|
+
identifier: "ReasoningDeltaPart"
|
|
296
|
+
}));
|
|
297
|
+
/**
|
|
298
|
+
* Schema for validation and encoding of reasoning end parts.
|
|
299
|
+
*
|
|
300
|
+
* @since 1.0.0
|
|
301
|
+
* @category Schemas
|
|
302
|
+
*/
|
|
303
|
+
const ReasoningEndPart = exports.ReasoningEndPart = /*#__PURE__*/Schema.Struct({
|
|
304
|
+
type: Schema.Literal("reasoning-end"),
|
|
305
|
+
id: Schema.String,
|
|
306
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
307
|
+
default: constEmptyObject
|
|
308
|
+
})
|
|
309
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
310
|
+
identifier: "ReasoningEndPart"
|
|
311
|
+
}));
|
|
312
|
+
/**
|
|
313
|
+
* Schema for validation and encoding of tool params start parts.
|
|
314
|
+
*
|
|
315
|
+
* @since 1.0.0
|
|
316
|
+
* @category Schemas
|
|
317
|
+
*/
|
|
318
|
+
const ToolParamsStartPart = exports.ToolParamsStartPart = /*#__PURE__*/Schema.Struct({
|
|
319
|
+
type: Schema.Literal("tool-params-start"),
|
|
320
|
+
id: Schema.String,
|
|
321
|
+
name: Schema.String,
|
|
322
|
+
providerName: Schema.optional(Schema.String),
|
|
323
|
+
providerExecuted: Schema.optionalWith(Schema.Boolean, {
|
|
324
|
+
default: _Function.constFalse
|
|
325
|
+
}),
|
|
326
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
327
|
+
default: constEmptyObject
|
|
328
|
+
})
|
|
329
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
330
|
+
identifier: "ToolParamsStartPart"
|
|
331
|
+
}));
|
|
332
|
+
/**
|
|
333
|
+
* Schema for validation and encoding of tool params delta parts.
|
|
334
|
+
*
|
|
335
|
+
* @since 1.0.0
|
|
336
|
+
* @category Schemas
|
|
337
|
+
*/
|
|
338
|
+
const ToolParamsDeltaPart = exports.ToolParamsDeltaPart = /*#__PURE__*/Schema.Struct({
|
|
339
|
+
type: Schema.Literal("tool-params-delta"),
|
|
340
|
+
id: Schema.String,
|
|
341
|
+
delta: Schema.String,
|
|
342
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
343
|
+
default: constEmptyObject
|
|
344
|
+
})
|
|
345
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
346
|
+
identifier: "ToolParamsDeltaPart"
|
|
347
|
+
}));
|
|
348
|
+
/**
|
|
349
|
+
* Schema for validation and encoding of tool params end parts.
|
|
350
|
+
*
|
|
351
|
+
* @since 1.0.0
|
|
352
|
+
* @category Schemas
|
|
353
|
+
*/
|
|
354
|
+
const ToolParamsEndPart = exports.ToolParamsEndPart = /*#__PURE__*/Schema.Struct({
|
|
355
|
+
type: Schema.Literal("tool-params-end"),
|
|
356
|
+
id: Schema.String,
|
|
357
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
358
|
+
default: constEmptyObject
|
|
359
|
+
})
|
|
360
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
361
|
+
identifier: "ToolParamsEndPart"
|
|
362
|
+
}));
|
|
363
|
+
/**
|
|
364
|
+
* Creates a Schema for tool call parts with specific tool name and parameters.
|
|
365
|
+
*
|
|
366
|
+
* @since 1.0.0
|
|
367
|
+
* @category Schemas
|
|
368
|
+
*/
|
|
369
|
+
const ToolCallPart = (
|
|
370
|
+
/**
|
|
371
|
+
* Name of the tool.
|
|
372
|
+
*/
|
|
373
|
+
name,
|
|
374
|
+
/**
|
|
375
|
+
* Schema for the tool parameters.
|
|
376
|
+
*/
|
|
377
|
+
params) => Schema.Struct({
|
|
378
|
+
type: Schema.Literal("tool-call"),
|
|
379
|
+
id: Schema.String,
|
|
380
|
+
name: Schema.Literal(name),
|
|
381
|
+
params,
|
|
382
|
+
providerName: Schema.optional(Schema.String),
|
|
383
|
+
providerExecuted: Schema.optionalWith(Schema.Boolean, {
|
|
384
|
+
default: _Function.constFalse
|
|
385
|
+
}),
|
|
386
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
387
|
+
default: constEmptyObject
|
|
388
|
+
})
|
|
389
|
+
}).pipe(Schema.attachPropertySignature(PartTypeId, PartTypeId), Schema.annotations({
|
|
390
|
+
identifier: "ToolCallPart"
|
|
391
|
+
}));
|
|
392
|
+
/**
|
|
393
|
+
* Creates a Schema for tool result parts with specific tool name and result type.
|
|
394
|
+
*
|
|
395
|
+
* @since 1.0.0
|
|
396
|
+
* @category Schemas
|
|
397
|
+
*/
|
|
398
|
+
exports.ToolCallPart = ToolCallPart;
|
|
399
|
+
const ToolResultPart = (
|
|
400
|
+
/**
|
|
401
|
+
* Name of the tool.
|
|
402
|
+
*/
|
|
403
|
+
name,
|
|
404
|
+
/**
|
|
405
|
+
* Schema for the tool result.
|
|
406
|
+
*/
|
|
407
|
+
result) => {
|
|
408
|
+
const Base = Schema.Struct({
|
|
409
|
+
id: Schema.String,
|
|
410
|
+
type: Schema.Literal("tool-result"),
|
|
411
|
+
providerName: Schema.optional(Schema.String)
|
|
412
|
+
});
|
|
413
|
+
const Encoded = Schema.Struct({
|
|
414
|
+
...Base.fields,
|
|
415
|
+
name: Schema.String,
|
|
416
|
+
result: Schema.encodedSchema(result),
|
|
417
|
+
providerExecuted: Schema.optional(Schema.Boolean),
|
|
418
|
+
metadata: Schema.optional(ProviderMetadata)
|
|
419
|
+
});
|
|
420
|
+
const Decoded = Schema.Struct({
|
|
421
|
+
...Base.fields,
|
|
422
|
+
[PartTypeId]: Schema.Literal(PartTypeId),
|
|
423
|
+
name: Schema.Literal(name),
|
|
424
|
+
result: Schema.typeSchema(result),
|
|
425
|
+
encodedResult: Schema.encodedSchema(result),
|
|
426
|
+
providerExecuted: Schema.Boolean,
|
|
427
|
+
metadata: ProviderMetadata
|
|
428
|
+
});
|
|
429
|
+
const decodeParams = _effect.ParseResult.decode(result);
|
|
430
|
+
const encodeParams = _effect.ParseResult.encode(result);
|
|
431
|
+
return Schema.transformOrFail(Encoded, Decoded, {
|
|
432
|
+
strict: true,
|
|
433
|
+
decode: Effect.fnUntraced(function* (encoded) {
|
|
434
|
+
const decoded = yield* decodeParams(encoded.result);
|
|
435
|
+
const providerExecuted = encoded.providerExecuted ?? false;
|
|
436
|
+
return {
|
|
437
|
+
...encoded,
|
|
438
|
+
[PartTypeId]: PartTypeId,
|
|
439
|
+
name: encoded.name,
|
|
440
|
+
result: decoded,
|
|
441
|
+
encodedResult: encoded.result,
|
|
442
|
+
metadata: encoded.metadata ?? {},
|
|
443
|
+
providerExecuted
|
|
444
|
+
};
|
|
445
|
+
}),
|
|
446
|
+
encode: Effect.fnUntraced(function* (decoded) {
|
|
447
|
+
const encoded = yield* encodeParams(decoded.result);
|
|
448
|
+
return {
|
|
449
|
+
id: decoded.id,
|
|
450
|
+
type: decoded.type,
|
|
451
|
+
name: decoded.name,
|
|
452
|
+
result: encoded,
|
|
453
|
+
...(decoded.metadata ? {
|
|
454
|
+
metadata: decoded.metadata
|
|
455
|
+
} : {}),
|
|
456
|
+
...(decoded.providerName ? {
|
|
457
|
+
providerName: decoded.providerName
|
|
458
|
+
} : {}),
|
|
459
|
+
...(decoded.providerExecuted ? {
|
|
460
|
+
providerExecuted: true
|
|
461
|
+
} : {})
|
|
462
|
+
};
|
|
463
|
+
})
|
|
464
|
+
}).annotations({
|
|
465
|
+
identifier: `ToolResultPart(${name})`
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* Schema for validation and encoding of file parts.
|
|
470
|
+
*
|
|
471
|
+
* @since 1.0.0
|
|
472
|
+
* @category Schemas
|
|
473
|
+
*/
|
|
474
|
+
exports.ToolResultPart = ToolResultPart;
|
|
475
|
+
const FilePart = exports.FilePart = /*#__PURE__*/Schema.Struct({
|
|
476
|
+
type: Schema.Literal("file"),
|
|
477
|
+
mediaType: Schema.String,
|
|
478
|
+
data: Schema.Uint8ArrayFromBase64,
|
|
479
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
480
|
+
default: constEmptyObject
|
|
481
|
+
})
|
|
482
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
483
|
+
identifier: "FilePart"
|
|
484
|
+
}));
|
|
485
|
+
/**
|
|
486
|
+
* Schema for validation and encoding of document source parts.
|
|
487
|
+
*
|
|
488
|
+
* @since 1.0.0
|
|
489
|
+
* @category Schemas
|
|
490
|
+
*/
|
|
491
|
+
const DocumentSourcePart = exports.DocumentSourcePart = /*#__PURE__*/Schema.Struct({
|
|
492
|
+
type: Schema.Literal("source"),
|
|
493
|
+
sourceType: Schema.Literal("document"),
|
|
494
|
+
id: Schema.String,
|
|
495
|
+
mediaType: Schema.String,
|
|
496
|
+
title: Schema.String,
|
|
497
|
+
fileName: Schema.optional(Schema.String),
|
|
498
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
499
|
+
default: constEmptyObject
|
|
500
|
+
})
|
|
501
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
502
|
+
identifier: "DocumentSourcePart"
|
|
503
|
+
}));
|
|
504
|
+
/**
|
|
505
|
+
* Schema for validation and encoding of url source parts.
|
|
506
|
+
*
|
|
507
|
+
* @since 1.0.0
|
|
508
|
+
* @category Schemas
|
|
509
|
+
*/
|
|
510
|
+
const UrlSourcePart = exports.UrlSourcePart = /*#__PURE__*/Schema.Struct({
|
|
511
|
+
type: Schema.Literal("source"),
|
|
512
|
+
sourceType: Schema.Literal("url"),
|
|
513
|
+
id: Schema.String,
|
|
514
|
+
url: Schema.URL,
|
|
515
|
+
title: Schema.String,
|
|
516
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
517
|
+
default: constEmptyObject
|
|
518
|
+
})
|
|
519
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
520
|
+
identifier: "UrlSourcePart"
|
|
521
|
+
}));
|
|
522
|
+
/**
|
|
523
|
+
* Schema for validation and encoding of response metadata parts.
|
|
524
|
+
*
|
|
525
|
+
* @since 1.0.0
|
|
526
|
+
* @category Schemas
|
|
527
|
+
*/
|
|
528
|
+
const ResponseMetadataPart = exports.ResponseMetadataPart = /*#__PURE__*/Schema.Struct({
|
|
529
|
+
type: Schema.Literal("response-metadata"),
|
|
530
|
+
id: Schema.optionalWith(Schema.String, {
|
|
531
|
+
as: "Option"
|
|
532
|
+
}),
|
|
533
|
+
modelId: Schema.optionalWith(Schema.String, {
|
|
534
|
+
as: "Option"
|
|
535
|
+
}),
|
|
536
|
+
timestamp: Schema.optionalWith(Schema.DateTimeUtc, {
|
|
537
|
+
as: "Option"
|
|
538
|
+
}),
|
|
539
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
540
|
+
default: constEmptyObject
|
|
541
|
+
})
|
|
542
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
543
|
+
identifier: "ResponseMetadataPart"
|
|
544
|
+
}));
|
|
545
|
+
// =============================================================================
|
|
546
|
+
// Finish Part
|
|
547
|
+
// =============================================================================
|
|
548
|
+
/**
|
|
549
|
+
* Represents the reason why a model finished generation of a response.
|
|
550
|
+
*
|
|
551
|
+
* Possible finish reasons:
|
|
552
|
+
* - `"stop"`: The model generated a stop sequence.
|
|
553
|
+
* - `"length"`: The model exceeded its token budget.
|
|
554
|
+
* - `"content-filter"`: The model generated content which violated a content filter.
|
|
555
|
+
* - `"tool-calls"`: The model triggered a tool call.
|
|
556
|
+
* - `"error"`: The model encountered an error.
|
|
557
|
+
* - `"pause"`: The model requested to pause execution.
|
|
558
|
+
* - `"other"`: The model stopped for a reason not supported by this protocol.
|
|
559
|
+
* - `"unknown"`: The model did not specify a finish reason.
|
|
560
|
+
*
|
|
561
|
+
* @since 1.0.0
|
|
562
|
+
* @category Models
|
|
563
|
+
*/
|
|
564
|
+
const FinishReason = exports.FinishReason = /*#__PURE__*/Schema.Literal("stop", "length", "content-filter", "tool-calls", "error", "pause", "other", "unknown");
|
|
565
|
+
/**
|
|
566
|
+
* Represents usage information for a request to a large language model provider.
|
|
567
|
+
*
|
|
568
|
+
* If the model provider returns additional usage information than what is
|
|
569
|
+
* specified here, you can generally find that information under the provider
|
|
570
|
+
* metadata of the finish part of the response.
|
|
571
|
+
*
|
|
572
|
+
* @since 1.0.0
|
|
573
|
+
* @category Models
|
|
574
|
+
*/
|
|
575
|
+
class Usage extends /*#__PURE__*/Schema.Class("@effect/ai/AiResponse/Usage")({
|
|
576
|
+
/**
|
|
577
|
+
* The number of tokens sent in the request to the model.
|
|
578
|
+
*/
|
|
579
|
+
inputTokens: /*#__PURE__*/Schema.UndefinedOr(Schema.Number),
|
|
580
|
+
/**
|
|
581
|
+
* The number of tokens that the model generated for the request.
|
|
582
|
+
*/
|
|
583
|
+
outputTokens: /*#__PURE__*/Schema.UndefinedOr(Schema.Number),
|
|
584
|
+
/**
|
|
585
|
+
* The total of number of input tokens and output tokens as reported by the
|
|
586
|
+
* large language model provider.
|
|
587
|
+
*
|
|
588
|
+
* **NOTE**: This value may differ from the sum of `inputTokens` and
|
|
589
|
+
* `outputTokens` due to inclusion of reasoning tokens or other
|
|
590
|
+
* provider-specific overhead.
|
|
591
|
+
*/
|
|
592
|
+
totalTokens: /*#__PURE__*/Schema.UndefinedOr(Schema.Number),
|
|
593
|
+
/**
|
|
594
|
+
* The number of reasoning tokens that the model used to generate the output
|
|
595
|
+
* for the request.
|
|
596
|
+
*/
|
|
597
|
+
reasoningTokens: /*#__PURE__*/Schema.optional(Schema.Number),
|
|
598
|
+
/**
|
|
599
|
+
* The number of input tokens read from the prompt cache for the request.
|
|
600
|
+
*/
|
|
601
|
+
cachedInputTokens: /*#__PURE__*/Schema.optional(Schema.Number)
|
|
602
|
+
}) {}
|
|
603
|
+
/**
|
|
604
|
+
* Schema for validation and encoding of finish parts.
|
|
605
|
+
*
|
|
606
|
+
* @since 1.0.0
|
|
607
|
+
* @category Schemas
|
|
608
|
+
*/
|
|
609
|
+
exports.Usage = Usage;
|
|
610
|
+
const FinishPart = exports.FinishPart = /*#__PURE__*/Schema.Struct({
|
|
611
|
+
type: Schema.Literal("finish"),
|
|
612
|
+
reason: FinishReason,
|
|
613
|
+
usage: Usage,
|
|
614
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
615
|
+
default: constEmptyObject
|
|
616
|
+
})
|
|
617
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
618
|
+
identifier: "FinishPart"
|
|
619
|
+
}));
|
|
620
|
+
/**
|
|
621
|
+
* Schema for validation and encoding of error parts.
|
|
622
|
+
*
|
|
623
|
+
* @since 1.0.0
|
|
624
|
+
* @category Schemas
|
|
625
|
+
*/
|
|
626
|
+
const ErrorPart = exports.ErrorPart = /*#__PURE__*/Schema.Struct({
|
|
627
|
+
type: Schema.Literal("error"),
|
|
628
|
+
error: Schema.Unknown,
|
|
629
|
+
metadata: Schema.optionalWith(ProviderMetadata, {
|
|
630
|
+
default: constEmptyObject
|
|
631
|
+
})
|
|
632
|
+
}).pipe(/*#__PURE__*/Schema.attachPropertySignature(PartTypeId, PartTypeId), /*#__PURE__*/Schema.annotations({
|
|
633
|
+
identifier: "ErrorPart"
|
|
634
|
+
}));
|
|
635
|
+
//# sourceMappingURL=Response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.js","names":["_effect","require","Effect","_interopRequireWildcard","_Function","Predicate","Schema","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","constEmptyObject","PartTypeId","exports","isPart","u","hasProperty","AllParts","toolkit","toolCalls","toolCallResults","tool","values","tools","push","ToolCallPart","name","parametersSchema","ToolResultPart","successSchema","Union","TextPart","TextStartPart","TextDeltaPart","TextEndPart","ReasoningPart","ReasoningStartPart","ReasoningDeltaPart","ReasoningEndPart","ToolParamsStartPart","ToolParamsDeltaPart","ToolParamsEndPart","FilePart","DocumentSourcePart","UrlSourcePart","ResponseMetadataPart","FinishPart","ErrorPart","Part","StreamPart","ProviderMetadata","Record","key","String","value","UndefinedOr","Unknown","makePart","type","params","metadata","Struct","Literal","text","optionalWith","pipe","attachPropertySignature","annotations","identifier","id","delta","providerName","optional","providerExecuted","Boolean","constFalse","result","Base","Encoded","fields","encodedSchema","Decoded","typeSchema","encodedResult","decodeParams","ParseResult","decode","encodeParams","encode","transformOrFail","strict","fnUntraced","encoded","decoded","mediaType","data","Uint8ArrayFromBase64","sourceType","title","fileName","url","URL","as","modelId","timestamp","DateTimeUtc","FinishReason","Usage","Class","inputTokens","Number","outputTokens","totalTokens","reasoningTokens","cachedInputTokens","reason","usage","error"],"sources":["../../src/Response.ts"],"sourcesContent":[null],"mappings":";;;;;;AA4BA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAF,uBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,uBAAA,CAAAF,OAAA;AAAuC,SAAAE,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CA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