@codebit-programando-solucoes/codebit-llm-coderag 1.1.39 → 1.1.42
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/dist/index.js +1 -1
- package/dist/license/index.js +1 -1
- package/dist/llm/bedrock/embedding/base-embedding.d.ts +26 -53
- package/dist/llm/bedrock/embedding/base-embedding.js +1 -1
- package/dist/llm/bedrock/embedding/bedrock-embedding-model.d.ts +5 -5
- package/dist/llm/bedrock/embedding/bedrock-embedding-model.js +1 -1
- package/dist/llm/bedrock/embedding/bedrock-embedding.d.ts +7 -12
- package/dist/llm/bedrock/embedding/bedrock-embedding.js +1 -1
- package/dist/llm/bedrock/embedding/index.js +1 -1
- package/dist/llm/bedrock/embedding/titan-embedding.d.ts +12 -14
- package/dist/llm/bedrock/embedding/titan-embedding.js +1 -1
- package/dist/llm/bedrock/embedding/titan-embedding.spec.js +1 -1
- package/dist/llm/bedrock/index.js +1 -1
- package/dist/llm/bedrock/llm/bedrock-llm-model.d.ts +33 -15
- package/dist/llm/bedrock/llm/bedrock-llm-model.js +1 -1
- package/dist/llm/bedrock/llm/bedrock-llm.d.ts +73 -178
- package/dist/llm/bedrock/llm/bedrock-llm.js +1 -1
- package/dist/llm/bedrock/llm/claude-llm.d.ts +5 -11
- package/dist/llm/bedrock/llm/claude-llm.js +1 -1
- package/dist/llm/bedrock/llm/claude-llm.spec.js +1 -1
- package/dist/llm/bedrock/llm/deep-seek-llm.d.ts +4 -10
- package/dist/llm/bedrock/llm/deep-seek-llm.js +1 -1
- package/dist/llm/bedrock/llm/deepseek-llm.spec.js +1 -1
- package/dist/llm/bedrock/llm/index.js +1 -1
- package/dist/llm/bedrock/llm/nova-llm.d.ts +4 -11
- package/dist/llm/bedrock/llm/nova-llm.js +1 -1
- package/dist/llm/bedrock/llm/nova-llm.spec.js +1 -1
- package/dist/llm/index.js +1 -1
- package/dist/llm/llm.interface.d.ts +26 -83
- package/dist/llm/llm.interface.js +1 -1
- package/dist/llm/tool.type.d.ts +8 -23
- package/dist/llm/tool.type.js +1 -1
- package/dist/ocr/aws-textract-to-markdown.js +1 -1
- package/dist/ocr/aws-textract.d.ts +32 -38
- package/dist/ocr/aws-textract.js +1 -1
- package/dist/ocr/aws-textract.spec.js +1 -1
- package/dist/ocr/index.js +1 -1
- package/dist/ocr/ocr.interface.d.ts +27 -34
- package/dist/ocr/ocr.interface.js +1 -1
- package/dist/util/common.d.ts +5 -4
- package/dist/util/common.js +1 -1
- package/dist/util/common.spec.js +1 -1
- package/dist/util/conversion/audio-conversion.d.ts +5 -8
- package/dist/util/conversion/audio-conversion.js +1 -1
- package/dist/util/conversion/audio-conversion.spec.js +1 -1
- package/dist/util/conversion/csv-conversion.d.ts +12 -25
- package/dist/util/conversion/csv-conversion.js +1 -1
- package/dist/util/conversion/csv-conversion.spec.js +1 -1
- package/dist/util/conversion/image-conversion.d.ts +33 -66
- package/dist/util/conversion/image-conversion.js +1 -1
- package/dist/util/conversion/image-conversion.spec.js +1 -1
- package/dist/util/conversion/index.d.ts +1 -1
- package/dist/util/conversion/index.js +1 -1
- package/dist/util/conversion/office-conversion.d.ts +5 -14
- package/dist/util/conversion/office-conversion.js +1 -1
- package/dist/util/conversion/office-conversion.spec.js +1 -1
- package/dist/util/conversion/pdf-conversion.d.ts +16 -40
- package/dist/util/conversion/pdf-conversion.js +1 -1
- package/dist/util/conversion/pdf-conversion.spec.js +1 -1
- package/dist/util/conversion/xlsx-conversion.d.ts +14 -31
- package/dist/util/conversion/xlsx-conversion.js +1 -1
- package/dist/util/conversion/xlsx-conversion.spec.js +1 -1
- package/dist/util/index.js +1 -1
- package/dist/util/parallel.d.ts +21 -29
- package/dist/util/parallel.js +1 -1
- package/dist/util/parallel.spec.js +1 -1
- package/dist/util/semaphore/database-semaphore.interface.d.ts +3 -8
- package/dist/util/semaphore/database-semaphore.interface.js +1 -1
- package/dist/util/semaphore/index.js +1 -1
- package/dist/util/semaphore/pg-semaphore.d.ts +4 -11
- package/dist/util/semaphore/pg-semaphore.js +1 -1
- package/package.json +5 -5
|
@@ -15,63 +15,44 @@ import {
|
|
|
15
15
|
import { ToolFunction } from '../../tool.type';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Configuration parameters for Bedrock's thinking mode feature.
|
|
19
|
-
*
|
|
20
|
-
* the final response, which can improve the quality of complex problem-solving tasks.
|
|
18
|
+
* Configuration parameters for Bedrock's thinking mode feature. Thinking mode allows the model to perform internal reasoning before generating the final response, which can
|
|
19
|
+
* improve the quality of complex problem-solving tasks.
|
|
21
20
|
*/
|
|
22
21
|
export type BedrockThinkingParams = {
|
|
23
|
-
/**
|
|
24
|
-
* Whether thinking mode is enabled for the request.
|
|
25
|
-
* When enabled, the model will perform internal reasoning steps
|
|
26
|
-
* before generating the final response.
|
|
27
|
-
*/
|
|
22
|
+
/** Whether thinking mode is enabled for the request. When enabled, the model will perform internal reasoning steps before generating the final response. */
|
|
28
23
|
enabled: boolean;
|
|
29
24
|
|
|
30
25
|
/**
|
|
31
|
-
* Optional token budget allocated specifically for thinking/reasoning.
|
|
32
|
-
*
|
|
33
|
-
* helping to control costs while still allowing for thoughtful responses.
|
|
34
|
-
* If not specified, the model will use its default thinking token allocation.
|
|
26
|
+
* Optional token budget allocated specifically for thinking/reasoning. This limits the number of tokens the model can use for internal reasoning, helping to control costs
|
|
27
|
+
* while still allowing for thoughtful responses. If not specified, the model will use its default thinking token allocation.
|
|
35
28
|
*/
|
|
36
29
|
budgetTokens?: number;
|
|
37
30
|
};
|
|
38
31
|
|
|
39
32
|
/**
|
|
40
|
-
* Additional arguments specific to Bedrock LLM implementations.
|
|
41
|
-
*
|
|
42
|
-
* that can enhance model performance for certain use cases.
|
|
33
|
+
* Additional arguments specific to Bedrock LLM implementations. These parameters extend the base LLM functionality with Bedrock-specific features that can enhance model
|
|
34
|
+
* performance for certain use cases.
|
|
43
35
|
*/
|
|
44
36
|
export type BedrockAdditionalArgs = {
|
|
45
37
|
/**
|
|
46
|
-
* Configuration for Bedrock's thinking mode feature.
|
|
47
|
-
*
|
|
48
|
-
* and planning before generating the final response, which can
|
|
49
|
-
* significantly improve performance on complex tasks requiring
|
|
50
|
-
* multi-step reasoning, problem-solving, or detailed analysis.
|
|
38
|
+
* Configuration for Bedrock's thinking mode feature. Thinking mode enables the model to perform internal reasoning and planning before generating the final response, which can
|
|
39
|
+
* significantly improve performance on complex tasks requiring multi-step reasoning, problem-solving, or detailed analysis.
|
|
51
40
|
*/
|
|
52
41
|
thinking: BedrockThinkingParams;
|
|
53
42
|
};
|
|
54
43
|
|
|
55
|
-
/**
|
|
56
|
-
* Type representing possible role types for Bedrock messages.
|
|
57
|
-
*/
|
|
44
|
+
/** Type representing possible role types for Bedrock messages. */
|
|
58
45
|
export type BedrockMessageRoleType = 'user' | 'assistant' | 'system';
|
|
59
46
|
|
|
60
|
-
/**
|
|
61
|
-
* Type representing supported image formats for Bedrock content.
|
|
62
|
-
*/
|
|
47
|
+
/** Type representing supported image formats for Bedrock content. */
|
|
63
48
|
export type BedrockImageFormat = 'png' | 'jpeg';
|
|
64
49
|
|
|
65
|
-
/**
|
|
66
|
-
* Type representing text content that can be sent to Bedrock API.
|
|
67
|
-
*/
|
|
50
|
+
/** Type representing text content that can be sent to Bedrock API. */
|
|
68
51
|
export type BedrockContentText = {
|
|
69
52
|
text: string;
|
|
70
53
|
};
|
|
71
54
|
|
|
72
|
-
/**
|
|
73
|
-
* Type representing image content that can be sent to Bedrock API.
|
|
74
|
-
*/
|
|
55
|
+
/** Type representing image content that can be sent to Bedrock API. */
|
|
75
56
|
export type BedrockContentImage = {
|
|
76
57
|
image: {
|
|
77
58
|
format: BedrockImageFormat;
|
|
@@ -79,184 +60,116 @@ export type BedrockContentImage = {
|
|
|
79
60
|
};
|
|
80
61
|
};
|
|
81
62
|
|
|
82
|
-
/**
|
|
83
|
-
* Union type representing possible content types in Bedrock requests.
|
|
84
|
-
*/
|
|
63
|
+
/** Union type representing possible content types in Bedrock requests. */
|
|
85
64
|
export type BedrockContent = BedrockContentText | BedrockContentImage;
|
|
86
65
|
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
content: BedrockContent[];
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Type representing a text response type from Bedrock.
|
|
103
|
-
*/
|
|
66
|
+
/** Type representing a message to be sent to Bedrock API. */
|
|
67
|
+
export type BedrockMessage =
|
|
68
|
+
| {
|
|
69
|
+
/** Role of the entity sending the message. */
|
|
70
|
+
role: BedrockMessageRoleType;
|
|
71
|
+
/** Array of content items in the message. */
|
|
72
|
+
content: BedrockContent[];
|
|
73
|
+
}
|
|
74
|
+
| unknown;
|
|
75
|
+
|
|
76
|
+
/** Type representing a text response type from Bedrock. */
|
|
104
77
|
export type BedrockResponseTypeText = 'text';
|
|
105
78
|
|
|
106
|
-
/**
|
|
107
|
-
* Type representing a reasoning response type from Bedrock.
|
|
108
|
-
*/
|
|
79
|
+
/** Type representing a reasoning response type from Bedrock. */
|
|
109
80
|
export type BedrockResponseTypeReasoning = 'reasoning';
|
|
110
81
|
|
|
111
|
-
/**
|
|
112
|
-
* Type representing an unknown response type from Bedrock.
|
|
113
|
-
*/
|
|
82
|
+
/** Type representing an unknown response type from Bedrock. */
|
|
114
83
|
export type BedrockResponseTypeUnknow = 'unknow';
|
|
115
84
|
|
|
116
85
|
/**
|
|
117
|
-
* Type representing a usage metadata response type from Bedrock.
|
|
118
|
-
*
|
|
119
|
-
* such as token counts and API consumption data.
|
|
86
|
+
* Type representing a usage metadata response type from Bedrock. This type is used to indicate content that contains usage statistics such as token counts and API consumption
|
|
87
|
+
* data.
|
|
120
88
|
*/
|
|
121
89
|
export type BedrockResponseTypeUsage = 'usage';
|
|
122
90
|
|
|
123
91
|
/**
|
|
124
|
-
* Type representing a tool use response type from Bedrock.
|
|
125
|
-
*
|
|
126
|
-
* as part of its response, containing the tool call information.
|
|
92
|
+
* Type representing a tool use response type from Bedrock. This type is used when the LLM decides to call a function/tool as part of its response, containing the tool call
|
|
93
|
+
* information.
|
|
127
94
|
*/
|
|
128
95
|
export type BedrockResponseTypeToolUse = 'toolUse';
|
|
129
96
|
|
|
130
|
-
/**
|
|
131
|
-
* Type representing a message stop response type from Bedrock.
|
|
132
|
-
*/
|
|
97
|
+
/** Type representing a message stop response type from Bedrock. */
|
|
133
98
|
export type BedrockResponseTypeMessageStop = 'messageStop';
|
|
134
99
|
|
|
135
|
-
/**
|
|
136
|
-
* Type representing text content in Bedrock response.
|
|
137
|
-
*/
|
|
100
|
+
/** Type representing text content in Bedrock response. */
|
|
138
101
|
export type BedrockResponseContentText = {
|
|
139
|
-
/**
|
|
140
|
-
* Type of the response content.
|
|
141
|
-
*/
|
|
102
|
+
/** Type of the response content. */
|
|
142
103
|
type: BedrockResponseTypeText;
|
|
143
|
-
/**
|
|
144
|
-
* Text content of the response.
|
|
145
|
-
*/
|
|
104
|
+
/** Text content of the response. */
|
|
146
105
|
data: string;
|
|
147
106
|
};
|
|
148
107
|
|
|
149
|
-
/**
|
|
150
|
-
* Type representing reasoning content in Bedrock response.
|
|
151
|
-
*/
|
|
108
|
+
/** Type representing reasoning content in Bedrock response. */
|
|
152
109
|
export type BedrockResponseContentReasoning = {
|
|
153
|
-
/**
|
|
154
|
-
* Type of the response content.
|
|
155
|
-
*/
|
|
110
|
+
/** Type of the response content. */
|
|
156
111
|
type: BedrockResponseTypeReasoning;
|
|
112
|
+
/** Reasoning content as text. */
|
|
113
|
+
data: string | Uint8Array;
|
|
157
114
|
/**
|
|
158
|
-
*
|
|
115
|
+
* Optional cryptographic signature or unique identifier for the reasoning content. This field may be provided by Bedrock to verify the authenticity and integrity of the
|
|
116
|
+
* reasoning process, particularly when using thinking mode features.
|
|
159
117
|
*/
|
|
160
|
-
|
|
118
|
+
signature?: string;
|
|
161
119
|
};
|
|
162
120
|
|
|
163
|
-
/**
|
|
164
|
-
* Type representing unknown content in Bedrock response.
|
|
165
|
-
*/
|
|
121
|
+
/** Type representing unknown content in Bedrock response. */
|
|
166
122
|
export type BedrockResponseContentUnknow = {
|
|
167
|
-
/**
|
|
168
|
-
* Type of the response content.
|
|
169
|
-
*/
|
|
123
|
+
/** Type of the response content. */
|
|
170
124
|
type: BedrockResponseTypeUnknow;
|
|
171
|
-
/**
|
|
172
|
-
* Unknown content, either as string or another type.
|
|
173
|
-
*/
|
|
125
|
+
/** Unknown content, either as string or another type. */
|
|
174
126
|
data: string | unknown;
|
|
175
127
|
};
|
|
176
128
|
|
|
177
|
-
/**
|
|
178
|
-
* Type representing usage metadata content in Bedrock response.
|
|
179
|
-
* The content is a string representing a JSON object in the format:
|
|
180
|
-
* {
|
|
181
|
-
* inputTokens: number;
|
|
182
|
-
* outputTokens: number;
|
|
183
|
-
* }
|
|
184
|
-
*/
|
|
129
|
+
/** Type representing usage metadata content in Bedrock response. The content is a string representing a JSON object in the format: { inputTokens: number; outputTokens: number; } */
|
|
185
130
|
export type BedrockResponseContentUsage = {
|
|
186
|
-
/**
|
|
187
|
-
* Identifies this as usage statistics content
|
|
188
|
-
*/
|
|
131
|
+
/** Identifies this as usage statistics content */
|
|
189
132
|
type: BedrockResponseTypeUsage;
|
|
190
|
-
/**
|
|
191
|
-
* The usage statistics content as a JSON string containing inputTokens and outputTokens
|
|
192
|
-
*/
|
|
133
|
+
/** The usage statistics content as a JSON string containing inputTokens and outputTokens */
|
|
193
134
|
data: string;
|
|
194
135
|
};
|
|
195
136
|
|
|
196
137
|
/**
|
|
197
|
-
* Type representing tool use content in Bedrock response.
|
|
198
|
-
*
|
|
199
|
-
* containing the tool call details such as function name and arguments.
|
|
138
|
+
* Type representing tool use content in Bedrock response. This is used when the LLM decides to call a function/tool, containing the tool call details such as function name and
|
|
139
|
+
* arguments.
|
|
200
140
|
*/
|
|
201
141
|
export type BedrockResponseContentToolUse = {
|
|
202
|
-
/**
|
|
203
|
-
* Type of the response content indicating a tool use.
|
|
204
|
-
*/
|
|
142
|
+
/** Type of the response content indicating a tool use. */
|
|
205
143
|
type: BedrockResponseTypeToolUse;
|
|
206
|
-
/**
|
|
207
|
-
* Tool use data containing function call information,
|
|
208
|
-
* either as a string (JSON format) or structured object.
|
|
209
|
-
*/
|
|
144
|
+
/** Tool use data containing function call information, either as a string (JSON format) or structured object. */
|
|
210
145
|
data: string | unknown;
|
|
211
146
|
};
|
|
212
147
|
|
|
213
|
-
/**
|
|
214
|
-
* Type representing message stop content in Bedrock response.
|
|
215
|
-
*/
|
|
148
|
+
/** Type representing message stop content in Bedrock response. */
|
|
216
149
|
export type BedrockResponseContentMessageStop = {
|
|
217
|
-
/**
|
|
218
|
-
* Type of the response content.
|
|
219
|
-
*/
|
|
150
|
+
/** Type of the response content. */
|
|
220
151
|
type: BedrockResponseTypeMessageStop;
|
|
221
|
-
/**
|
|
222
|
-
* Stop reason data.
|
|
223
|
-
*/
|
|
152
|
+
/** Stop reason data. */
|
|
224
153
|
data: BedrockStopReason;
|
|
225
154
|
};
|
|
226
155
|
|
|
227
|
-
/**
|
|
228
|
-
* Enumeration of possible reasons why Bedrock stopped generating content.
|
|
229
|
-
*/
|
|
156
|
+
/** Enumeration of possible reasons why Bedrock stopped generating content. */
|
|
230
157
|
export enum BedrockStopReason {
|
|
231
|
-
/**
|
|
232
|
-
* Content was filtered due to safety or policy violations.
|
|
233
|
-
*/
|
|
158
|
+
/** Content was filtered due to safety or policy violations. */
|
|
234
159
|
CONTENT_FILTERED = 'content_filtered',
|
|
235
|
-
/**
|
|
236
|
-
* Model naturally completed its response.
|
|
237
|
-
*/
|
|
160
|
+
/** Model naturally completed its response. */
|
|
238
161
|
END_TURN = 'end_turn',
|
|
239
|
-
/**
|
|
240
|
-
* Guardrail intervened to prevent inappropriate content.
|
|
241
|
-
*/
|
|
162
|
+
/** Guardrail intervened to prevent inappropriate content. */
|
|
242
163
|
GUARDRAIL_INTERVENED = 'guardrail_intervened',
|
|
243
|
-
/**
|
|
244
|
-
* Maximum token limit was reached.
|
|
245
|
-
*/
|
|
164
|
+
/** Maximum token limit was reached. */
|
|
246
165
|
MAX_TOKENS = 'max_tokens',
|
|
247
|
-
/**
|
|
248
|
-
* A predefined stop sequence was encountered.
|
|
249
|
-
*/
|
|
166
|
+
/** A predefined stop sequence was encountered. */
|
|
250
167
|
STOP_SEQUENCE = 'stop_sequence',
|
|
251
|
-
/**
|
|
252
|
-
* Model stopped to execute a tool/function call.
|
|
253
|
-
*/
|
|
168
|
+
/** Model stopped to execute a tool/function call. */
|
|
254
169
|
TOOL_USE = 'tool_use',
|
|
255
170
|
}
|
|
256
171
|
|
|
257
|
-
/**
|
|
258
|
-
* Union type representing possible content types in Bedrock response.
|
|
259
|
-
*/
|
|
172
|
+
/** Union type representing possible content types in Bedrock response. */
|
|
260
173
|
export type BedrockResponseContent =
|
|
261
174
|
| BedrockResponseContentText
|
|
262
175
|
| BedrockResponseContentReasoning
|
|
@@ -265,41 +178,25 @@ export type BedrockResponseContent =
|
|
|
265
178
|
| BedrockResponseContentToolUse
|
|
266
179
|
| BedrockResponseContentMessageStop;
|
|
267
180
|
|
|
268
|
-
/**
|
|
269
|
-
* Type representing a complete response from Bedrock API.
|
|
270
|
-
*/
|
|
181
|
+
/** Type representing a complete response from Bedrock API. */
|
|
271
182
|
export type BedrockResponse = {
|
|
272
|
-
/**
|
|
273
|
-
* Usage statistics for the API call.
|
|
274
|
-
*/
|
|
183
|
+
/** Usage statistics for the API call. */
|
|
275
184
|
usage: {
|
|
276
|
-
/**
|
|
277
|
-
* Number of tokens in the input.
|
|
278
|
-
*/
|
|
185
|
+
/** Number of tokens in the input. */
|
|
279
186
|
inputTokens: number;
|
|
280
|
-
/**
|
|
281
|
-
* Number of tokens in the output.
|
|
282
|
-
*/
|
|
187
|
+
/** Number of tokens in the output. */
|
|
283
188
|
outputTokens: number;
|
|
284
189
|
};
|
|
285
|
-
/**
|
|
286
|
-
* Array of response content items.
|
|
287
|
-
*/
|
|
190
|
+
/** Array of response content items. */
|
|
288
191
|
content: BedrockResponseContent[];
|
|
289
|
-
/**
|
|
290
|
-
* Reason why the model stopped generating content.
|
|
291
|
-
* Possible values include 'end_turn', 'max_tokens', 'stop_sequence', 'tool_use', etc.
|
|
292
|
-
*/
|
|
192
|
+
/** Reason why the model stopped generating content. Possible values include 'end_turn', 'max_tokens', 'stop_sequence', 'tool_use', etc. */
|
|
293
193
|
stopReason: BedrockStopReason;
|
|
294
|
-
/**
|
|
295
|
-
* The raw response from the Bedrock API.
|
|
296
|
-
*/
|
|
194
|
+
/** The raw response from the Bedrock API. */
|
|
297
195
|
bedrockResponse: ConverseCommandOutput;
|
|
298
196
|
};
|
|
299
197
|
|
|
300
198
|
/**
|
|
301
|
-
* Abstract class for interacting with AWS Bedrock API.
|
|
302
|
-
* Implements the LlmInterface for standardized language model interactions.
|
|
199
|
+
* Abstract class for interacting with AWS Bedrock API. Implements the LlmInterface for standardized language model interactions.
|
|
303
200
|
*
|
|
304
201
|
* @template TAdditionalParams Type for additional parameters specific to the implementation.
|
|
305
202
|
*/
|
|
@@ -427,10 +324,8 @@ export abstract class BedrockLlm<TAdditionalParams>
|
|
|
427
324
|
): AsyncGenerator<LLmResponseContent, void, unknown>;
|
|
428
325
|
|
|
429
326
|
/**
|
|
430
|
-
* Estimates the number of tokens that would be consumed by the given text data.
|
|
431
|
-
*
|
|
432
|
-
* which is useful for cost estimation, input validation, and determining if content
|
|
433
|
-
* fits within model token limits.
|
|
327
|
+
* Estimates the number of tokens that would be consumed by the given text data. This method provides an approximation of token count without making an actual API call, which
|
|
328
|
+
* is useful for cost estimation, input validation, and determining if content fits within model token limits.
|
|
434
329
|
*
|
|
435
330
|
* @param data - The text content to estimate token count for
|
|
436
331
|
* @returns Promise resolving to the estimated number of tokens
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a10_0x461202=a10_0x467d;(function(_0x595bc0,_0x369539){const _0x1c68cb=a10_0x467d,_0x256a8a=_0x595bc0();while(!![]){try{const _0x112174=parseInt(_0x1c68cb(0x142))/0x1*(parseInt(_0x1c68cb(0x170))/0x2)+-parseInt(_0x1c68cb(0x1c0))/0x3+-parseInt(_0x1c68cb(0xc3))/0x4*(-parseInt(_0x1c68cb(0x139))/0x5)+parseInt(_0x1c68cb(0x131))/0x6*(parseInt(_0x1c68cb(0x1c6))/0x7)+parseInt(_0x1c68cb(0xc9))/0x8*(-parseInt(_0x1c68cb(0x164))/0x9)+parseInt(_0x1c68cb(0x1ae))/0xa*(parseInt(_0x1c68cb(0x121))/0xb)+-parseInt(_0x1c68cb(0x175))/0xc*(-parseInt(_0x1c68cb(0x157))/0xd);if(_0x112174===_0x369539)break;else _0x256a8a['push'](_0x256a8a['shift']());}catch(_0x51a00e){_0x256a8a['push'](_0x256a8a['shift']());}}}(a10_0x4dd0,0x37166));Object[a10_0x461202(0xc1)](exports,a10_0x461202(0x1a9),{'value':!![]}),exports[a10_0x461202(0xf5)]=exports[a10_0x461202(0x117)]=void 0x0;function a10_0x467d(_0x523a63,_0x261d3d){const _0x20aff7=a10_0x4dd0();return a10_0x467d=function(_0x46a8b2,_0x1349fc){_0x46a8b2=_0x46a8b2-0xb2;let _0x4ff3f0=_0x20aff7[_0x46a8b2];if(a10_0x467d['DeeqHL']===undefined){var _0x420d7f=function(_0x467da0){const _0x7cc373='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xab4f11='',_0x6f0c3c='';for(let _0x1382fb=0x0,_0x24e308,_0x27b173,_0x463828=0x0;_0x27b173=_0x467da0['charAt'](_0x463828++);~_0x27b173&&(_0x24e308=_0x1382fb%0x4?_0x24e308*0x40+_0x27b173:_0x27b173,_0x1382fb++%0x4)?_0xab4f11+=String['fromCharCode'](0xff&_0x24e308>>(-0x2*_0x1382fb&0x6)):0x0){_0x27b173=_0x7cc373['indexOf'](_0x27b173);}for(let _0x54f070=0x0,_0x3c8f6e=_0xab4f11['length'];_0x54f070<_0x3c8f6e;_0x54f070++){_0x6f0c3c+='%'+('00'+_0xab4f11['charCodeAt'](_0x54f070)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x6f0c3c);};a10_0x467d['kBTCyt']=_0x420d7f,_0x523a63=arguments,a10_0x467d['DeeqHL']=!![];}const _0x1e0b22=_0x20aff7[0x0],_0x31f3b8=_0x46a8b2+_0x1e0b22,_0x4dd03a=_0x523a63[_0x31f3b8];return!_0x4dd03a?(_0x4ff3f0=a10_0x467d['kBTCyt'](_0x4ff3f0),_0x523a63[_0x31f3b8]=_0x4ff3f0):_0x4ff3f0=_0x4dd03a,_0x4ff3f0;},a10_0x467d(_0x523a63,_0x261d3d);}function a10_0x4dd0(){const _0x33c174=['t1LvBLm','zw5Kx3r1CM4','vvvRteC','ugfpv3C','v1z4q3K','C21rzNG','y2jxywu','CfL1A0e','qMXgr0W','D2HPBguGkhrYDwuPihT9','Dgv4Da','Dg9VBenOB2LJzq','ALnpt2O','zgvMAw5LuhjVCgvYDhK','C3rHDgvpyMPLy3q','nti0meTxrvjmuq','yvjeDve','Aw52B2TLu3rYzwfT','zuj3Ahe','zufgqK0','u1rpuf9trvfvru5drq','nJa4vuX5DMfP','rhf5s1C','sw52ywXPzcbTzxnZywDLihr5CguU','rvj0AKK','we9eCgq','twXXqNe','Chzlu0e','Bgr1zKC','DuDnrvq','B01uCui','ve9ptf9vu0u','rgnutLK','s3zvsuW','tNz1C2W','BeL5qNK','CMvHC29UAw5Nvgv4Da','q29UDMvYC2vtDhjLyw1dB21Tyw5K','vLv6Au0','B0jovMi','EefYDuO','BwfW','lI4VlI4VDg9VBc50ExbL','zgvZy3jPChrPB24','y29UDgvUDf9MAwX0zxjLza','q0vmqMi','ue9YtLq','DxnHz2u','BfDqBgG','DgvZDa','C3z3AwO','yxnZAxn0yw50','DhjHy2u','wwPdt3e','r21TCwu','yxbWBhK','BxrrBwu','tfvvrLK','twTmyuK','y29UDgvUDejSB2nRrgvSDge','vhzPC1q','vg5uzfu','EMXOENq','sMzPtvi','yLvwwhG','qMvKCM9JA0XSBq','ChjVDg90ExbL','zxHLy3v0zvrVB2XZ','t2jqsg0','C3rYAw5N','Aw5MBW','zu1OB3e','y29UC3rYDwn0B3i','qK5NzKK','AujvsK8','Dg9tDhjPBMC','zKLLweG','zvbTt0C','sgvgquC','D1jzu0C','t1DfwuS','y29UDgvUDejSB2nRu3rHCNq','CMvHC29UAw5N','y29UDMvYDeXSBvrVB2XgDw5JDgLVBLrVvg9VBenVBMzPzW','y2XPzw50','r0jIrhm','z2v0twf4vg9Rzw5Z','q09ovevovf9gsuXurvjfra','z0Dluue','wvHXy2S','BMfTzq','BgPvBg8','uMzSr2e','A0HYANe','Bw9KzwW','Bwv0ywrHDge','iIbMywLSzwqGD2L0AcbLCNjVCI4','ufzqueu','y3PRD1O','qMvKCM9JA1n0B3bszwfZB24','CMvHC29UAw5Nq29UDgvUDa','D3L5rvi','BwvZC2fNzq','EgTRu3m','zMnmAxK','rMDeBfu','Dg9VBfvZzq','BwvZC2fNzvn0B3a','zgvSDge','nJuYmdq3CvPkCKnr','sxf6Beq','v29juM0','s21mtui','B2jQzwn0','vxDXsw0','AKHkDhi','z0TZEeS','zgf0yq','sKPAuxa','Egfgrxa','wg1cEw0','Bwf4x3rVA2vUCW','reDhze4','vvHUsKW','wgXouxy','nJeWmdH3ELfJz2q','Aw5WDxq','tLb5B2q','q29UDMvYC2vdB21Tyw5K','weTwENK','B3v0Chv0vg9Rzw5Z','txjXthm','x19WCM90B19F','mtiWnvnguu9rCq','sgHjDhK','qMvKCM9JA1j1BNrPBwvdBgLLBNq','ChvZAa','sgzeDue','CxjcB2C','y2fSBa','uuPwuLu','t1fYB28','mtiXt1jAAuv0','z2jOzgS','v21xq2m','DefPrw8','EgjTzgm','CMv0DxjUicHMDw5JDgLVBIGPia','DhLWzq','u0LMvKm','BhbStMi','twnmrMS','ELzOtKO','vg9VBenOB2LJzq','swr6B0q','zxDrwg8','y29UDMvYDeXSBu1LC3nHz2vuB0jLzhjVy2TnzxnZywDL','z0TIExm','z2DLCG','ugLzBve','C3rHCNq','DgvTCgvYyxr1CMu','DePws0m','nJKXoteYwujqqvne','EfDoBxe','t0XtvLe','Aw52B2TL','y29UDgvUDa','y3jLyxrLuMvXDwvZDa','Ag5ZBKO','ru5ex1rvuK4','D0HACuS','rKfsywy','BvLXBKG','v3nPAKy','BLrtqvm','mJe4ndnUB0zItKS','svjlDhG','y2fSBeXSBq','zNvUy3rPB24GkLWOicPCkq','vg9VBcaI','C2vUza','yKrwtNm','AfzJB0u','B3v0Chv0','Bwf4vg9Rzw5Z','DLbtCgG','v2n5q1G','mJe0sgPbrxze','yLDbAxq','zMLSDgvY','qgf3CY1ZzgSVy2XPzw50lwjLzhjVy2STCNvUDgLTzq','Dw5RBM93','mJr5vvblu0C','E30Uy29UC3rYDwn0B3iOiNjLDhvYBIb0AgLZiIKOicK','rwHVA24','yMnZAg4','thPSCKG','qvvutW','z3vHCMrYywLSx2LUDgvYDMvUzwq','A1bACLq','y2HHAw4','CNLdquC','C3LIAwq','rwH0ufu','zxzRwvq','v3jUr3y','Aw5PDa','rMDPteK','AxLNExe','Aw5WDxruB2TLBNm','BuPWAuK','y291BNrLCG','uKXZAha','zw1yqNm','y29UDgvUDejSB2nRsw5KzxG','sxnRyxe','whPOEKm','whn6B0O','y29UC29Szq','s3jsr2e','Ee9osu0','C3rYzwfT','D2fYBG','BgvUz3rO','C3rYAw5NAwz5','q2TTC0e','ENnQBxK','uKvgzuO','CgfYC2u','zxjYB3i','zhHks2i','ruzcsMG','Dg9VBf91C2u','Dg9VBenHBgW','BLbXsM8','Aw5WDxrty2HLBwe','uLHgz1y','uwLLtNy','r2fmqxO','v0nZwfm','Dg9Wua','rKPeBhK','y21xsKi','z0fhCM0','x19LC01VzhvSzq','DgLmrMO','txnHz08','DM93yLy','u3jrrKO','ntbTEfLOtwy','vvvqr1K','zM9YBwf0','CM9Szq','u1rPs3a','reD4Ag8','ENPfBey','C3vJy2vZCW','tMDWvKO','z2TZEfy','B0zouxC','z2DcA2y','rhb4s2S','ALfbvfi','BeH4uLy','DuXtDKG','AKjmCxa','vwPOEuO','mtaYntiWofHrtuXxvG','qNrVB1G','uMTJEhm','u3nAExO','CwH3AKO','C3rVCfjLyxnVBG','mtrft0fKy0O','D3jhvMW','zNb1Eg4','ywn0Aw9U','C1Hdzhm','twDHB3G','y2HLy2TbCgLmAwnLBNnL','rK9sq0ve','vwXjAxa','EhDjr3C','vM9jCeS','r1vbuKrsquLmx0LovevsvKvoruq','yMLUza','Bfn3rLy'];a10_0x4dd0=function(){return _0x33c174;};return a10_0x4dd0();}const a10_0x147a1a=require(a10_0x461202(0x173)),a10_0x4b5769=require('../../../license/index'),a10_0x33e6da=require(a10_0x461202(0xde));var BedrockStopReason;(function(BedrockStopReason){const _0x535ec2=a10_0x461202,_0x5785f7={'uGMET':'\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','PaOWw':_0x535ec2(0x183),'ggBkf':_0x535ec2(0x17d),'QJOJo':_0x535ec2(0xe2),'KrRGa':function(_0x10c905){return _0x10c905();},'kHrjq':_0x535ec2(0x11e),'WrnGv':_0x535ec2(0x18e),'jHJtr':'njdqp','gGKQA':function(_0x5bcdee,_0xaac05e,_0x104eab){return _0x5bcdee(_0xaac05e,_0x104eab);},'omkgR':_0x535ec2(0x132),'bUVXx':function(_0x2cb875,_0x2d133b){return _0x2cb875(_0x2d133b);},'lIyBy':_0x535ec2(0x12f),'EiisY':function(_0x1090da,_0x55bd23){return _0x1090da!==_0x55bd23;},'Rkcxs':'Gmmqe','hnsnJ':_0x535ec2(0x144),'kxigN':'cktGz','xkkSs':function(_0x3ed8a2,_0xbb75b5){return _0x3ed8a2!==_0xbb75b5;},'ObPHm':'ChloZ','vPSph':_0x535ec2(0x156),'nNjTy':'return\x20(function()\x20','XjnIv':_0x535ec2(0x176),'GWtVB':_0x535ec2(0x193),'AxwJu':_0x535ec2(0xfa),'wHZqK':'exception','UwqIm':'table','sWcgr':_0x535ec2(0xe8),'iBUJO':function(_0x45c8f1,_0x16e653){return _0x45c8f1<_0x16e653;},'uSrcL':function(_0x40e21f,_0x4bac5f){return _0x40e21f===_0x4bac5f;},'DqyKW':'oZIAI','CELBb':_0x535ec2(0x10b),'NSnka':_0x535ec2(0xe0),'mPwhh':_0x535ec2(0x15e),'VUziM':_0x535ec2(0xb5),'wrGVl':_0x535ec2(0x1d1),'SrQFJ':'MAX_TOKENS','fpuxn':_0x535ec2(0x12d),'xaFEp':_0x535ec2(0xc8),'XmBym':'stop_sequence','XKVzy':_0x535ec2(0xd3)},_0x5a97f0=(function(){const _0x13cb53=_0x535ec2,_0x14e244={'ERtjI':function(_0x5cf866,_0x3b24b4){return _0x5cf866===_0x3b24b4;},'mJpiI':_0x13cb53(0x128)};let _0x5462ae=!![];return function(_0x24222b,_0x3b8467){const _0x4bb875=_0x5462ae?function(){const _0x4d36b8=a10_0x467d;if(_0x14e244[_0x4d36b8(0xcc)]('gKsxK',_0x14e244[_0x4d36b8(0x187)])){if(_0x3b8467){const _0x4300ae=_0x3b8467[_0x4d36b8(0xeb)](_0x24222b,arguments);return _0x3b8467=null,_0x4300ae;}}else{const _0x5bad88=_0x47ec7c['constructor'][_0x4d36b8(0xf6)][_0x4d36b8(0xb2)](_0x424d84),_0xf3c894=_0x161750[index],_0xd1d8fe=_0x50bbda[_0xf3c894]||_0x5bad88;_0x5bad88[_0x4d36b8(0x138)]=_0x49f465[_0x4d36b8(0xb2)](_0x52c235),_0x5bad88[_0x4d36b8(0xff)]=_0xd1d8fe[_0x4d36b8(0xff)]['bind'](_0xd1d8fe),_0x3cf897[_0xf3c894]=_0x5bad88;}}:function(){};return _0x5462ae=![],_0x4bb875;};}());(function(){const _0x1185b1=_0x535ec2,_0xabe116={'UZpBk':_0x5785f7[_0x1185b1(0xd1)],'bWAit':function(_0x178111,_0x2744e7){return _0x178111(_0x2744e7);},'NPyod':_0x5785f7[_0x1185b1(0xb7)],'wyyER':_0x5785f7[_0x1185b1(0x1b9)],'GaLAz':_0x1185b1(0x132),'oBNVb':_0x5785f7['QJOJo'],'eBwhq':function(_0x4eb4b2){return _0x5785f7['KrRGa'](_0x4eb4b2);},'SIfVC':_0x5785f7[_0x1185b1(0x111)]};if(_0x5785f7[_0x1185b1(0x182)]!==_0x5785f7[_0x1185b1(0x127)])_0x5785f7[_0x1185b1(0x10c)](_0x5a97f0,this,function(){const _0x299617=_0x1185b1,_0x2d2476=new RegExp(_0x299617(0x167)),_0x569634=new RegExp(_0xabe116['UZpBk'],'i'),_0x91d7a8=_0xabe116[_0x299617(0x171)](a10_0x4df03,_0xabe116[_0x299617(0x133)]);if(!_0x2d2476[_0x299617(0xe5)](_0x91d7a8+_0xabe116[_0x299617(0x119)])||!_0x569634[_0x299617(0xe5)](_0x91d7a8+_0xabe116[_0x299617(0x1a3)]))_0xabe116[_0x299617(0x171)](_0x91d7a8,'0');else{if(_0x299617(0xe2)===_0xabe116[_0x299617(0xdb)])_0xabe116[_0x299617(0xc6)](a10_0x4df03);else throw new _0x4b7a96(_0x299617(0x168)+_0x14d347+'\x22\x20not\x20found');}})();else return{'type':_0xabe116[_0x1185b1(0x149)],'data':_0x6511af[_0xabe116[_0x1185b1(0x149)]]};}());const _0x479b76=(function(){const _0x486f19=_0x535ec2,_0x11af44={'WsijF':_0x5785f7[_0x486f19(0xd1)],'IqzlD':_0x5785f7[_0x486f19(0xb7)],'nPqJo':_0x486f19(0x17d),'MlqBq':_0x5785f7['omkgR'],'lplNb':function(_0x2fd36c,_0x2d7fc4){return _0x5785f7['bUVXx'](_0x2fd36c,_0x2d7fc4);},'gksxV':function(_0x37b63f,_0x492b83){return _0x37b63f===_0x492b83;},'OTwkX':_0x5785f7[_0x486f19(0xd7)],'emXBs':function(_0x87daf0,_0x2a6d24){return _0x5785f7['EiisY'](_0x87daf0,_0x2a6d24);},'mtQme':_0x5785f7[_0x486f19(0x1c2)],'DGGdN':function(_0x3bdb85,_0x384ce5){return _0x3bdb85===_0x384ce5;},'ZnGQB':_0x5785f7[_0x486f19(0x15d)],'JfiMR':_0x5785f7['kxigN']};let _0x401263=!![];return function(_0xa93d05,_0x22f05e){const _0x45304c=_0x486f19;if(_0x11af44[_0x45304c(0x12e)](_0x11af44['ZnGQB'],_0x11af44[_0x45304c(0xf3)])){const _0x37b41e=_0x4f704f[_0x45304c(0x105)][_0x45304c(0x18b)];_0x1fbbf2[_0x37b41e]={..._0xbb93c5[_0x45304c(0x105)]['start']['toolUse']};}else{const _0x26884d=_0x401263?function(){const _0x199729=_0x45304c,_0x35e9e6={'UUPGY':_0x11af44[_0x199729(0x162)],'Nvusl':_0x11af44[_0x199729(0x122)],'XzhzC':_0x11af44[_0x199729(0x19f)],'eMhoq':_0x11af44[_0x199729(0xce)],'dxJKb':function(_0x3c3d2b,_0x4019f4){const _0x3135fd=_0x199729;return _0x11af44[_0x3135fd(0x14a)](_0x3c3d2b,_0x4019f4);}};if(_0x11af44[_0x199729(0x1b7)](_0x11af44['OTwkX'],_0x199729(0xb3)))_0x2158f3=_0x2368c3;else{if(_0x22f05e){if(_0x11af44[_0x199729(0x18a)](_0x199729(0xea),_0x11af44[_0x199729(0xec)])){const _0x590fc7={'ExhEY':BZOWrt[_0x199729(0x1af)],'GIVAL':BZOWrt[_0x199729(0xd6)],'pmaVI':function(_0x33cf20,_0x53eff7){return _0x33cf20+_0x53eff7;},'oMTqB':BZOWrt[_0x199729(0x18d)],'HhIty':BZOWrt[_0x199729(0xfb)],'XlNQv':function(_0x47fc89,_0x354258){const _0x51b387=_0x199729;return BZOWrt[_0x51b387(0x19b)](_0x47fc89,_0x354258);},'hVcoE':function(_0x22ea4c){return _0x22ea4c();}};_0x179c1c(this,function(){const _0x3a829e=_0x199729,_0x57d953=new _0x400df1('function\x20*\x5c(\x20*\x5c)'),_0x41ae99=new _0x9d168d(_0x590fc7['ExhEY'],'i'),_0x99acbb=_0x42bde0(_0x590fc7['GIVAL']);!_0x57d953['test'](_0x590fc7['pmaVI'](_0x99acbb,_0x590fc7[_0x3a829e(0xd2)]))||!_0x41ae99[_0x3a829e(0xe5)](_0x99acbb+_0x590fc7[_0x3a829e(0x13a)])?_0x590fc7[_0x3a829e(0x130)](_0x99acbb,'0'):_0x590fc7[_0x3a829e(0x16b)](_0x979c9a);})();}else{const _0x3f7ddd=_0x22f05e[_0x199729(0xeb)](_0xa93d05,arguments);return _0x22f05e=null,_0x3f7ddd;}}}}:function(){};return _0x401263=![],_0x26884d;}};}()),_0x66de2d=_0x5785f7['gGKQA'](_0x479b76,this,function(){const _0x222c2f=_0x535ec2,_0x328b67={'DcTNY':function(_0x405663,_0x59d332){const _0x390a1d=a10_0x467d;return _0x5785f7[_0x390a1d(0x11b)](_0x405663,_0x59d332);},'gUvtI':_0x5785f7[_0x222c2f(0xf8)],'nTSAS':_0x5785f7[_0x222c2f(0x16e)],'BtooX':function(_0x231448,_0x661ea8){return _0x231448+_0x661ea8;},'OQroo':_0x5785f7['nNjTy'],'MsagO':_0x5785f7['XjnIv'],'vfdFg':function(_0x280c27,_0x488d44){const _0x2b0b77=_0x222c2f;return _0x5785f7[_0x2b0b77(0xf4)](_0x280c27,_0x488d44);}},_0x251b48=function(){const _0xdeb36e=_0x222c2f;let _0xcf6570;try{if(_0x328b67[_0xdeb36e(0xd4)](_0x328b67['gUvtI'],_0x328b67[_0xdeb36e(0x163)]))_0xcf6570=Function(_0x328b67[_0xdeb36e(0x1c1)](_0x328b67[_0xdeb36e(0x1c1)](_0x328b67[_0xdeb36e(0x141)],_0x328b67[_0xdeb36e(0x1ab)]),');'))();else return{..._0x5b34b4,'input':_0x2ee3a3[_0xdeb36e(0x132)]?_0x5339fe[_0xdeb36e(0x199)](_0xa40907[_0xdeb36e(0x132)]):{}};}catch(_0x406d59){_0xcf6570=window;}return _0xcf6570;},_0x5c4185=_0x5785f7[_0x222c2f(0x190)](_0x251b48),_0x293745=_0x5c4185[_0x222c2f(0x18f)]=_0x5c4185[_0x222c2f(0x18f)]||{},_0x11d8c1=['log',_0x5785f7['GWtVB'],_0x5785f7['AxwJu'],_0x222c2f(0x19a),_0x5785f7[_0x222c2f(0x15f)],_0x5785f7[_0x222c2f(0x126)],_0x5785f7['sWcgr']];for(let index=0x0;_0x5785f7[_0x222c2f(0xfe)](index,_0x11d8c1[_0x222c2f(0x194)]);index++){if(_0x5785f7['uSrcL'](_0x5785f7[_0x222c2f(0xca)],_0x222c2f(0x184)))_0x133916=vuXLcL['vfdFg'](_0x261424,vuXLcL[_0x222c2f(0x1c1)](vuXLcL[_0x222c2f(0x1c1)](vuXLcL['OQroo'],vuXLcL[_0x222c2f(0x1ab)]),');'))();else{const _0x266854=_0x479b76[_0x222c2f(0xfc)][_0x222c2f(0xf6)][_0x222c2f(0xb2)](_0x479b76),_0x49e273=_0x11d8c1[index],_0x97f1ee=_0x293745[_0x49e273]||_0x266854;_0x266854[_0x222c2f(0x138)]=_0x479b76[_0x222c2f(0xb2)](_0x479b76),_0x266854[_0x222c2f(0xff)]=_0x97f1ee['toString']['bind'](_0x97f1ee),_0x293745[_0x49e273]=_0x266854;}}});_0x5785f7[_0x535ec2(0x190)](_0x66de2d),BedrockStopReason[_0x5785f7[_0x535ec2(0xe1)]]=_0x5785f7['NSnka'],BedrockStopReason[_0x5785f7['mPwhh']]=_0x5785f7[_0x535ec2(0xda)],BedrockStopReason[_0x5785f7[_0x535ec2(0x1c7)]]=_0x535ec2(0x17b),BedrockStopReason[_0x5785f7[_0x535ec2(0x1ad)]]=_0x5785f7[_0x535ec2(0x1c8)],BedrockStopReason[_0x5785f7[_0x535ec2(0x12b)]]=_0x5785f7[_0x535ec2(0x12c)],BedrockStopReason[_0x5785f7[_0x535ec2(0x135)]]=_0x535ec2(0x19d);}(BedrockStopReason||(exports['BedrockStopReason']=BedrockStopReason={})));class BedrockLlm{constructor(_0xa661b6,_0x153660,_0x1dddb6,_0x3838e0){const _0x361660=a10_0x461202;this['model']=_0x3838e0,this[_0x361660(0x108)]=new a10_0x147a1a[(_0x361660(0x13b))]({'region':_0x1dddb6,'credentials':{'accessKeyId':_0xa661b6,'secretAccessKey':_0x153660}});}[a10_0x461202(0x10a)](){return undefined;}['createRequest'](_0x184342,_0x3ea5cf=0.5,_0x2cd7c5=null,_0x2e1dcc=undefined,_0x9ae5c=null,_0x589055=undefined,_0x5bca04){const _0x49188d=a10_0x461202,_0x4504a9={'ePmOG':function(_0x5725ca,_0x457665){return _0x5725ca==_0x457665;},'xnbFG':'reasoning','kgunR':'reasoningText','MkLaI':function(_0x1dc866,_0x23ba54){return _0x1dc866(_0x23ba54);},'XODpd':function(_0x2c451b,_0x22e43d){return _0x2c451b+_0x22e43d;},'pYukA':function(_0x4b1128,_0x48ea0a){return _0x4b1128+_0x48ea0a;},'xwIGw':_0x49188d(0x147),'kPZrT':function(_0x273fc5,_0x41c1be){return _0x273fc5!==_0x41c1be;},'oMuuG':_0x49188d(0xbc),'OWEYK':function(_0x28b628,_0x44a2ce){return _0x28b628===_0x44a2ce;},'jpEqz':_0x49188d(0xf9),'svwij':_0x49188d(0x12a),'xWNmq':_0x49188d(0x1b4),'McLFk':'JAkgS','KvUIL':function(_0x2bc4ce,_0x3a455c){return _0x2bc4ce??_0x3a455c;}};let _0x4a3543=undefined;if(_0x2e1dcc){if(_0x4504a9[_0x49188d(0x17c)](_0x4504a9['oMuuG'],_0x49188d(0x19c))){if(_0x4504a9[_0x49188d(0x104)](typeof _0x2e1dcc,_0x4504a9['jpEqz']))_0x4504a9[_0x49188d(0x104)](_0x4504a9['svwij'],_0x4504a9[_0x49188d(0xe6)])?_0x4a3543=[{'text':_0x2e1dcc}]:_0x4504a9[_0x49188d(0x101)](_0x939348[_0x49188d(0x132)],null)?_0x253f2c['input']=_0x1250c7:_0x45134f[_0x49188d(0x132)]+=_0x2277fe;else{if(_0x4504a9[_0x49188d(0x158)]===_0x4504a9[_0x49188d(0x14b)])return{'type':_0x4504a9['xnbFG'],'data':_0x11e6b4[_0x49188d(0x118)][_0x4504a9['kgunR']][_0x49188d(0xbe)]};else _0x4a3543=_0x2e1dcc;}}else{let _0x5f0a00;try{_0x5f0a00=xFeslP[_0x49188d(0xee)](_0x281b51,xFeslP[_0x49188d(0xcd)](xFeslP[_0x49188d(0xbb)](xFeslP[_0x49188d(0x1cf)],_0x49188d(0x176)),');'))();}catch(_0x539209){_0x5f0a00=_0x5c866c;}return _0x5f0a00;}}return{'modelId':this[_0x49188d(0x112)],'system':_0x4a3543,'messages':_0x184342,'inferenceConfig':{'maxTokens':_0x2cd7c5,'temperature':_0x3ea5cf,'topP':_0x4504a9[_0x49188d(0xd5)](_0x9ae5c,undefined)},'toolConfig':_0x5bca04};}async[a10_0x461202(0x15a)](_0x15c7f4,_0x170086=0.5,_0x1815fa=null,_0x3cab88=undefined,_0x2d2b53=undefined,_0x4ecc46=undefined,_0x38b613=undefined){const _0x5759bb=a10_0x461202,_0x5961e6={'OMxZu':'while\x20(true)\x20{}','jQATR':_0x5759bb(0x188),'RXFgV':function(_0x292933,_0x291a1e){return _0x292933!==_0x291a1e;},'TnTdU':'LHBMK','HtQmP':_0x5759bb(0xb9),'evkYT':_0x5759bb(0x118),'zsjmy':_0x5759bb(0x14f),'cbWae':_0x5759bb(0x153),'oFNQw':_0x5759bb(0x106),'TvisT':_0x5759bb(0xd8),'ryCAG':_0x5759bb(0xbe),'pvKSA':function(_0x725d7a,_0x1d5876){return _0x725d7a!==_0x1d5876;},'uybYN':'cwsMp','UUkLG':_0x5759bb(0x11e),'gAGrm':_0x5759bb(0x1ba),'PLunm':function(_0x326c97,_0x4e082a){return _0x326c97===_0x4e082a;},'YjCOq':_0x5759bb(0x180),'lXzUO':_0x5759bb(0x1aa),'LUUFY':'unknow'};await(0x0,a10_0x4b5769[_0x5759bb(0x1cc)])();const _0x18d18e=this['createRequest'](_0x15c7f4,_0x170086,_0x1815fa||this[_0x5759bb(0x10a)](),_0x3cab88,_0x2d2b53,_0x4ecc46,_0x38b613),_0x5bcc91=await this['client']['send'](new a10_0x147a1a[(_0x5759bb(0x134))](_0x18d18e));return{'usage':{'inputTokens':_0x5bcc91[_0x5759bb(0xe3)]?.[_0x5759bb(0x186)],'outputTokens':_0x5bcc91[_0x5759bb(0xe3)]?.['outputTokens']},'content':_0x5bcc91[_0x5759bb(0x16c)]['message'][_0x5759bb(0x15b)]?.[_0x5759bb(0xdd)](_0x121653=>{const _0x2ce6c6=_0x5759bb,_0x20bb9a={'DGxho':_0x2ce6c6(0xf9),'PVPPE':function(_0x19f14a,_0x1154db){return _0x19f14a??_0x1154db;}};if(_0x5961e6[_0x2ce6c6(0x1a1)](_0x5961e6[_0x2ce6c6(0xf1)],_0x5961e6['HtQmP'])){if(_0x121653[_0x5961e6[_0x2ce6c6(0x181)]])return _0x5961e6[_0x2ce6c6(0x1a1)](_0x5961e6[_0x2ce6c6(0x197)],_0x5961e6[_0x2ce6c6(0xba)])?{'type':_0x5961e6[_0x2ce6c6(0x1b8)],'data':_0x121653[_0x5961e6['evkYT']][_0x5961e6[_0x2ce6c6(0xf0)]][_0x5961e6['ryCAG']]}:_0x25a291;else{if(_0x121653[_0x5961e6[_0x2ce6c6(0x17e)]]){if(_0x5961e6['pvKSA'](_0x5961e6['uybYN'],_0x5961e6['uybYN']))typeof _0x501aee===_0x20bb9a[_0x2ce6c6(0x1b3)]?_0x58710c=[{'text':_0x1782d8}]:_0x59532a=_0x39df8a;else return{'type':_0x5961e6['ryCAG'],'data':_0x121653[_0x5961e6[_0x2ce6c6(0x17e)]]};}else{if(_0x121653[_0x5961e6[_0x2ce6c6(0xb6)]])return _0x5961e6[_0x2ce6c6(0xcf)](_0x5961e6[_0x2ce6c6(0x1a8)],_0x5961e6['gAGrm'])?function(_0x20da49){}['constructor'](OMEyAD['OMxZu'])[_0x2ce6c6(0xeb)](OMEyAD[_0x2ce6c6(0x1bb)]):{'type':_0x5961e6[_0x2ce6c6(0xb6)],'data':_0x121653[_0x5961e6[_0x2ce6c6(0xb6)]]};else{if(_0x5961e6['PLunm'](_0x5961e6[_0x2ce6c6(0xe9)],_0x5961e6['lXzUO'])){let _0x5547aa=_0x21b569;return _0x6fd037&&(typeof _0xa50dfc===_0x2ce6c6(0xf9)?_0x5547aa=[{'text':_0x39e5ce}]:_0x5547aa=_0x253e9a),{'modelId':this[_0x2ce6c6(0x112)],'system':_0x5547aa,'messages':_0x79c8b8,'inferenceConfig':{'maxTokens':_0x5ea2c1,'temperature':_0x4bfd3b,'topP':_0x20bb9a[_0x2ce6c6(0x115)](_0x1390bb,_0x66774)},'toolConfig':_0x298f64};}else return{'type':_0x5961e6[_0x2ce6c6(0xed)],'data':_0x121653};}}}}else return![];}),'stopReason':_0x5bcc91[_0x5759bb(0x1c5)],'bedrockResponse':_0x5bcc91};}async*['invokeStream'](_0x5a3e41,_0xd5c2a0=0.5,_0x538ab1=null,_0x427ff2=undefined,_0x33b785=undefined,_0x17b9cd=undefined,_0x265eac){const _0x4b6b56=a10_0x461202,_0x3ef679={'UlIip':function(_0x1d2758,_0x2791bb){return _0x1d2758==_0x2791bb;},'lHxRV':_0x4b6b56(0xc0),'Iskaq':_0x4b6b56(0x160),'PpPDP':'text','zKyOh':_0x4b6b56(0x106),'qhwjJ':function(_0x22fa6e,_0x53b349){return _0x22fa6e!==_0x53b349;},'DWwWT':_0x4b6b56(0xd0),'WcyCX':_0x4b6b56(0x145),'SsZyz':_0x4b6b56(0xb8),'LzlrH':_0x4b6b56(0xdc)};await(0x0,a10_0x4b5769[_0x4b6b56(0x1cc)])();const _0x4b4d68=this[_0x4b6b56(0x15c)](_0x5a3e41,_0xd5c2a0,_0x538ab1||this[_0x4b6b56(0x10a)](),_0x427ff2,_0x33b785,_0x17b9cd,_0x265eac),_0x5e7c9b=await this['client'][_0x4b6b56(0x169)](new a10_0x147a1a[(_0x4b6b56(0xd9))](_0x4b4d68));if(_0x5e7c9b[_0x4b6b56(0x192)]){let _0xc54e99=[];for await(const _0x3d8a3d of _0x5e7c9b[_0x4b6b56(0x192)]){if(_0x3ef679[_0x4b6b56(0x1bc)]===_0x3ef679[_0x4b6b56(0x18c)]){const _0x34c144=_0x2cf19c[_0x4b6b56(0xef)]['contentBlockIndex'];let _0x3f7cc6=_0x4f2db8[_0x34c144];const _0x13cb43=_0x75b4b6[_0x4b6b56(0xef)][_0x4b6b56(0x120)][_0x4b6b56(0x11e)][_0x4b6b56(0x132)];_0x13cb43&&(_0x3ef679[_0x4b6b56(0x1ce)](_0x3f7cc6[_0x4b6b56(0x132)],null)?_0x3f7cc6[_0x4b6b56(0x132)]=_0x13cb43:_0x3f7cc6[_0x4b6b56(0x132)]+=_0x13cb43);}else{_0x3d8a3d['contentBlockDelta']?.[_0x4b6b56(0x120)]?.[_0x4b6b56(0xbe)]&&(yield{'type':_0x3ef679['PpPDP'],'data':_0x3d8a3d[_0x4b6b56(0xef)][_0x4b6b56(0x120)][_0x4b6b56(0xbe)]});_0x3d8a3d[_0x4b6b56(0xef)]?.[_0x4b6b56(0x120)]?.[_0x4b6b56(0x118)]?.['text']&&(yield{'type':_0x3ef679['zKyOh'],'data':_0x3d8a3d['contentBlockDelta'][_0x4b6b56(0x120)][_0x4b6b56(0x118)]?.[_0x4b6b56(0xbe)]});if(_0x3d8a3d[_0x4b6b56(0x105)]?.[_0x4b6b56(0x154)]?.[_0x4b6b56(0x11e)]){const _0x509139=_0x3d8a3d[_0x4b6b56(0x105)][_0x4b6b56(0x18b)];_0xc54e99[_0x509139]={..._0x3d8a3d['contentBlockStart'][_0x4b6b56(0x154)]['toolUse']};}if(_0x3d8a3d[_0x4b6b56(0xef)]?.[_0x4b6b56(0x120)]?.[_0x4b6b56(0x11e)]){if(_0x3ef679[_0x4b6b56(0x1c4)](_0x3ef679['DWwWT'],_0x3ef679['DWwWT']))return!![];else{const _0x12ae90=_0x3d8a3d[_0x4b6b56(0xef)][_0x4b6b56(0x18b)];let _0x2cd99d=_0xc54e99[_0x12ae90];const _0x11c25e=_0x3d8a3d[_0x4b6b56(0xef)][_0x4b6b56(0x120)][_0x4b6b56(0x11e)][_0x4b6b56(0x132)];if(_0x11c25e){if(_0x3ef679[_0x4b6b56(0x1c4)](_0x3ef679[_0x4b6b56(0x16f)],_0x3ef679[_0x4b6b56(0x16f)]))_0x463b17['push'](_0x1a1c0);else{if(_0x2cd99d[_0x4b6b56(0x132)]==null){if('WVxCy'!==_0x3ef679[_0x4b6b56(0x1c3)]){const _0x272320=_0x389a14[_0x4b6b56(0xeb)](_0x30b630,arguments);return _0x4bca23=null,_0x272320;}else _0x2cd99d['input']=_0x11c25e;}else _0x2cd99d[_0x4b6b56(0x132)]+=_0x11c25e;}}}}_0x3d8a3d['messageStop']&&(yield{'type':_0x4b6b56(0x11f),'data':_0x3d8a3d['messageStop'][_0x4b6b56(0x1c5)]});if(_0x3d8a3d[_0x4b6b56(0x113)]?.[_0x4b6b56(0xe3)]){const {usage:_0x4ec5ca}=_0x3d8a3d[_0x4b6b56(0x113)],_0x34af8c=_0x4ec5ca['inputTokens']||0x0,_0x29961e=_0x4ec5ca[_0x4b6b56(0x136)]||0x0;yield{'type':'usage','data':JSON[_0x4b6b56(0x195)]({'inputTokens':_0x34af8c,'outputTokens':_0x29961e})};}}}_0xc54e99=_0xc54e99['filter'](_0x24b246=>!!_0x24b246)[_0x4b6b56(0xdd)](_0x2c09e7=>{const _0x2688bc=_0x4b6b56;return{..._0x2c09e7,'input':_0x2c09e7['input']?JSON[_0x2688bc(0x199)](_0x2c09e7[_0x2688bc(0x132)]):{}};});for(const _0x363610 of _0xc54e99){_0x3ef679[_0x4b6b56(0x179)]===_0x4b6b56(0x159)?_0x2d2eaa(0x0):yield{'type':_0x4b6b56(0x11e),'data':_0x363610};}}}[a10_0x461202(0x150)](_0x320c1e){const _0x43a993=a10_0x461202,_0x409559={'RyMPY':function(_0x43ae83,_0x230508){return _0x43ae83===_0x230508;},'vowbV':'text','czkwZ':_0x43a993(0xcb),'STiKp':function(_0x1169e6,_0x3fd8d6){return _0x1169e6!==_0x3fd8d6;},'fIeXH':_0x43a993(0x1a2)};return _0x320c1e[_0x43a993(0xdd)](_0x189255=>{const _0x165d28=_0x43a993,_0x3ad70a={'IRKtx':_0x409559[_0x165d28(0x116)]};if(_0x409559[_0x165d28(0x1b2)](_0x165d28(0x1a2),_0x409559[_0x165d28(0x100)]))throw new _0x224505(_0x3ad70a[_0x165d28(0x165)]);else return{'role':_0x189255[_0x165d28(0x1b1)],'content':_0x189255['contents'][_0x165d28(0xdd)](_0x124afd=>{const _0x19b5a9=_0x165d28;if(_0x409559['RyMPY'](_0x124afd[_0x19b5a9(0x148)],_0x409559[_0x19b5a9(0x1ac)]))return{'text':_0x124afd[_0x19b5a9(0xbe)]};else{if(_0x124afd[_0x19b5a9(0x148)]==='image')return{'image':{'format':_0x124afd[_0x19b5a9(0x1b0)],'source':{'bytes':_0x124afd[_0x19b5a9(0x129)]}}};else throw new Error(_0x19b5a9(0xcb));}})};});}[a10_0x461202(0x107)](_0x36422b,_0x3a7989){const _0x26081f=a10_0x461202,_0xa60b76={'KmLMB':function(_0x1d9498,_0x183593){return _0x1d9498!==_0x183593;},'Ehokn':'vBwXW','uLSvH':_0x26081f(0x185),'RAGiD':_0x26081f(0x125)};let _0x1e53a2={'auto':{}};if(_0x36422b?.[_0x26081f(0xbf)])switch(_0x36422b?.[_0x26081f(0xbf)]){case a10_0x33e6da[_0x26081f(0x14d)][_0x26081f(0x1cd)]:_0x1e53a2={'any':{}};break;}return{'toolChoice':_0x1e53a2,'tools':_0x3a7989['map'](_0xe7a309=>{const _0x4d0452=_0x26081f,_0x58f0c0={'EMphl':_0x4d0452(0x174)};return _0xa60b76[_0x4d0452(0x124)](_0xa60b76[_0x4d0452(0x177)],_0xa60b76[_0x4d0452(0x1bd)])?{'toolSpec':{'name':_0xe7a309[_0x4d0452(0x10e)],'description':_0xe7a309['description'],'inputSchema':{'json':{'type':_0xa60b76['RAGiD'],'properties':_0xe7a309[_0x4d0452(0x1a0)],'additionalProperties':![]}}}}:{'type':_0x58f0c0['EMphl'],'data':_0x1819d0};})};}async[a10_0x461202(0xf7)](_0xaecfcc,_0x291289,_0x19e5e6){const _0x339ad1=a10_0x461202,_0x56e040={'ztQJV':function(_0x19bfaf,_0x2591f0){return _0x19bfaf===_0x2591f0;},'HgnYY':'WbIvO','mYqnH':'ZQvJJ','sXCds':function(_0x5da204,_0x539160){return _0x5da204(_0x539160);},'RLshp':_0x339ad1(0x19a)},_0x2bcbae=[];for(const _0x3d3941 of _0x291289){const {name:_0x427fa8,input:_0x3f06a0,toolUseId:_0x547f60}=_0x3d3941[_0x339ad1(0x129)],_0x6e4385=_0xaecfcc['find'](_0x53efd5=>_0x53efd5[_0x339ad1(0x10e)]===_0x427fa8);if(!_0x6e4385)throw new Error(_0x339ad1(0x168)+_0x427fa8+'\x22\x20not\x20found');try{if(_0x56e040['ztQJV'](_0x56e040['HgnYY'],_0x56e040[_0x339ad1(0x161)]))this[_0x339ad1(0x112)]=_0xee80e1,this[_0x339ad1(0x108)]=new _0x5f39b2[(_0x339ad1(0x13b))]({'region':_0x1a6a23,'credentials':{'accessKeyId':_0x3454ac,'secretAccessKey':_0x2319ed}});else{const _0x122c29=await _0x6e4385[_0x339ad1(0x19e)](_0x3f06a0),_0x2ad3bf=[];typeof _0x122c29===_0x339ad1(0xf9)?_0x339ad1(0x140)===_0x339ad1(0x1cb)?_0x4ba5b4():_0x2ad3bf[_0x339ad1(0x13c)]({'text':_0x122c29}):_0x2ad3bf[_0x339ad1(0x13c)]({'json':_0x122c29}),_0x2bcbae['push']({'toolResult':{'toolUseId':_0x547f60,'content':_0x2ad3bf,'status':_0x339ad1(0x1b5)}});}}catch(_0x18a1b2){console['error'](_0x339ad1(0x168)+_0x427fa8+'\x22\x20failed\x20with\x20error.',_0x18a1b2),_0x2bcbae['push']({'toolResult':{'toolUseId':_0x547f60,'content':[{'text':JSON['stringify']({'error':_0x56e040[_0x339ad1(0x1ca)](String,_0x18a1b2?.['message']??_0x18a1b2)})}],'status':_0x56e040[_0x339ad1(0x189)]}});}}_0x19e5e6[_0x339ad1(0x13c)]({'role':'user','content':_0x2bcbae});}async[a10_0x461202(0x166)](_0x33603d,_0x1e78ac,_0x3c4a07,_0x2088c9){const _0x35291e=a10_0x461202,_0x194e1a={'FgDlU':function(_0x81378f,_0xd7a641){return _0x81378f??_0xd7a641;},'yoPZq':function(_0xa8e8f2,_0x5372f1){return _0xa8e8f2===_0x5372f1;},'zlhzt':function(_0x545ed5,_0x201185){return _0x545ed5!==_0x201185;},'bDVNs':_0x35291e(0xe7)},_0x269903=this['convertLlmMessageToBedrockMessage'](_0x33603d);let _0x2c27c2=null,_0x14376b=0x0,_0x3413d4=0x0;do{_0x2c27c2=await this[_0x35291e(0x15a)](_0x269903,_0x3c4a07?.[_0x35291e(0x155)],_0x3c4a07?.[_0x35291e(0x16d)],_0x1e78ac,_0x3c4a07?.[_0x35291e(0x1a5)],_0x3c4a07?.['additionalParams'],_0x2088c9?this[_0x35291e(0x107)](_0x194e1a[_0x35291e(0x11d)](_0x3c4a07,null),_0x2088c9):undefined);if(_0x194e1a['yoPZq'](_0x2c27c2['stopReason'],BedrockStopReason[_0x35291e(0xd3)])){if(_0x194e1a[_0x35291e(0xf2)](_0x35291e(0x191),_0x35291e(0x191))){if(_0x91de6e){const _0x1eac02=_0x8746dc[_0x35291e(0xeb)](_0x56cf85,arguments);return _0x64f93b=null,_0x1eac02;}}else{const _0x13a725=_0x2c27c2[_0x35291e(0x15b)][_0x35291e(0x172)](_0x447cc5=>_0x447cc5[_0x35291e(0x148)]===_0x35291e(0x11e));_0x269903[_0x35291e(0x13c)]({'role':_0x194e1a[_0x35291e(0x16a)],'content':_0x13a725[_0x35291e(0xdd)](_0x1320f2=>({'toolUse':_0x1320f2[_0x35291e(0x129)]}))}),await this[_0x35291e(0xf7)](_0x2088c9,_0x13a725,_0x269903);if(_0x3c4a07?.[_0x35291e(0xbf)])_0x3c4a07['toolChoice']=a10_0x33e6da[_0x35291e(0x14d)][_0x35291e(0x17a)];}}_0x14376b+=_0x2c27c2['usage'][_0x35291e(0x186)],_0x3413d4+=_0x2c27c2[_0x35291e(0xe3)][_0x35291e(0x136)];}while(_0x194e1a['yoPZq'](_0x2c27c2['stopReason'],BedrockStopReason['TOOL_USE']));return _0x2c27c2[_0x35291e(0xe3)][_0x35291e(0x186)]=_0x14376b,_0x2c27c2['usage'][_0x35291e(0x136)]=_0x3413d4,{'usage':_0x2c27c2[_0x35291e(0xe3)],'contents':_0x2c27c2['content'][_0x35291e(0xdd)](_0x35af25=>{const _0x26ecde=_0x35af25['type'];return{'type':_0x26ecde,'content':_0x35af25['data']};})};}async*['callLlmStream'](_0xfcc072,_0x2f6485,_0x3fe5c5,_0x4e814f){const _0x5a470e=a10_0x461202,_0xae0fbe={'fcLiy':function(_0x1fdb2a,_0x5d7dea){return _0x1fdb2a??_0x5d7dea;},'RflGa':function(_0x524f3c,_0x34c2f3){return _0x524f3c===_0x34c2f3;},'cmWJB':'messageStop','YXqck':_0x5a470e(0x11e),'lmCEk':function(_0x17cf04,_0x2cc045){return _0x17cf04===_0x2cc045;},'gKbys':_0x5a470e(0x109),'IdzoD':_0x5a470e(0xe7)},_0x5d7314=this['convertLlmMessageToBedrockMessage'](_0xfcc072);if(_0x3fe5c5)_0x3fe5c5={..._0x3fe5c5};let _0x351d90;do{const _0x55d130=[];for await(const _0x3877fa of this[_0x5a470e(0xc5)](_0x5d7314,_0x3fe5c5?.['temperature'],_0x3fe5c5?.['maxTokens'],_0x2f6485,_0x3fe5c5?.[_0x5a470e(0x1a5)],_0x3fe5c5?.['additionalParams'],_0x4e814f?this[_0x5a470e(0x107)](_0xae0fbe[_0x5a470e(0x11c)](_0x3fe5c5,null),_0x4e814f):undefined)){if(_0xae0fbe[_0x5a470e(0x110)](_0x3877fa[_0x5a470e(0x148)],_0xae0fbe[_0x5a470e(0x1a7)]))_0x351d90=_0x3877fa;else _0xae0fbe[_0x5a470e(0x110)](_0x3877fa['type'],_0xae0fbe[_0x5a470e(0x10d)])&&_0x55d130[_0x5a470e(0x13c)](_0x3877fa);yield{'type':_0x3877fa['type'],'content':_0x3877fa['data']};}if(_0xae0fbe[_0x5a470e(0x110)](_0x351d90?.[_0x5a470e(0x129)],BedrockStopReason[_0x5a470e(0xd3)])){if(_0xae0fbe['lmCEk'](_0xae0fbe[_0x5a470e(0x151)],_0xae0fbe[_0x5a470e(0x151)])){_0x5d7314[_0x5a470e(0x13c)]({'role':_0xae0fbe[_0x5a470e(0x14e)],'content':_0x55d130[_0x5a470e(0xdd)](_0x5b4c67=>({'toolUse':_0x5b4c67[_0x5a470e(0x129)]}))}),await this['executeTools'](_0x4e814f,_0x55d130,_0x5d7314);if(_0x3fe5c5?.[_0x5a470e(0xbf)])_0x3fe5c5[_0x5a470e(0xbf)]=a10_0x33e6da[_0x5a470e(0x14d)][_0x5a470e(0x17a)];}else{if(_0x333855){const _0x42053b=_0x3448cb[_0x5a470e(0xeb)](_0x175f0b,arguments);return _0x17bd39=null,_0x42053b;}}}}while(_0x351d90?.['data']===BedrockStopReason['TOOL_USE']);}}exports[a10_0x461202(0xf5)]=BedrockLlm;function a10_0x4df03(_0x57c876){const _0x378e06=a10_0x461202,_0xfd03c={'gbhdk':function(_0x253b33,_0xbb999a){return _0x253b33(_0xbb999a);},'zCLGX':_0x378e06(0x19a),'MrqLs':function(_0x5c701b,_0x4353d9){return _0x5c701b===_0x4353d9;},'aRDuQ':_0x378e06(0xfd),'zVhNJ':_0x378e06(0x10f),'lWPlh':_0x378e06(0xf9),'UjhyJ':_0x378e06(0xbd),'wRYSG':'counter','REFeJ':function(_0x36dbb0,_0xfed49b){return _0x36dbb0===_0xfed49b;},'HeFAG':_0x378e06(0x146),'ObJCa':function(_0x32f126,_0x21813c){return _0x32f126!==_0x21813c;},'sybid':function(_0x175f3a,_0x16f17b){return _0x175f3a+_0x16f17b;},'OQkEv':function(_0x11556c,_0x575606){return _0x11556c/_0x575606;},'bcshn':'length','jBLqp':function(_0x2f8edd,_0x1106d1){return _0x2f8edd%_0x1106d1;},'WoIRm':'debu','qrBog':_0x378e06(0x152),'WCsXS':_0x378e06(0x1c9),'CkmsA':function(_0x44ea60,_0xeee792){return _0x44ea60!==_0xeee792;},'ZYLoD':_0x378e06(0x1a6),'HfDuA':'JQqAK','JvbGM':_0x378e06(0xc2),'VoIpK':'object','FuBCb':function(_0x57c65c,_0x479fd2){return _0x57c65c===_0x479fd2;},'OYUnS':_0x378e06(0xc7)};function _0x373644(_0xf7e47c){const _0x1b3366=_0x378e06,_0x84626f={'xzFCT':function(_0x53cb06,_0x15ccd4){return _0xfd03c['gbhdk'](_0x53cb06,_0x15ccd4);},'NgpVJ':_0xfd03c['zCLGX']};if(_0xfd03c[_0x1b3366(0x137)](_0xfd03c[_0x1b3366(0xc4)],_0xfd03c[_0x1b3366(0x14c)]))return{'text':_0xd04a85[_0x1b3366(0xbe)]};else{if(_0xfd03c[_0x1b3366(0x137)](typeof _0xf7e47c,_0xfd03c[_0x1b3366(0xe4)]))return function(_0x48e5c4){}['constructor'](_0xfd03c[_0x1b3366(0x1bf)])[_0x1b3366(0xeb)](_0xfd03c[_0x1b3366(0x103)]);else{if(_0xfd03c[_0x1b3366(0x198)](_0xfd03c[_0x1b3366(0x102)],_0xfd03c['HeFAG']))_0xfd03c['ObJCa'](_0xfd03c['sybid']('',_0xfd03c['OQkEv'](_0xf7e47c,_0xf7e47c))[_0xfd03c[_0x1b3366(0x178)]],0x1)||_0xfd03c[_0x1b3366(0x198)](_0xfd03c[_0x1b3366(0x1be)](_0xf7e47c,0x14),0x0)?function(){return!![];}[_0x1b3366(0xfc)](_0xfd03c[_0x1b3366(0x17f)](_0xfd03c[_0x1b3366(0x123)],_0xfd03c[_0x1b3366(0x13e)]))[_0x1b3366(0x13f)](_0xfd03c[_0x1b3366(0x1a4)]):_0xfd03c[_0x1b3366(0x196)](_0xfd03c['ZYLoD'],_0xfd03c[_0x1b3366(0x13d)])?function(){return![];}[_0x1b3366(0xfc)](_0xfd03c[_0x1b3366(0x123)]+_0xfd03c[_0x1b3366(0x13e)])[_0x1b3366(0xeb)](_0xfd03c['JvbGM']):(_0x485258['error']('Tool\x20\x22'+_0x3998d0+_0x1b3366(0x114),_0x49c4f4),_0x564aa2[_0x1b3366(0x13c)]({'toolResult':{'toolUseId':_0x339d3b,'content':[{'text':_0x1469d7[_0x1b3366(0x195)]({'error':_0x84626f['xzFCT'](_0x56fab3,_0x580bbb?.[_0x1b3366(0x11a)]??_0x4566f9)})}],'status':_0x84626f[_0x1b3366(0x1b6)]}}));else{const _0x9c87b3=_0x3e2b5e['type'];return{'type':_0x9c87b3,'content':_0x5567ae[_0x1b3366(0x129)]};}}_0xfd03c[_0x1b3366(0x143)](_0x373644,++_0xf7e47c);}}try{if(_0xfd03c['FuBCb'](_0xfd03c[_0x378e06(0xb4)],'eAFBM')){if(_0x57c876)return _0x373644;else _0x373644(0x0);}else return{'toolSpec':{'name':_0x54c050['name'],'description':_0xa3e233[_0x378e06(0xdf)],'inputSchema':{'json':{'type':_0xfd03c[_0x378e06(0x1d0)],'properties':_0x44445f[_0x378e06(0x1a0)],'additionalProperties':![]}}}};}catch(_0x257269){}}
|
|
1
|
+
'use strict';const a10_0x4540ac=a10_0x16e0;(function(_0xdb19c6,_0x3e92d7){const _0x2fef54=a10_0x16e0,_0x1eb41e=_0xdb19c6();while(!![]){try{const _0x24374f=parseInt(_0x2fef54(0x180))/0x1+-parseInt(_0x2fef54(0x177))/0x2+parseInt(_0x2fef54(0x186))/0x3+-parseInt(_0x2fef54(0x10d))/0x4*(-parseInt(_0x2fef54(0x13b))/0x5)+-parseInt(_0x2fef54(0x174))/0x6+-parseInt(_0x2fef54(0x190))/0x7+parseInt(_0x2fef54(0x188))/0x8*(parseInt(_0x2fef54(0x164))/0x9);if(_0x24374f===_0x3e92d7)break;else _0x1eb41e['push'](_0x1eb41e['shift']());}catch(_0x4eb56b){_0x1eb41e['push'](_0x1eb41e['shift']());}}}(a10_0x2f14,0x321e3));Object['defineProperty'](exports,a10_0x4540ac(0xe3),{'value':!![]}),exports[a10_0x4540ac(0x1d3)]=exports[a10_0x4540ac(0x1a6)]=void 0x0;const a10_0x39ffc8=require(a10_0x4540ac(0x1a3)),a10_0x6b5393=require('../../../license/index'),a10_0x1cd7d7=require(a10_0x4540ac(0x194));function a10_0x16e0(_0x3cd56e,_0x23b211){const _0x45d9b2=a10_0x2f14();return a10_0x16e0=function(_0x5b0296,_0x9aa0a7){_0x5b0296=_0x5b0296-0xe1;let _0x16739b=_0x45d9b2[_0x5b0296];if(a10_0x16e0['cOHtNi']===undefined){var _0x230c19=function(_0x16e021){const _0x4b0a5c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4e3264='',_0x1dcb5a='';for(let _0x46601f=0x0,_0x4c3a8a,_0x59acf9,_0x5b5819=0x0;_0x59acf9=_0x16e021['charAt'](_0x5b5819++);~_0x59acf9&&(_0x4c3a8a=_0x46601f%0x4?_0x4c3a8a*0x40+_0x59acf9:_0x59acf9,_0x46601f++%0x4)?_0x4e3264+=String['fromCharCode'](0xff&_0x4c3a8a>>(-0x2*_0x46601f&0x6)):0x0){_0x59acf9=_0x4b0a5c['indexOf'](_0x59acf9);}for(let _0x51d4ee=0x0,_0x54dff6=_0x4e3264['length'];_0x51d4ee<_0x54dff6;_0x51d4ee++){_0x1dcb5a+='%'+('00'+_0x4e3264['charCodeAt'](_0x51d4ee)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1dcb5a);};a10_0x16e0['KwgLhI']=_0x230c19,_0x3cd56e=arguments,a10_0x16e0['cOHtNi']=!![];}const _0x59eea1=_0x45d9b2[0x0],_0x332797=_0x5b0296+_0x59eea1,_0x2f14a8=_0x3cd56e[_0x332797];return!_0x2f14a8?(_0x16739b=a10_0x16e0['KwgLhI'](_0x16739b),_0x3cd56e[_0x332797]=_0x16739b):_0x16739b=_0x2f14a8,_0x16739b;},a10_0x16e0(_0x3cd56e,_0x23b211);}var BedrockStopReason;(function(BedrockStopReason){const _0x21054c=a10_0x4540ac,_0x2d2882={'oQgnC':_0x21054c(0x14e),'RVgLF':function(_0x5dcd76,_0x12befa){return _0x5dcd76(_0x12befa);},'WpkSx':_0x21054c(0x162),'wMGcV':function(_0x1688fe,_0x39c9ce){return _0x1688fe+_0x39c9ce;},'rbhJu':_0x21054c(0xee),'kIBTN':function(_0x1001d3,_0x5dc69b){return _0x1001d3+_0x5dc69b;},'ObAhv':'input','fRcUZ':function(_0x24182f,_0x110e23){return _0x24182f!==_0x110e23;},'qyeSQ':_0x21054c(0x1d5),'PDuza':function(_0x2931f6,_0xd5ffab){return _0x2931f6(_0xd5ffab);},'sBBMU':function(_0x4be48d){return _0x4be48d();},'tLQKv':_0x21054c(0x19a),'PaCks':_0x21054c(0x13e),'KcUSx':_0x21054c(0x1ab),'FkeQW':_0x21054c(0x106),'VagMo':_0x21054c(0x195),'wCLhY':'warn','yTdXU':'info','zslet':_0x21054c(0x105),'GcZKo':_0x21054c(0x13d),'fUaEM':'table','aWXxM':_0x21054c(0x1b7),'CcLYM':function(_0x4bf8cc,_0x7b2738){return _0x4bf8cc<_0x7b2738;},'WxSqJ':function(_0x37b416,_0x2f5d66){return _0x37b416===_0x2f5d66;},'zOaxZ':_0x21054c(0x17c),'dXYCo':function(_0x103fda,_0x5551ca,_0x38d8be){return _0x103fda(_0x5551ca,_0x38d8be);},'wFgGK':function(_0x57e753){return _0x57e753();},'Pyfgm':_0x21054c(0x1be),'hEuJh':_0x21054c(0x1c8),'CYxHy':'end_turn','IIEmt':_0x21054c(0x16f),'aopLU':_0x21054c(0xe6),'QOnCP':_0x21054c(0x189)},_0x5bcef3=(function(){const _0x1afc27=_0x21054c,_0x1f3c08={'MtCFe':_0x1afc27(0x128)};let _0x5282b5=!![];return function(_0x289d44,_0x29c17f){const _0x27ce6b=_0x5282b5?function(){const _0x4331c0=a10_0x16e0;if(_0x29c17f){if(_0x1f3c08[_0x4331c0(0x100)]==='QRjrk')_0x55c4cb[_0x4331c0(0x1c2)][_0x4331c0(0x19b)][_0x4331c0(0x144)]=_0x2c3f5b;else{const _0x3b9009=_0x29c17f[_0x4331c0(0x17b)](_0x289d44,arguments);return _0x29c17f=null,_0x3b9009;}}}:function(){};return _0x5282b5=![],_0x27ce6b;};}());(function(){const _0x52bb4f=_0x21054c,_0x51584c={'abFAm':_0x2d2882[_0x52bb4f(0x179)]};_0x5bcef3(this,function(){const _0x436e24=_0x52bb4f,_0x15a4c3=new RegExp(_0x2d2882[_0x436e24(0x14c)]),_0x3d1628=new RegExp(_0x436e24(0x141),'i'),_0x1c3174=_0x2d2882[_0x436e24(0x15c)](a10_0x13d836,_0x2d2882['WpkSx']);if(!_0x15a4c3['test'](_0x2d2882[_0x436e24(0x152)](_0x1c3174,_0x2d2882[_0x436e24(0x131)]))||!_0x3d1628[_0x436e24(0x1b8)](_0x2d2882[_0x436e24(0x140)](_0x1c3174,_0x2d2882[_0x436e24(0x1e1)]))){if(_0x2d2882[_0x436e24(0x115)](_0x2d2882[_0x436e24(0x1c5)],_0x2d2882[_0x436e24(0x1c5)]))return{'toolSpec':{'name':_0x18bbaf[_0x436e24(0x1ba)],'description':_0x4c4de0[_0x436e24(0xf8)],'inputSchema':{'json':{'type':_0x51584c[_0x436e24(0x1bc)],'properties':_0x4e5bb9[_0x436e24(0x12b)],'additionalProperties':![]}}}};else _0x2d2882[_0x436e24(0x1db)](_0x1c3174,'0');}else _0x2d2882['sBBMU'](a10_0x13d836);})();}());const _0x38958f=(function(){let _0x5cdcfb=!![];return function(_0x4abdfe,_0x2b12ae){const _0x2a67e8=_0x5cdcfb?function(){const _0x4bffff=a10_0x16e0;if(_0x2b12ae){const _0x4b6108=_0x2b12ae[_0x4bffff(0x17b)](_0x4abdfe,arguments);return _0x2b12ae=null,_0x4b6108;}}:function(){};return _0x5cdcfb=![],_0x2a67e8;};}()),_0x48fc7e=_0x2d2882[_0x21054c(0x1d2)](_0x38958f,this,function(){const _0x18f2d1=_0x21054c,_0x5e9327={'jjFsn':function(_0x460569,_0x228b83){return _0x460569===_0x228b83;},'WcNgo':_0x2d2882[_0x18f2d1(0x13c)],'iARzY':_0x2d2882['KcUSx']};let _0x1d9ada;try{const _0x486612=_0x2d2882[_0x18f2d1(0x15c)](Function,_0x2d2882[_0x18f2d1(0x152)](_0x2d2882[_0x18f2d1(0x170)],_0x18f2d1(0x121))+');');_0x1d9ada=_0x2d2882[_0x18f2d1(0x16e)](_0x486612);}catch(_0xa6f049){_0x1d9ada=window;}const _0x1ee377=_0x1d9ada[_0x18f2d1(0xf1)]=_0x1d9ada[_0x18f2d1(0xf1)]||{},_0x2c85a4=[_0x2d2882[_0x18f2d1(0x185)],_0x2d2882[_0x18f2d1(0xfd)],_0x2d2882['yTdXU'],_0x2d2882[_0x18f2d1(0x10f)],_0x2d2882[_0x18f2d1(0x19d)],_0x2d2882[_0x18f2d1(0x1dd)],_0x2d2882[_0x18f2d1(0x107)]];for(let index=0x0;_0x2d2882[_0x18f2d1(0x156)](index,_0x2c85a4['length']);index++){if(_0x2d2882[_0x18f2d1(0x14d)](_0x2d2882['zOaxZ'],_0x2d2882[_0x18f2d1(0x161)])){const _0x4ee719=_0x38958f[_0x18f2d1(0x160)][_0x18f2d1(0x16d)][_0x18f2d1(0xf9)](_0x38958f),_0x2ed9e3=_0x2c85a4[index],_0x511443=_0x1ee377[_0x2ed9e3]||_0x4ee719;_0x4ee719[_0x18f2d1(0x1ac)]=_0x38958f[_0x18f2d1(0xf9)](_0x38958f),_0x4ee719[_0x18f2d1(0x137)]=_0x511443[_0x18f2d1(0x137)][_0x18f2d1(0xf9)](_0x511443),_0x1ee377[_0x2ed9e3]=_0x4ee719;}else{if(_0x5e9327[_0x18f2d1(0x104)](_0x4b2e1d[_0x18f2d1(0x11c)],_0x18f2d1(0x1a7)))return{'text':_0x2c6c1c[_0x18f2d1(0x1a7)]};else{if(_0x415ce3['type']===_0x5e9327[_0x18f2d1(0x1b3)])return{'image':{'format':_0x5c7a1e[_0x18f2d1(0x120)],'source':{'bytes':_0x1254b4[_0x18f2d1(0x172)]}}};else throw new _0x5707dc(_0x5e9327['iARzY']);}}}});_0x2d2882[_0x21054c(0x163)](_0x48fc7e),BedrockStopReason[_0x2d2882[_0x21054c(0x1ce)]]='content_filtered',BedrockStopReason[_0x2d2882[_0x21054c(0x17e)]]=_0x2d2882[_0x21054c(0xe7)],BedrockStopReason[_0x2d2882[_0x21054c(0x112)]]=_0x21054c(0x145),BedrockStopReason[_0x21054c(0x191)]=_0x21054c(0x11a),BedrockStopReason[_0x2d2882[_0x21054c(0xf5)]]=_0x2d2882[_0x21054c(0x15d)],BedrockStopReason[_0x21054c(0x114)]='tool_use';}(BedrockStopReason||(exports[a10_0x4540ac(0x1a6)]=BedrockStopReason={})));class BedrockLlm{constructor(_0x19d0c0,_0xc8680c,_0x52e176,_0x5de78a){const _0x3b4704=a10_0x4540ac;this[_0x3b4704(0x1d4)]=_0x5de78a,this[_0x3b4704(0x1e2)]=new a10_0x39ffc8[(_0x3b4704(0x102))]({'region':_0x52e176,'credentials':{'accessKeyId':_0x19d0c0,'secretAccessKey':_0xc8680c}});}[a10_0x4540ac(0x15b)](){return undefined;}[a10_0x4540ac(0x147)](_0x167b7a,_0x5e2f4d=0.5,_0xa104ac=null,_0x512efd=undefined,_0x4ce44c=null,_0x49a0c9=undefined,_0x541000){const _0x72710c=a10_0x4540ac,_0x39085a={'CEWxN':_0x72710c(0x176),'rzjOT':function(_0x2534e2,_0x41610e){return _0x2534e2??_0x41610e;}};let _0x3a7499=undefined;return _0x512efd&&(typeof _0x512efd===_0x39085a[_0x72710c(0x1c3)]?_0x3a7499=[{'text':_0x512efd}]:_0x3a7499=_0x512efd),{'modelId':this['model'],'system':_0x3a7499,'messages':_0x167b7a,'inferenceConfig':{'maxTokens':_0xa104ac,'temperature':_0x5e2f4d,'topP':_0x39085a[_0x72710c(0x169)](_0x4ce44c,undefined)},'toolConfig':_0x541000};}async['invoke'](_0x135eef,_0x46d609=0.5,_0x190b71=null,_0x23182f=undefined,_0x317d30=undefined,_0x220b07=undefined,_0x559683=undefined){const _0x15daa2=a10_0x4540ac,_0x492dd5={'VtTSn':_0x15daa2(0x1c2),'UHFAk':function(_0x5c1f80,_0x1f4a17){return _0x5c1f80===_0x1f4a17;},'cRuEs':_0x15daa2(0x15f),'RSire':_0x15daa2(0x1d0),'WVUpO':_0x15daa2(0x19b),'aOnlS':_0x15daa2(0x1a7),'MIFhd':_0x15daa2(0x110),'fbxLW':_0x15daa2(0x1d6),'ZoHRK':function(_0x54991a,_0x349a5a){return _0x54991a!==_0x349a5a;},'cbGxG':_0x15daa2(0x18e),'BSexh':_0x15daa2(0xfb)};await(0x0,a10_0x6b5393[_0x15daa2(0x1d9)])();const _0x4e7d2a=this[_0x15daa2(0x147)](_0x135eef,_0x46d609,_0x190b71||this[_0x15daa2(0x15b)](),_0x23182f,_0x317d30,_0x220b07,_0x559683),_0x46e51f=await this[_0x15daa2(0x1e2)][_0x15daa2(0x1df)](new a10_0x39ffc8['ConverseCommand'](_0x4e7d2a));return{'usage':{'inputTokens':_0x46e51f[_0x15daa2(0x16b)]?.[_0x15daa2(0x117)],'outputTokens':_0x46e51f['usage']?.[_0x15daa2(0xe5)]},'content':_0x46e51f[_0x15daa2(0x155)][_0x15daa2(0xf4)][_0x15daa2(0x12c)]?.[_0x15daa2(0x166)](_0x2daa00=>{const _0x67c37=_0x15daa2;if(_0x2daa00[_0x492dd5[_0x67c37(0x149)]]){if(_0x492dd5[_0x67c37(0xe9)](_0x492dd5[_0x67c37(0x101)],_0x492dd5['cRuEs']))return{'type':_0x492dd5[_0x67c37(0x103)],'data':_0x2daa00[_0x492dd5[_0x67c37(0x149)]][_0x492dd5['WVUpO']]?.[_0x492dd5[_0x67c37(0x108)]]??_0x2daa00[_0x492dd5[_0x67c37(0x149)]][_0x492dd5[_0x67c37(0x11f)]]};else{const _0x698a0f=_0x492be9?function(){const _0x31ccaf=_0x67c37;if(_0x5ac901){const _0x1fd779=_0x261cf1[_0x31ccaf(0x17b)](_0x14de9f,arguments);return _0x515709=null,_0x1fd779;}}:function(){};return _0x4dfef7=![],_0x698a0f;}}else{if(_0x2daa00[_0x492dd5['aOnlS']])return{'type':_0x67c37(0x1a7),'data':_0x2daa00[_0x492dd5['aOnlS']]};else{if(_0x2daa00[_0x492dd5[_0x67c37(0x173)]]){if(_0x492dd5[_0x67c37(0x18f)]('icWja',_0x492dd5['cbGxG']))return{'type':_0x492dd5['fbxLW'],'data':_0x2daa00[_0x492dd5[_0x67c37(0x173)]]};else _0x5dca74=[{'text':_0x190043}];}else return{'type':_0x492dd5[_0x67c37(0x1cb)],'data':_0x2daa00};}}}),'stopReason':_0x46e51f[_0x15daa2(0x143)],'bedrockResponse':_0x46e51f};}async*[a10_0x4540ac(0x1b2)](_0x5764d1,_0x544233=0.5,_0x2f87a4=null,_0x2ea629=undefined,_0x269be8=undefined,_0x2baef0=undefined,_0x4a85b2){const _0x3a02d3=a10_0x4540ac,_0x2672e2={'oWnyl':function(_0xa94a07,_0x5d9366){return _0xa94a07+_0x5d9366;},'MIqln':_0x3a02d3(0x19c),'mzvKq':_0x3a02d3(0x1b1),'LTlBB':'action','hyWth':function(_0x312e29,_0x26b650){return _0x312e29==_0x26b650;},'UppKM':_0x3a02d3(0x1d0),'PiRdP':'reasoningContent','WflmK':_0x3a02d3(0x19b),'Kawfn':_0x3a02d3(0x1a7),'thbQd':'redactedContent','nJqmV':function(_0x1fe714,_0x1c773a){return _0x1fe714+_0x1c773a;},'cvTLP':_0x3a02d3(0x122),'ZxBSp':function(_0x2957a1,_0x558f3f){return _0x2957a1!==_0x558f3f;},'WaEUq':_0x3a02d3(0x123),'xGTNJ':_0x3a02d3(0x16c),'mCIqy':_0x3a02d3(0xf6),'CgBpX':function(_0x595960,_0xe6ac87){return _0x595960==_0xe6ac87;},'mAyHV':function(_0x27a1e8,_0x4f3c9c){return _0x27a1e8===_0x4f3c9c;},'WGjlw':_0x3a02d3(0x193),'okiEn':_0x3a02d3(0x1c4),'BSsPw':_0x3a02d3(0x1d7),'YmRtg':'begeE','fgeps':_0x3a02d3(0x1b9),'EnVcY':_0x3a02d3(0x16b),'WtVfx':function(_0x475732,_0x422ab2){return _0x475732!==_0x422ab2;},'HoDay':_0x3a02d3(0x14a),'fPUAj':_0x3a02d3(0x1d6)};await(0x0,a10_0x6b5393[_0x3a02d3(0x1d9)])();const _0x13a1a9=this[_0x3a02d3(0x147)](_0x5764d1,_0x544233,_0x2f87a4||this['getMaxTokens'](),_0x2ea629,_0x269be8,_0x2baef0,_0x4a85b2),_0xefec95=await this[_0x3a02d3(0x1e2)][_0x3a02d3(0x1df)](new a10_0x39ffc8['ConverseStreamCommand'](_0x13a1a9));if(_0xefec95['stream']){if(_0x2672e2['ZxBSp'](_0x2672e2[_0x3a02d3(0x1e4)],_0x2672e2['WaEUq']))return![];else{let _0x2fc7d5=[];for await(const _0x1b868c of _0xefec95['stream']){_0x1b868c[_0x3a02d3(0x1b0)]?.[_0x3a02d3(0x127)]?.['text']&&(_0x3a02d3(0x16c)===_0x2672e2[_0x3a02d3(0x165)]?yield{'type':_0x2672e2['Kawfn'],'data':_0x1b868c[_0x3a02d3(0x1b0)][_0x3a02d3(0x127)][_0x3a02d3(0x1a7)]}:(this[_0x3a02d3(0x1d4)]=_0x1c52c1,this[_0x3a02d3(0x1e2)]=new _0x142df2[(_0x3a02d3(0x102))]({'region':_0x193896,'credentials':{'accessKeyId':_0x123d04,'secretAccessKey':_0x1c185a}})));if(_0x1b868c[_0x3a02d3(0x1b0)]?.['delta']?.[_0x3a02d3(0x1c2)]){const _0x3e5bb9=_0x1b868c[_0x3a02d3(0x1b0)]['delta'],_0x41fd89=_0x1b868c[_0x3a02d3(0x1b0)][_0x3a02d3(0x157)];let _0x356a0e=_0x2fc7d5[_0x41fd89];if(!_0x356a0e)_0x356a0e=_0x2fc7d5[_0x41fd89]={'reasoningContent':{}};const _0x34e239=_0x3e5bb9['reasoningContent'][_0x3a02d3(0x1a7)];_0x34e239&&(_0x2672e2[_0x3a02d3(0x181)]!==_0x2672e2[_0x3a02d3(0x181)]?function(){return!![];}[_0x3a02d3(0x160)](gmHwLf[_0x3a02d3(0x17f)](gmHwLf[_0x3a02d3(0x118)],gmHwLf[_0x3a02d3(0x129)]))[_0x3a02d3(0xfc)](gmHwLf[_0x3a02d3(0x1aa)]):(!_0x356a0e['reasoningContent']['reasoningText']&&(_0x356a0e['reasoningContent']['reasoningText']={}),_0x2672e2[_0x3a02d3(0x11e)](_0x356a0e[_0x3a02d3(0x1c2)][_0x3a02d3(0x19b)][_0x3a02d3(0x1a7)],null)?_0x2672e2[_0x3a02d3(0x111)](_0x2672e2['WGjlw'],_0x2672e2[_0x3a02d3(0x1c1)])?_0x35c91c=_0x13b060:_0x356a0e['reasoningContent'][_0x3a02d3(0x19b)][_0x3a02d3(0x1a7)]=_0x34e239:_0x356a0e['reasoningContent'][_0x3a02d3(0x19b)]['text']+=_0x34e239));const _0x4f2355=_0x3e5bb9[_0x3a02d3(0x1c2)][_0x3a02d3(0x144)];_0x4f2355&&(_0x356a0e['reasoningContent'][_0x3a02d3(0x19b)][_0x3a02d3(0x144)]=_0x4f2355);const _0x274249=_0x3e5bb9[_0x3a02d3(0x1c2)][_0x3a02d3(0x110)];_0x274249?_0x2672e2[_0x3a02d3(0xea)]===_0x2672e2['BSsPw']?_0x356a0e[_0x3a02d3(0x1c2)][_0x3a02d3(0x110)]=_0x274249:(!_0x206cab['reasoningContent'][_0x3a02d3(0x19b)]&&(_0x1dacf0[_0x3a02d3(0x1c2)][_0x3a02d3(0x19b)]={}),_0x2672e2[_0x3a02d3(0x1bf)](_0x199155[_0x3a02d3(0x1c2)][_0x3a02d3(0x19b)][_0x3a02d3(0x1a7)],null)?_0x185d0d[_0x3a02d3(0x1c2)][_0x3a02d3(0x19b)][_0x3a02d3(0x1a7)]=_0x3f94b3:_0x237b78[_0x3a02d3(0x1c2)][_0x3a02d3(0x19b)][_0x3a02d3(0x1a7)]+=_0x8a4e40):yield{'type':_0x2672e2[_0x3a02d3(0x10e)],'data':_0x1b868c[_0x3a02d3(0x1b0)][_0x3a02d3(0x127)]['reasoningContent']?.[_0x3a02d3(0x1a7)],'signature':_0x1b868c[_0x3a02d3(0x1b0)][_0x3a02d3(0x127)][_0x3a02d3(0x1c2)]?.[_0x3a02d3(0x144)]??undefined};}if(_0x1b868c[_0x3a02d3(0x10a)]?.['start']?.[_0x3a02d3(0x1d6)]){if(_0x2672e2[_0x3a02d3(0x132)]===_0x3a02d3(0x17d)){const _0x2a804b=_0x2a55c6?function(){if(_0x516cab){const _0x278084=_0x59adc5['apply'](_0x16bc23,arguments);return _0xc36aad=null,_0x278084;}}:function(){};return _0x262f2e=![],_0x2a804b;}else{const _0x38fa3e=_0x1b868c[_0x3a02d3(0x10a)]['contentBlockIndex'];_0x2fc7d5[_0x38fa3e]={..._0x1b868c[_0x3a02d3(0x10a)]['start']};}}if(_0x1b868c[_0x3a02d3(0x1b0)]?.[_0x3a02d3(0x127)]?.[_0x3a02d3(0x1d6)]){const _0x5ad06a=_0x1b868c[_0x3a02d3(0x1b0)]['contentBlockIndex'];let _0x30aed0=_0x2fc7d5[_0x5ad06a];const _0x584b54=_0x1b868c['contentBlockDelta'][_0x3a02d3(0x127)][_0x3a02d3(0x1d6)]['input'];_0x584b54&&(_0x2672e2['CgBpX'](_0x30aed0[_0x3a02d3(0x1d6)]['input'],null)?_0x30aed0[_0x3a02d3(0x1d6)][_0x3a02d3(0xff)]=_0x584b54:_0x30aed0[_0x3a02d3(0x1d6)][_0x3a02d3(0xff)]+=_0x584b54);}if(_0x1b868c[_0x3a02d3(0x198)]){if(_0x2672e2[_0x3a02d3(0x111)](_0x2672e2[_0x3a02d3(0xeb)],_0x2672e2['fgeps']))yield{'type':_0x3a02d3(0x198),'data':_0x1b868c[_0x3a02d3(0x198)][_0x3a02d3(0x143)]};else return{'type':_0x2672e2[_0x3a02d3(0x10e)],'data':_0xb4536f[_0x2672e2[_0x3a02d3(0x11d)]][_0x2672e2[_0x3a02d3(0xfe)]]?.[_0x2672e2[_0x3a02d3(0x146)]]??_0x56e7f9[_0x2672e2[_0x3a02d3(0x11d)]][_0x2672e2[_0x3a02d3(0x1c9)]]};}if(_0x1b868c[_0x3a02d3(0xf3)]?.[_0x3a02d3(0x16b)]){const {usage:_0x317c0a}=_0x1b868c['metadata'],_0x74db7=_0x317c0a['inputTokens']||0x0,_0x2fa3e9=_0x317c0a[_0x3a02d3(0xe5)]||0x0;yield{'type':_0x2672e2[_0x3a02d3(0x119)],'data':JSON[_0x3a02d3(0x18a)]({'inputTokens':_0x74db7,'outputTokens':_0x2fa3e9})};}}_0x2fc7d5=_0x2fc7d5['filter'](_0x1cdd98=>!!_0x1cdd98)[_0x3a02d3(0x166)](_0x48fb9c=>{const _0x315c19=_0x3a02d3;if(!_0x48fb9c[_0x315c19(0x1d6)])return _0x48fb9c;return _0x48fb9c[_0x315c19(0x1d6)]['input']=_0x48fb9c[_0x315c19(0x1d6)][_0x315c19(0xff)]?JSON[_0x315c19(0x1a4)](_0x48fb9c[_0x315c19(0x1d6)][_0x315c19(0xff)]):{},_0x48fb9c;});const _0x218527=_0x2fc7d5[_0x3a02d3(0x12a)](_0x4c07dc=>!!_0x4c07dc[_0x3a02d3(0x1d6)]);_0x218527&&(_0x2672e2['WtVfx'](_0x2672e2[_0x3a02d3(0x1bb)],_0x3a02d3(0x14a))?function(){return![];}[_0x3a02d3(0x160)](gmHwLf[_0x3a02d3(0x1dc)](gmHwLf[_0x3a02d3(0x118)],gmHwLf['mzvKq']))[_0x3a02d3(0x17b)](gmHwLf[_0x3a02d3(0x1cc)]):yield{'type':_0x2672e2[_0x3a02d3(0x14b)],'data':_0x2fc7d5});}}}['convertLlmMessageToBedrockMessage'](_0x1720ac){const _0x4b3228=a10_0x4540ac,_0x5d2a2e={'nlRbW':_0x4b3228(0x162),'Jwtbn':_0x4b3228(0xee),'AEfwW':function(_0x22c408,_0x5483ba){return _0x22c408+_0x5483ba;},'VEviO':_0x4b3228(0xff),'wJPer':function(_0x7738c7,_0x267ef0){return _0x7738c7(_0x267ef0);},'sdLjr':function(_0xd0c61c){return _0xd0c61c();},'vfEKZ':function(_0x32fe11,_0x5c7690){return _0x32fe11===_0x5c7690;},'GlGCo':function(_0x1c858e,_0xb0d5bc){return _0x1c858e===_0xb0d5bc;},'wsBBb':_0x4b3228(0x13e),'xyzVF':'UmSMq'};return _0x1720ac['map'](_0x59d9f6=>{const _0x407e08=_0x4b3228;return{'role':_0x59d9f6[_0x407e08(0xe4)],'content':_0x59d9f6[_0x407e08(0x10b)][_0x407e08(0x166)](_0x4b2780=>{const _0x4c9261=_0x407e08,_0x4f6153={'GKiZk':'function\x20*\x5c(\x20*\x5c)','HVmXs':_0x4c9261(0x141),'VWwoh':_0x5d2a2e[_0x4c9261(0x130)],'AaRXG':_0x5d2a2e[_0x4c9261(0x15e)],'vyApP':function(_0x460c55,_0x4adaf9){const _0x38391f=_0x4c9261;return _0x5d2a2e[_0x38391f(0x12e)](_0x460c55,_0x4adaf9);},'VDfNQ':_0x5d2a2e[_0x4c9261(0x153)],'ABjWo':function(_0x54e5a0,_0x3313cb){const _0x39cb36=_0x4c9261;return _0x5d2a2e[_0x39cb36(0x19e)](_0x54e5a0,_0x3313cb);},'BjGLk':function(_0x145b5b){return _0x5d2a2e['sdLjr'](_0x145b5b);}};if(_0x5d2a2e[_0x4c9261(0x1cd)](_0x4b2780[_0x4c9261(0x11c)],'text'))return{'text':_0x4b2780[_0x4c9261(0x1a7)]};else{if(_0x5d2a2e[_0x4c9261(0x167)](_0x4b2780[_0x4c9261(0x11c)],_0x5d2a2e[_0x4c9261(0x133)]))return{'image':{'format':_0x4b2780['format'],'source':{'bytes':_0x4b2780[_0x4c9261(0x172)]}}};else{if(_0x4c9261(0x1d1)!==_0x5d2a2e[_0x4c9261(0x11b)])throw new Error('Invalid\x20message\x20type.');else{const _0x47cae3=new _0xff6f62(SsgHti['GKiZk']),_0x46370d=new _0x35a27e(SsgHti['HVmXs'],'i'),_0x36ec3f=_0x3a00d6(SsgHti[_0x4c9261(0xe1)]);!_0x47cae3[_0x4c9261(0x1b8)](_0x36ec3f+SsgHti[_0x4c9261(0x10c)])||!_0x46370d[_0x4c9261(0x1b8)](SsgHti[_0x4c9261(0x199)](_0x36ec3f,SsgHti[_0x4c9261(0x1de)]))?SsgHti[_0x4c9261(0xed)](_0x36ec3f,'0'):SsgHti[_0x4c9261(0x175)](_0x355163);}}}})};});}[a10_0x4540ac(0xe2)](_0x238622,_0x2c832f){const _0x5b49f8=a10_0x4540ac,_0x2b771b={'ksTvA':'text','InDBe':function(_0x54dbb0,_0x15b9f0){return _0x54dbb0!==_0x15b9f0;},'Dmgqe':_0x5b49f8(0x12d)};let _0x320760={'auto':{}};if(_0x238622?.['toolChoice']){if(_0x2b771b['InDBe'](_0x2b771b[_0x5b49f8(0x18b)],_0x2b771b[_0x5b49f8(0x18b)]))return{'type':_0x5b49f8(0x1a7),'data':_0x7cc40e[_0x2b771b[_0x5b49f8(0x197)]]};else switch(_0x238622?.[_0x5b49f8(0x154)]){case a10_0x1cd7d7['ToolChoice'][_0x5b49f8(0x12f)]:_0x320760={'any':{}};break;}}return{'toolChoice':_0x320760,'tools':_0x2c832f['map'](_0x2f5155=>{const _0x379dcf=_0x5b49f8;return{'toolSpec':{'name':_0x2f5155['name'],'description':_0x2f5155['description'],'inputSchema':{'json':{'type':_0x379dcf(0x19a),'properties':_0x2f5155[_0x379dcf(0x12b)],'additionalProperties':![]}}}};})};}async[a10_0x4540ac(0x1a5)](_0x469142,_0x2755b4,_0x374ed6){const _0x543df5=a10_0x4540ac,_0x3bf715={'RcDsF':function(_0x2cc3b2,_0x3be419){return _0x2cc3b2(_0x3be419);},'bTtcu':_0x543df5(0x159),'iLEDP':_0x543df5(0x176),'Nmtky':function(_0xc12545,_0x16a10a){return _0xc12545!==_0x16a10a;},'RBATh':_0x543df5(0x139),'mRRUt':_0x543df5(0x19f),'zwkBg':function(_0x393843,_0x54f324){return _0x393843(_0x54f324);}},_0x2cf8c6=[];for(const _0x596346 of _0x2755b4){const {name:_0xdff72a,input:_0x59cf1a,toolUseId:_0x3d8a8e}=_0x596346,_0x8d25b8=_0x469142[_0x543df5(0x12a)](_0xd6b5a9=>_0xd6b5a9[_0x543df5(0x1ba)]===_0xdff72a);if(!_0x8d25b8)throw new Error(_0x543df5(0x116)+_0xdff72a+_0x543df5(0x1da));try{if(_0x3bf715[_0x543df5(0x1c6)]===_0x3bf715[_0x543df5(0x1c6)]){const _0x5d7171=await _0x8d25b8[_0x543df5(0xf0)](_0x59cf1a),_0x57d544=[];typeof _0x5d7171===_0x3bf715['iLEDP']?_0x3bf715[_0x543df5(0x1a1)](_0x3bf715[_0x543df5(0x14f)],_0x3bf715[_0x543df5(0x14f)])?FBFFnk['RcDsF'](_0x8592a7,0x0):_0x57d544['push']({'text':_0x5d7171}):_0x57d544[_0x543df5(0x1b5)]({'json':_0x5d7171}),_0x2cf8c6[_0x543df5(0x1b5)]({'toolResult':{'toolUseId':_0x3d8a8e,'content':_0x57d544,'status':_0x3bf715[_0x543df5(0x150)]}});}else _0x19b192=_0x3e3ce5;}catch(_0xead7b4){console[_0x543df5(0x105)]('Tool\x20\x22'+_0xdff72a+_0x543df5(0x1a9),_0xead7b4),_0x2cf8c6['push']({'toolResult':{'toolUseId':_0x3d8a8e,'content':[{'text':JSON['stringify']({'error':_0x3bf715[_0x543df5(0x1ae)](String,_0xead7b4?.[_0x543df5(0xf4)]??_0xead7b4)})}],'status':'error'}});}}_0x374ed6[_0x543df5(0x1b5)]({'role':'user','content':_0x2cf8c6});}async[a10_0x4540ac(0x13f)](_0x57cca8,_0x167ad3,_0x2919c9,_0x540f65){const _0x331b91=a10_0x4540ac,_0x30e16f={'McUfJ':function(_0x8262b4,_0x2074d2){return _0x8262b4===_0x2074d2;}},_0xc0d725=this['convertLlmMessageToBedrockMessage'](_0x57cca8);let _0x43af99=null,_0x55a9e3=0x0,_0x2c34dc=0x0;do{_0x43af99=await this['invoke'](_0xc0d725,_0x2919c9?.[_0x331b91(0x17a)],_0x2919c9?.[_0x331b91(0x1bd)],_0x167ad3,_0x2919c9?.[_0x331b91(0x1ad)],_0x2919c9?.[_0x331b91(0xef)],_0x540f65?this[_0x331b91(0xe2)](_0x2919c9??null,_0x540f65):undefined);if(_0x30e16f[_0x331b91(0x1a2)](_0x43af99[_0x331b91(0x143)],BedrockStopReason[_0x331b91(0x114)])){const _0x37859b=_0x43af99[_0x331b91(0x12c)][_0x331b91(0xe8)](_0x1365e5=>_0x1365e5['type']==='toolUse');_0xc0d725[_0x331b91(0x1b5)](_0x43af99['bedrockResponse']['output'][_0x331b91(0xf4)]),await this[_0x331b91(0x1a5)](_0x540f65,_0x37859b['map'](_0x475255=>_0x475255[_0x331b91(0x172)]),_0xc0d725);if(_0x2919c9?.[_0x331b91(0x154)])_0x2919c9[_0x331b91(0x154)]=a10_0x1cd7d7['ToolChoice'][_0x331b91(0x18d)];}_0x55a9e3+=_0x43af99[_0x331b91(0x16b)][_0x331b91(0x117)],_0x2c34dc+=_0x43af99['usage'][_0x331b91(0xe5)];}while(_0x43af99[_0x331b91(0x143)]===BedrockStopReason[_0x331b91(0x114)]);return _0x43af99[_0x331b91(0x16b)][_0x331b91(0x117)]=_0x55a9e3,_0x43af99[_0x331b91(0x16b)]['outputTokens']=_0x2c34dc,{'usage':_0x43af99['usage'],'contents':_0x43af99[_0x331b91(0x12c)][_0x331b91(0x166)](_0x4eff63=>{const _0x263da8=_0x331b91,_0x31c6ac=_0x4eff63['type'];return{'type':_0x31c6ac,'content':_0x4eff63[_0x263da8(0x172)]};})};}async*[a10_0x4540ac(0x136)](_0x586511,_0x50ad73,_0x3f02f4,_0x3ab349){const _0x49fddc=a10_0x4540ac,_0x1d6e7b={'ssTIL':function(_0x339ce0,_0x293048){return _0x339ce0(_0x293048);},'snpAd':function(_0x21c61e,_0x42077c){return _0x21c61e+_0x42077c;},'WrUXN':_0x49fddc(0x106),'cZvCw':_0x49fddc(0x121),'hWmVg':function(_0x112c68){return _0x112c68();},'APDOx':'log','nIckb':_0x49fddc(0x192),'BNEOB':'error','ULkZH':_0x49fddc(0x13d),'mbmGK':'table','OBxRI':_0x49fddc(0x1b7),'mXXGd':function(_0x3aec0b,_0x5ba57f){return _0x3aec0b<_0x5ba57f;},'GeCJg':function(_0x5c88b4,_0x5ac31d){return _0x5c88b4??_0x5ac31d;},'goFfN':function(_0x4dcf56,_0x474569){return _0x4dcf56===_0x474569;},'SUuGJ':_0x49fddc(0x198),'rzhxI':'toolUse'},_0x467d77=this['convertLlmMessageToBedrockMessage'](_0x586511);if(_0x3f02f4)_0x3f02f4={..._0x3f02f4};let _0x35e145;do{let _0x359045=null;for await(const _0x2c3621 of this[_0x49fddc(0x1b2)](_0x467d77,_0x3f02f4?.['temperature'],_0x3f02f4?.[_0x49fddc(0x1bd)],_0x50ad73,_0x3f02f4?.[_0x49fddc(0x1ad)],_0x3f02f4?.[_0x49fddc(0xef)],_0x3ab349?this[_0x49fddc(0xe2)](_0x1d6e7b['GeCJg'](_0x3f02f4,null),_0x3ab349):undefined)){if(_0x1d6e7b[_0x49fddc(0x184)](_0x2c3621[_0x49fddc(0x11c)],_0x1d6e7b[_0x49fddc(0x182)])){if(_0x49fddc(0x138)!=='Knmpl')_0x35e145=_0x2c3621;else{let _0x1061b3;try{const _0x34b4db=pRJtcd[_0x49fddc(0xec)](_0x5edea2,pRJtcd['snpAd'](pRJtcd[_0x49fddc(0x135)]+pRJtcd[_0x49fddc(0x148)],');'));_0x1061b3=pRJtcd[_0x49fddc(0x183)](_0x34b4db);}catch(_0x2024a8){_0x1061b3=_0x475151;}const _0x166788=_0x1061b3[_0x49fddc(0xf1)]=_0x1061b3[_0x49fddc(0xf1)]||{},_0x4a59cd=[pRJtcd[_0x49fddc(0x126)],pRJtcd['nIckb'],'info',pRJtcd[_0x49fddc(0x1c7)],pRJtcd[_0x49fddc(0x1c0)],pRJtcd[_0x49fddc(0x1a8)],pRJtcd[_0x49fddc(0x1b4)]];for(let index=0x0;pRJtcd[_0x49fddc(0x168)](index,_0x4a59cd['length']);index++){const _0x3e33cc=_0xfbec9e[_0x49fddc(0x160)]['prototype'][_0x49fddc(0xf9)](_0xd0e53),_0x27505b=_0x4a59cd[index],_0x17c271=_0x166788[_0x27505b]||_0x3e33cc;_0x3e33cc['__proto__']=_0x44948f['bind'](_0xc726c1),_0x3e33cc[_0x49fddc(0x137)]=_0x17c271[_0x49fddc(0x137)][_0x49fddc(0xf9)](_0x17c271),_0x166788[_0x27505b]=_0x3e33cc;}}}else _0x1d6e7b[_0x49fddc(0x184)](_0x2c3621[_0x49fddc(0x11c)],_0x1d6e7b[_0x49fddc(0x142)])&&(_0x359045=_0x2c3621);yield{'type':_0x2c3621[_0x49fddc(0x11c)],'content':_0x2c3621[_0x49fddc(0x172)]};}if(_0x1d6e7b[_0x49fddc(0x184)](_0x35e145?.[_0x49fddc(0x172)],BedrockStopReason[_0x49fddc(0x114)])&&_0x359045){_0x467d77['push']({'role':_0x49fddc(0x15a),'content':_0x359045[_0x49fddc(0x172)]});const _0x2e48b9=_0x359045[_0x49fddc(0x172)]['filter'](_0x120dbf=>!!_0x120dbf[_0x49fddc(0x1d6)])['map'](_0x4a0682=>_0x4a0682[_0x49fddc(0x1d6)]);await this['executeTools'](_0x3ab349,_0x2e48b9,_0x467d77);if(_0x3f02f4?.[_0x49fddc(0x154)])_0x3f02f4[_0x49fddc(0x154)]=a10_0x1cd7d7[_0x49fddc(0x187)][_0x49fddc(0x18d)];}}while(_0x1d6e7b['goFfN'](_0x35e145?.[_0x49fddc(0x172)],BedrockStopReason['TOOL_USE']));}}exports[a10_0x4540ac(0x1d3)]=BedrockLlm;function a10_0x13d836(_0x51f8b8){const _0x45f576=a10_0x4540ac,_0x40ff39={'iivTU':'unknow','lmgmp':function(_0x2ed668,_0x4f80eb){return _0x2ed668===_0x4f80eb;},'LtJhL':'string','RBFwK':'counter','ZmkPK':function(_0x193298,_0x588011){return _0x193298!==_0x588011;},'IGlcm':function(_0x2fbd5e,_0x40b995){return _0x2fbd5e+_0x40b995;},'xPOYL':_0x45f576(0x1d8),'BnGDK':function(_0x9b0b4f,_0x2398ff){return _0x9b0b4f!==_0x2398ff;},'QHvJY':_0x45f576(0x13a),'XzGzq':function(_0x499031,_0x1a255f){return _0x499031+_0x1a255f;},'CiWfn':_0x45f576(0x1b1),'kmjld':'action','bcBYT':_0x45f576(0x171),'YXJNv':_0x45f576(0x19c),'WSySK':'stateObject','wMLUv':function(_0x26c989,_0x5db369){return _0x26c989(_0x5db369);},'GdKNE':function(_0x359171,_0x3c7b13){return _0x359171!==_0x3c7b13;},'eDvJd':_0x45f576(0xf2),'XPBfp':_0x45f576(0x134),'fDnxQ':function(_0x349ab7,_0x1a5b8d){return _0x349ab7(_0x1a5b8d);}};function _0x43632b(_0x3f450f){const _0x130441=_0x45f576;if(_0x40ff39[_0x130441(0x151)](typeof _0x3f450f,_0x40ff39[_0x130441(0x1af)]))return function(_0x4b2d35){}['constructor']('while\x20(true)\x20{}')['apply'](_0x40ff39[_0x130441(0x16a)]);else{if(_0x40ff39['ZmkPK'](_0x40ff39['IGlcm']('',_0x3f450f/_0x3f450f)[_0x40ff39[_0x130441(0x124)]],0x1)||_0x3f450f%0x14===0x0){if(_0x40ff39[_0x130441(0x1e3)](_0x130441(0x109),_0x40ff39['QHvJY']))(function(){return!![];}[_0x130441(0x160)](_0x40ff39[_0x130441(0x1ca)](_0x130441(0x19c),_0x40ff39[_0x130441(0xfa)]))[_0x130441(0xfc)](_0x40ff39[_0x130441(0x1a0)]));else return{'type':_0x40ff39[_0x130441(0x113)],'data':_0x4b5c60};}else{if(_0x40ff39[_0x130441(0x18c)]!==_0x130441(0x171)){const _0x51e529=_0x32b258[_0x130441(0x10a)][_0x130441(0x157)];_0x3e7297[_0x51e529]={..._0x1bddc4['contentBlockStart'][_0x130441(0x1e0)]};}else(function(){return![];}[_0x130441(0x160)](_0x40ff39[_0x130441(0x1cf)](_0x40ff39[_0x130441(0x178)],_0x40ff39[_0x130441(0xfa)]))[_0x130441(0x17b)](_0x40ff39[_0x130441(0x158)]));}}_0x40ff39[_0x130441(0xf7)](_0x43632b,++_0x3f450f);}try{if(_0x40ff39[_0x45f576(0x125)](_0x40ff39['eDvJd'],_0x40ff39[_0x45f576(0x1b6)])){if(_0x51f8b8)return _0x43632b;else _0x40ff39[_0x45f576(0x196)](_0x43632b,0x0);}else return _0x21ca8d;}catch(_0x2b7670){}}function a10_0x2f14(){const _0x292fff=['Buf5sfy','suLfBxq','AwL2vfu','ve9ptf9vu0u','zLjJvvO','vg9VBcaI','Aw5WDxruB2TLBNm','tuLXBg4','rw5wy1K','Bwf4x3rVA2vUCW','EhL6vKy','DhLWzq','ugLszfa','q2DcCfG','tuLgAgq','zM9YBwf0','E30Uy29UC3rYDwn0B3iOiNjLDhvYBIb0AgLZiIKOicK','C3rHDgvpyMPLy3q','yLLxCg8','EfbpwuW','r2rltKu','qvbet3G','zgvSDge','AwzgBNO','BxP2s3e','zMLUza','Aw5WDxrty2HLBwe','y29UDgvUDa','Evfvrwu','quvMD1C','rK9sq0ve','BMXsyLC','CMjOsNu','ww1sDgC','D3ncqMi','t21TDKW','v3jvwe4','y2fSBeXSBvn0CMvHBq','Dg9tDhjPBMC','ENHpvKi','thHpz28','AKn1z0S','mtaZmfjrv1reCG','ugfdA3m','zxHJzxb0Aw9U','Aw1Hz2u','y2fSBeXSBq','A0Lcve4','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq','CNPOEeK','C3rVCfjLyxnVBG','C2LNBMf0DxjL','z3vHCMrYywLSx2LUDgvYDMvUzwq','s2f3zM4','y3jLyxrLuMvXDwvZDa','y1P2q3C','vNruu24','v0TOAwC','zLbvqwO','B1fNBKm','v3HtCuO','zNvUy3rPB24GkLWOicPCkq','uKjbvgG','Bvjsvxq','Bg1NBxa','D01hy1y','vKv2Au8','Dg9VBenOB2LJzq','B3v0Chv0','q2nmwu0','y29UDgvUDejSB2nRsw5KzxG','v1n5u0S','rfnYqNm','yxnZAxn0yw50','z2v0twf4vg9Rzw5Z','uLzNtey','uu9Uq1a','sND0yM4','EeTrBMW','y29UC3rYDwn0B3i','EK9HEfO','Aw5PDa','D0zNr0S','mZK0mty0ELvACfDj','EeDutKO','BwfW','r2Xhq28','BvHyr2q','CNPQt1q','uKjgD0S','DxnHz2u','Dhf6sLC','ChjVDg90ExbL','C0jctvu','r1vbuKrsquLmx0LovevsvKvoruq','rMTLuvC','uKnKBLu','zgf0yq','zMj4tfC','mtm1mtu0mNHczgTjsq','qMPhtgS','C3rYAw5N','otGWndb6rvnHshG','wvHktNy','DeXrs3y','DgvTCgvYyxr1CMu','yxbWBhK','CufPtvu','uMLMs2C','Aev1sMG','B1DUEwW','mZyZnJC5u1zWy25H','BunjCxK','u1v1r0O','AfDTvMC','z29gzK4','vMfNtw8','mZm2nZaYzxPUs2nv','vg9VBenOB2LJzq','mtzfDKj3q24','C3rVCf9Zzxf1zw5Jzq','C3rYAw5NAwz5','rg1NCwu','yMncwvq','qvvutW','rMnUBMO','wM9iuKS','nJy0mdqXtM1iu0LL','tufyx1rps0vouW','D2fYBG','tujJs2O','lI4VlI4VDg9VBc50ExbL','Bg9N','zKrUEfe','A3nuDKe','BwvZC2fNzvn0B3a','DNLbCfa','B2jQzwn0','CMvHC29UAw5Nvgv4Da','zgvIDq','r2nAs28','D0Pqzxi','C3vJy2vZCW','A21QBgq','tM10A3K','twnvzKO','qgf3CY1ZzgSVy2XPzw50lwjLzhjVy2STCNvUDgLTzq','CgfYC2u','zxHLy3v0zvrVB2XZ','qMvKCM9JA1n0B3bszwfZB24','Dgv4Da','BwjTr0S','iIbMywLSzwqGD2L0AcbLCNjVCI4','tfrSqKi','sw52ywXPzcbTzxnZywDLihr5CguU','x19WCM90B19F','Dg9Wua','ENDRqMC','thrkAeW','y29UDgvUDejSB2nRrgvSDge','z2DLCG','Aw52B2TLu3rYzwfT','v2noz28','t0j4uKK','ChvZAa','wfbczNa','DhjHy2u','DgvZDa','t1rQrLK','BMfTzq','sg9eyxK','ywjgqw0','Bwf4vg9Rzw5Z','q09ovevovf9gsuXurvjfra','AhLxDgG','vuXRwKG','B2TPrw4','CMvHC29UAw5Nq29UDgvUDa','q0vxEe4','vg9osKy','CxLLu1e','yLr0y3u','qK5ft0i','ru5ex1rvuK4','DgHIuwq','whPhENe','qLnLEgG','y3zutfa','DMzfs1O','uhLMz20','suDSy20','CMvHC29UAw5N','v3Hlt1a','zfHzq28','qMvKCM9JA0XSBq','Bw9KzwW','vxPiBKG','Dg9VBfvZzq','yMTHCLK','BgvUz3rO','y2HLy2TbCgLmAwnLBNnL','iIbUB3qGzM91BMq','uer1EMe','BKPXBvy','zLvHru0','vKrMtLe','C2vUza','C3rHCNq','t2jbAhy','y2XPzw50','qM5hreS','v2ffvxe','vLD3B2G','y29UDMvYDeXSBvrVB2XgDw5JDgLVBLrVvg9VBenVBMzPzW','x19LC01VzhvSzq','CM9Szq','B3v0Chv0vg9Rzw5Z','u1rpuf9trvfvru5drq','q1L4shK','zMLSDgvY','vuHgqwS','qLnZuhC','zMDLChm','C3nusuW','qujQv28','y2HHAw4','ywrKAxrPB25HBfbHCMfTCW','Dg9VBenHBgW','y29UC29Szq','EfbPuge','Bwv0ywrHDge','BwvZC2fNzq','yw9Wtfu','v1z0rfm','D01mvxy','zgvZy3jPChrPB24','yMLUza','q2LxzM4','Dw5RBM93','y2fSBa','D0nmAfK','v2zSBuS','Aw5WDxq','txrdrMu','y1j1rxm','qMvKCM9JA1j1BNrPBwvdBgLLBNq','uLnPCMu','AMPgC24','zxjYB3i','CMv0DxjUicHMDw5JDgLVBIGPia','yvDyEe0','yu9UBfm','seXkrMW','y29UDgvUDejSB2nRu3rHCNq','y29UDgvUDhm','qwfsweC','mJeYveDKzg1k','vxbWs00','ENnSzxq','CMvKywn0zwrdB250zw50'];a10_0x2f14=function(){return _0x292fff;};return a10_0x2f14();}
|
|
@@ -3,24 +3,18 @@ import { BedrockAdditionalArgs, BedrockLlm } from './bedrock-llm';
|
|
|
3
3
|
/**
|
|
4
4
|
* Additional configuration arguments specific to Claude models on AWS Bedrock.
|
|
5
5
|
*
|
|
6
|
-
* This type alias extends the base Bedrock configuration with Claude-specific parameters
|
|
7
|
-
*
|
|
8
|
-
* max tokens, top-p sampling, and other model-specific settings.
|
|
6
|
+
* This type alias extends the base Bedrock configuration with Claude-specific parameters that can be used to customize the behavior of Claude models, such as temperature, max
|
|
7
|
+
* tokens, top-p sampling, and other model-specific settings.
|
|
9
8
|
*
|
|
10
9
|
* @see BedrockAdditionalArgs - Base configuration type that this extends
|
|
11
10
|
*/
|
|
12
11
|
export type ClaudeAdditionalArgs = BedrockAdditionalArgs;
|
|
13
12
|
|
|
14
|
-
/**
|
|
15
|
-
* API client for Anthropic Claude models on AWS Bedrock
|
|
16
|
-
* Extends the base BedrockLlm with Claude-specific functionality
|
|
17
|
-
*/
|
|
13
|
+
/** API client for Anthropic Claude models on AWS Bedrock Extends the base BedrockLlm with Claude-specific functionality */
|
|
18
14
|
export class ClaudeLlm extends BedrockLlm<ClaudeAdditionalArgs> {
|
|
19
15
|
/**
|
|
20
|
-
* Estimates the number of tokens that would be consumed by the given text data.
|
|
21
|
-
*
|
|
22
|
-
* which is useful for cost estimation, input validation, and determining if content
|
|
23
|
-
* fits within model token limits.
|
|
16
|
+
* Estimates the number of tokens that would be consumed by the given text data. This method provides an approximation of token count without making an actual API call, which
|
|
17
|
+
* is useful for cost estimation, input validation, and determining if content fits within model token limits.
|
|
24
18
|
*
|
|
25
19
|
* @param data - The text content to estimate token count for
|
|
26
20
|
* @returns Promise resolving to the estimated number of tokens
|