@ax-llm/ax 11.0.49 → 11.0.51
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/index.cjs +3650 -2362
- package/index.cjs.map +1 -1
- package/index.d.cts +718 -83
- package/index.d.ts +718 -83
- package/index.js +3694 -2413
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -31,21 +31,22 @@ interface AxAPIConfig extends AxAPI, RequestValidation, ResponseValidation {
|
|
|
31
31
|
}
|
|
32
32
|
declare class AxAIServiceError extends Error {
|
|
33
33
|
readonly url: string;
|
|
34
|
-
readonly requestBody
|
|
34
|
+
readonly requestBody: unknown;
|
|
35
|
+
readonly responseBody: unknown;
|
|
35
36
|
readonly timestamp: string;
|
|
36
37
|
readonly errorId: string;
|
|
37
38
|
readonly context: Record<string, unknown>;
|
|
38
|
-
constructor(message: string, url: string, requestBody
|
|
39
|
+
constructor(message: string, url: string, requestBody: unknown, responseBody: unknown, context?: Record<string, unknown>);
|
|
39
40
|
toString(): string;
|
|
40
41
|
}
|
|
41
42
|
declare class AxAIServiceStatusError extends AxAIServiceError {
|
|
42
43
|
readonly status: number;
|
|
43
44
|
readonly statusText: string;
|
|
44
|
-
constructor(status: number, statusText: string, url: string, requestBody
|
|
45
|
+
constructor(status: number, statusText: string, url: string, requestBody: unknown, responseBody: unknown, context?: Record<string, unknown>);
|
|
45
46
|
}
|
|
46
47
|
declare class AxAIServiceNetworkError extends AxAIServiceError {
|
|
47
48
|
readonly originalError: Error;
|
|
48
|
-
constructor(originalError: Error, url: string, requestBody
|
|
49
|
+
constructor(originalError: Error, url: string, requestBody: unknown, responseBody: unknown, context?: Record<string, unknown>);
|
|
49
50
|
}
|
|
50
51
|
declare class AxAIServiceResponseError extends AxAIServiceError {
|
|
51
52
|
constructor(message: string, url: string, requestBody?: unknown, context?: Record<string, unknown>);
|
|
@@ -58,7 +59,7 @@ declare class AxAIServiceTimeoutError extends AxAIServiceError {
|
|
|
58
59
|
constructor(url: string, timeoutMs: number, requestBody?: unknown, context?: Record<string, unknown>);
|
|
59
60
|
}
|
|
60
61
|
declare class AxAIServiceAuthenticationError extends AxAIServiceError {
|
|
61
|
-
constructor(url: string, requestBody
|
|
62
|
+
constructor(url: string, requestBody: unknown, responseBody: unknown, context?: Record<string, unknown>);
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
interface AxAIFeatures {
|
|
@@ -332,7 +333,7 @@ type AxRateLimiterFunction = <T = unknown>(reqFunc: () => Promise<T | ReadableSt
|
|
|
332
333
|
}>) => Promise<T | ReadableStream$1<T>>;
|
|
333
334
|
type AxAIPromptConfig = {
|
|
334
335
|
stream?: boolean;
|
|
335
|
-
thinkingTokenBudget?: 'minimal' | 'low' | 'medium' | 'high' | 'highest';
|
|
336
|
+
thinkingTokenBudget?: 'minimal' | 'low' | 'medium' | 'high' | 'highest' | 'none';
|
|
336
337
|
};
|
|
337
338
|
type AxAIServiceOptions = {
|
|
338
339
|
debug?: boolean;
|
|
@@ -621,6 +622,7 @@ type AxAIOpenAIConfig<TModel, TEmbedModel> = Omit<AxModelConfig, 'topK'> & {
|
|
|
621
622
|
dimensions?: number;
|
|
622
623
|
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
623
624
|
store?: boolean;
|
|
625
|
+
serviceTier?: 'auto' | 'default' | 'flex';
|
|
624
626
|
webSearchOptions?: {
|
|
625
627
|
searchContextSize?: 'low' | 'medium' | 'high';
|
|
626
628
|
userLocation?: {
|
|
@@ -1321,6 +1323,507 @@ declare class AxAIOllama extends AxAIOpenAIBase<string, string> {
|
|
|
1321
1323
|
constructor({ apiKey, url, config, options, models, }: Readonly<Omit<AxAIOllamaArgs, 'name'>>);
|
|
1322
1324
|
}
|
|
1323
1325
|
|
|
1326
|
+
interface AxAIOpenAIResponsesInputTextContentPart {
|
|
1327
|
+
readonly type: 'text';
|
|
1328
|
+
text: string;
|
|
1329
|
+
}
|
|
1330
|
+
interface AxAIOpenAIResponsesInputImageUrlContentPart {
|
|
1331
|
+
readonly type: 'image_url';
|
|
1332
|
+
readonly image_url: {
|
|
1333
|
+
readonly url: string;
|
|
1334
|
+
readonly details?: 'low' | 'high' | 'auto';
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
interface AxAIOpenAIResponsesInputAudioContentPart {
|
|
1338
|
+
readonly type: 'input_audio';
|
|
1339
|
+
readonly input_audio: {
|
|
1340
|
+
readonly data: string;
|
|
1341
|
+
readonly format?: string;
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
type AxAIOpenAIResponsesInputContentPart = AxAIOpenAIResponsesInputTextContentPart | AxAIOpenAIResponsesInputImageUrlContentPart | AxAIOpenAIResponsesInputAudioContentPart;
|
|
1345
|
+
interface AxAIOpenAIResponsesInputMessageItem {
|
|
1346
|
+
readonly type: 'message';
|
|
1347
|
+
readonly role: 'system' | 'user' | 'assistant' | 'developer';
|
|
1348
|
+
readonly content: string | ReadonlyArray<AxAIOpenAIResponsesInputContentPart>;
|
|
1349
|
+
readonly name?: string;
|
|
1350
|
+
}
|
|
1351
|
+
interface AxAIOpenAIResponsesInputFunctionCallItem {
|
|
1352
|
+
readonly type: 'function_call';
|
|
1353
|
+
readonly id?: string;
|
|
1354
|
+
readonly call_id: string;
|
|
1355
|
+
readonly name: string;
|
|
1356
|
+
readonly arguments: string;
|
|
1357
|
+
}
|
|
1358
|
+
interface AxAIOpenAIResponsesInputFunctionCallOutputItem {
|
|
1359
|
+
readonly type: 'function_call_output';
|
|
1360
|
+
readonly id?: string;
|
|
1361
|
+
readonly call_id: string;
|
|
1362
|
+
readonly output: string;
|
|
1363
|
+
}
|
|
1364
|
+
type AxAIOpenAIResponsesInputItem = string | AxAIOpenAIResponsesInputMessageItem | AxAIOpenAIResponsesInputFunctionCallItem | AxAIOpenAIResponsesInputFunctionCallOutputItem;
|
|
1365
|
+
interface AxAIOpenAIResponsesDefineFunctionTool {
|
|
1366
|
+
readonly type: 'function';
|
|
1367
|
+
readonly name: string;
|
|
1368
|
+
readonly description?: string;
|
|
1369
|
+
readonly parameters: object;
|
|
1370
|
+
readonly strict?: boolean;
|
|
1371
|
+
}
|
|
1372
|
+
type AxAIOpenAIResponsesToolDefinition = AxAIOpenAIResponsesDefineFunctionTool;
|
|
1373
|
+
type AxAIOpenAIResponsesToolChoice = 'none' | 'auto' | 'required' | {
|
|
1374
|
+
readonly type: 'function';
|
|
1375
|
+
readonly name: string;
|
|
1376
|
+
} | {
|
|
1377
|
+
readonly type: 'file_search';
|
|
1378
|
+
};
|
|
1379
|
+
interface AxAIOpenAIResponsesRequest<TModel = string> {
|
|
1380
|
+
readonly input: string | ReadonlyArray<AxAIOpenAIResponsesInputItem>;
|
|
1381
|
+
readonly model: TModel;
|
|
1382
|
+
readonly background?: boolean | null;
|
|
1383
|
+
readonly include?: ReadonlyArray<'file_search_call.results' | 'message.input_image.image_url' | 'computer_call_output.output.image_url' | 'reasoning.encrypted_content' | 'code_interpreter_call.outputs'> | null;
|
|
1384
|
+
readonly instructions?: string | null;
|
|
1385
|
+
readonly max_output_tokens?: number | null;
|
|
1386
|
+
readonly metadata?: Readonly<Record<string, string>> | null;
|
|
1387
|
+
readonly parallel_tool_calls?: boolean | null;
|
|
1388
|
+
readonly previous_response_id?: string | null;
|
|
1389
|
+
readonly reasoning?: {
|
|
1390
|
+
readonly effort?: 'low' | 'medium' | 'high' | null;
|
|
1391
|
+
readonly summary?: 'auto' | 'concise' | 'detailed' | null;
|
|
1392
|
+
} | null;
|
|
1393
|
+
readonly service_tier?: 'auto' | 'default' | 'flex' | null;
|
|
1394
|
+
readonly store?: boolean | null;
|
|
1395
|
+
readonly stream?: boolean | null;
|
|
1396
|
+
readonly temperature?: number | null;
|
|
1397
|
+
readonly text?: {
|
|
1398
|
+
readonly format?: {
|
|
1399
|
+
readonly type: 'text';
|
|
1400
|
+
} | {
|
|
1401
|
+
readonly type: 'json_object';
|
|
1402
|
+
} | {
|
|
1403
|
+
readonly type: 'json_schema';
|
|
1404
|
+
readonly json_schema?: object;
|
|
1405
|
+
} | null;
|
|
1406
|
+
} | null;
|
|
1407
|
+
readonly tool_choice?: AxAIOpenAIResponsesToolChoice | null;
|
|
1408
|
+
readonly tools?: ReadonlyArray<AxAIOpenAIResponsesToolDefinition> | null;
|
|
1409
|
+
readonly top_p?: number | null;
|
|
1410
|
+
readonly truncation?: 'auto' | 'disabled' | null;
|
|
1411
|
+
readonly user?: string | null;
|
|
1412
|
+
readonly seed?: number | null;
|
|
1413
|
+
}
|
|
1414
|
+
interface AxAIOpenAIResponsesOutputMessageItem {
|
|
1415
|
+
type: 'message';
|
|
1416
|
+
id: string;
|
|
1417
|
+
role: 'assistant';
|
|
1418
|
+
content: ReadonlyArray<AxAIOpenAIResponsesOutputTextContentPart | AxAIOpenAIResponsesOutputRefusalContentPart>;
|
|
1419
|
+
status: 'in_progress' | 'completed' | 'incomplete';
|
|
1420
|
+
}
|
|
1421
|
+
interface AxAIOpenAIResponsesFunctionCallItem {
|
|
1422
|
+
type: 'function_call';
|
|
1423
|
+
id: string;
|
|
1424
|
+
call_id: string;
|
|
1425
|
+
name: string;
|
|
1426
|
+
arguments: string;
|
|
1427
|
+
status?: 'in_progress' | 'completed' | 'incomplete' | 'searching' | 'failed';
|
|
1428
|
+
}
|
|
1429
|
+
interface AxAIOpenAIResponsesReasoningItem {
|
|
1430
|
+
readonly type: 'reasoning';
|
|
1431
|
+
readonly id: string;
|
|
1432
|
+
readonly summary: ReadonlyArray<string | object>;
|
|
1433
|
+
readonly encrypted_content?: string | null;
|
|
1434
|
+
readonly status?: 'in_progress' | 'completed' | 'incomplete';
|
|
1435
|
+
}
|
|
1436
|
+
interface AxAIOpenAIResponsesOutputTextContentPart {
|
|
1437
|
+
readonly type: 'output_text';
|
|
1438
|
+
readonly text: string;
|
|
1439
|
+
readonly annotations?: ReadonlyArray<unknown>;
|
|
1440
|
+
}
|
|
1441
|
+
interface AxAIOpenAIResponsesOutputRefusalContentPart {
|
|
1442
|
+
readonly type: 'refusal';
|
|
1443
|
+
readonly refusal: string;
|
|
1444
|
+
}
|
|
1445
|
+
interface AxAIOpenAIResponsesReasoningSummaryPart {
|
|
1446
|
+
readonly type: 'summary_text';
|
|
1447
|
+
readonly text: string;
|
|
1448
|
+
}
|
|
1449
|
+
type AxAIOpenAIResponsesOutputItem = AxAIOpenAIResponsesOutputMessageItem | AxAIOpenAIResponsesFunctionCallItem | AxAIOpenAIResponsesReasoningItem | AxAIOpenAIResponsesFileSearchToolCall | AxAIOpenAIResponsesWebSearchToolCall | AxAIOpenAIResponsesComputerToolCall | AxAIOpenAIResponsesCodeInterpreterToolCall | AxAIOpenAIResponsesImageGenerationToolCall | AxAIOpenAIResponsesLocalShellToolCall | AxAIOpenAIResponsesMCPToolCall;
|
|
1450
|
+
interface AxAIOpenAIResponsesResponse {
|
|
1451
|
+
readonly id: string;
|
|
1452
|
+
readonly object: string;
|
|
1453
|
+
readonly created: number;
|
|
1454
|
+
readonly model: string;
|
|
1455
|
+
readonly output: ReadonlyArray<AxAIOpenAIResponsesOutputItem>;
|
|
1456
|
+
readonly usage?: {
|
|
1457
|
+
readonly prompt_tokens: number;
|
|
1458
|
+
readonly completion_tokens: number;
|
|
1459
|
+
readonly total_tokens: number;
|
|
1460
|
+
} | null;
|
|
1461
|
+
}
|
|
1462
|
+
interface AxAIOpenAIResponsesStreamEventBase {
|
|
1463
|
+
readonly type: string;
|
|
1464
|
+
readonly sequence_number: number;
|
|
1465
|
+
}
|
|
1466
|
+
interface AxAIOpenAIResponsesResponseCreatedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1467
|
+
readonly type: 'response.created';
|
|
1468
|
+
readonly response: Readonly<AxAIOpenAIResponsesResponse>;
|
|
1469
|
+
}
|
|
1470
|
+
interface AxAIOpenAIResponsesResponseInProgressEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1471
|
+
readonly type: 'response.in_progress';
|
|
1472
|
+
readonly response: Readonly<AxAIOpenAIResponsesResponse>;
|
|
1473
|
+
}
|
|
1474
|
+
interface AxAIOpenAIResponsesResponseCompletedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1475
|
+
readonly type: 'response.completed';
|
|
1476
|
+
readonly response: Readonly<AxAIOpenAIResponsesResponse>;
|
|
1477
|
+
}
|
|
1478
|
+
interface AxAIOpenAIResponsesResponseFailedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1479
|
+
readonly type: 'response.failed';
|
|
1480
|
+
readonly response: Readonly<AxAIOpenAIResponsesResponse>;
|
|
1481
|
+
}
|
|
1482
|
+
interface AxAIOpenAIResponsesResponseIncompleteEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1483
|
+
readonly type: 'response.incomplete';
|
|
1484
|
+
readonly response: Readonly<AxAIOpenAIResponsesResponse>;
|
|
1485
|
+
}
|
|
1486
|
+
interface AxAIOpenAIResponsesResponseQueuedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1487
|
+
readonly type: 'response.queued';
|
|
1488
|
+
readonly response: Readonly<AxAIOpenAIResponsesResponse>;
|
|
1489
|
+
}
|
|
1490
|
+
interface AxAIOpenAIResponsesOutputItemAddedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1491
|
+
readonly type: 'response.output_item.added';
|
|
1492
|
+
readonly output_index: number;
|
|
1493
|
+
readonly item: Readonly<AxAIOpenAIResponsesOutputItem>;
|
|
1494
|
+
}
|
|
1495
|
+
interface AxAIOpenAIResponsesOutputItemDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1496
|
+
readonly type: 'response.output_item.done';
|
|
1497
|
+
readonly output_index: number;
|
|
1498
|
+
readonly item: Readonly<AxAIOpenAIResponsesOutputItem>;
|
|
1499
|
+
}
|
|
1500
|
+
interface AxAIOpenAIResponsesContentPartAddedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1501
|
+
readonly type: 'response.content_part.added';
|
|
1502
|
+
readonly item_id: string;
|
|
1503
|
+
readonly output_index: number;
|
|
1504
|
+
readonly content_index: number;
|
|
1505
|
+
readonly part: Readonly<AxAIOpenAIResponsesOutputTextContentPart | AxAIOpenAIResponsesOutputRefusalContentPart>;
|
|
1506
|
+
}
|
|
1507
|
+
interface AxAIOpenAIResponsesContentPartDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1508
|
+
readonly type: 'response.content_part.done';
|
|
1509
|
+
readonly item_id: string;
|
|
1510
|
+
readonly output_index: number;
|
|
1511
|
+
readonly content_index: number;
|
|
1512
|
+
readonly part: Readonly<AxAIOpenAIResponsesOutputTextContentPart | AxAIOpenAIResponsesOutputRefusalContentPart>;
|
|
1513
|
+
}
|
|
1514
|
+
interface AxAIOpenAIResponsesOutputTextDeltaEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1515
|
+
readonly type: 'response.output_text.delta';
|
|
1516
|
+
readonly item_id: string;
|
|
1517
|
+
readonly output_index: number;
|
|
1518
|
+
readonly content_index: number;
|
|
1519
|
+
readonly delta: string;
|
|
1520
|
+
}
|
|
1521
|
+
interface AxAIOpenAIResponsesOutputTextDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1522
|
+
readonly type: 'response.output_text.done';
|
|
1523
|
+
readonly item_id: string;
|
|
1524
|
+
readonly output_index: number;
|
|
1525
|
+
readonly content_index: number;
|
|
1526
|
+
readonly text: string;
|
|
1527
|
+
}
|
|
1528
|
+
interface AxAIOpenAIResponsesRefusalDeltaEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1529
|
+
readonly type: 'response.refusal.delta';
|
|
1530
|
+
readonly item_id: string;
|
|
1531
|
+
readonly output_index: number;
|
|
1532
|
+
readonly content_index: number;
|
|
1533
|
+
readonly delta: string;
|
|
1534
|
+
}
|
|
1535
|
+
interface AxAIOpenAIResponsesRefusalDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1536
|
+
readonly type: 'response.refusal.done';
|
|
1537
|
+
readonly item_id: string;
|
|
1538
|
+
readonly output_index: number;
|
|
1539
|
+
readonly content_index: number;
|
|
1540
|
+
readonly refusal: string;
|
|
1541
|
+
}
|
|
1542
|
+
interface AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1543
|
+
readonly type: 'response.function_call_arguments.delta';
|
|
1544
|
+
readonly item_id: string;
|
|
1545
|
+
readonly output_index: number;
|
|
1546
|
+
readonly delta: string;
|
|
1547
|
+
}
|
|
1548
|
+
interface AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1549
|
+
readonly type: 'response.function_call_arguments.done';
|
|
1550
|
+
readonly item_id: string;
|
|
1551
|
+
readonly output_index: number;
|
|
1552
|
+
readonly arguments: string;
|
|
1553
|
+
}
|
|
1554
|
+
interface AxAIOpenAIResponsesFileSearchCallInProgressEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1555
|
+
readonly type: 'response.file_search_call.in_progress';
|
|
1556
|
+
readonly item_id: string;
|
|
1557
|
+
readonly output_index: number;
|
|
1558
|
+
}
|
|
1559
|
+
interface AxAIOpenAIResponsesFileSearchCallSearchingEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1560
|
+
readonly type: 'response.file_search_call.searching';
|
|
1561
|
+
readonly item_id: string;
|
|
1562
|
+
readonly output_index: number;
|
|
1563
|
+
}
|
|
1564
|
+
interface AxAIOpenAIResponsesFileSearchCallCompletedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1565
|
+
readonly type: 'response.file_search_call.completed';
|
|
1566
|
+
readonly item_id: string;
|
|
1567
|
+
readonly output_index: number;
|
|
1568
|
+
}
|
|
1569
|
+
interface AxAIOpenAIResponsesWebSearchCallInProgressEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1570
|
+
readonly type: 'response.web_search_call.in_progress';
|
|
1571
|
+
readonly item_id: string;
|
|
1572
|
+
readonly output_index: number;
|
|
1573
|
+
}
|
|
1574
|
+
interface AxAIOpenAIResponsesWebSearchCallSearchingEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1575
|
+
readonly type: 'response.web_search_call.searching';
|
|
1576
|
+
readonly item_id: string;
|
|
1577
|
+
readonly output_index: number;
|
|
1578
|
+
}
|
|
1579
|
+
interface AxAIOpenAIResponsesWebSearchCallCompletedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1580
|
+
readonly type: 'response.web_search_call.completed';
|
|
1581
|
+
readonly item_id: string;
|
|
1582
|
+
readonly output_index: number;
|
|
1583
|
+
}
|
|
1584
|
+
interface AxAIOpenAIResponsesReasoningDeltaEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1585
|
+
readonly type: 'response.reasoning.delta';
|
|
1586
|
+
readonly item_id: string;
|
|
1587
|
+
readonly output_index: number;
|
|
1588
|
+
readonly content_index: number;
|
|
1589
|
+
readonly delta: object;
|
|
1590
|
+
}
|
|
1591
|
+
interface AxAIOpenAIResponsesReasoningDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1592
|
+
readonly type: 'response.reasoning.done';
|
|
1593
|
+
readonly item_id: string;
|
|
1594
|
+
readonly output_index: number;
|
|
1595
|
+
readonly content_index: number;
|
|
1596
|
+
readonly text: string;
|
|
1597
|
+
}
|
|
1598
|
+
interface AxAIOpenAIResponsesReasoningSummaryPartAddedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1599
|
+
readonly type: 'response.reasoning_summary_part.added';
|
|
1600
|
+
readonly item_id: string;
|
|
1601
|
+
readonly output_index: number;
|
|
1602
|
+
readonly summary_index: number;
|
|
1603
|
+
readonly part: Readonly<AxAIOpenAIResponsesReasoningSummaryPart>;
|
|
1604
|
+
}
|
|
1605
|
+
interface AxAIOpenAIResponsesReasoningSummaryPartDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1606
|
+
readonly type: 'response.reasoning_summary_part.done';
|
|
1607
|
+
readonly item_id: string;
|
|
1608
|
+
readonly output_index: number;
|
|
1609
|
+
readonly summary_index: number;
|
|
1610
|
+
readonly part: Readonly<AxAIOpenAIResponsesReasoningSummaryPart>;
|
|
1611
|
+
}
|
|
1612
|
+
interface AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1613
|
+
readonly type: 'response.reasoning_summary_text.delta';
|
|
1614
|
+
readonly item_id: string;
|
|
1615
|
+
readonly output_index: number;
|
|
1616
|
+
readonly summary_index: number;
|
|
1617
|
+
readonly delta: string;
|
|
1618
|
+
}
|
|
1619
|
+
interface AxAIOpenAIResponsesReasoningSummaryTextDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1620
|
+
readonly type: 'response.reasoning_summary_text.done';
|
|
1621
|
+
readonly item_id: string;
|
|
1622
|
+
readonly output_index: number;
|
|
1623
|
+
readonly summary_index: number;
|
|
1624
|
+
readonly text: string;
|
|
1625
|
+
}
|
|
1626
|
+
interface AxAIOpenAIResponsesReasoningSummaryDeltaEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1627
|
+
readonly type: 'response.reasoning_summary.delta';
|
|
1628
|
+
readonly item_id: string;
|
|
1629
|
+
readonly output_index: number;
|
|
1630
|
+
readonly summary_index: number;
|
|
1631
|
+
readonly delta: object;
|
|
1632
|
+
}
|
|
1633
|
+
interface AxAIOpenAIResponsesReasoningSummaryDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1634
|
+
readonly type: 'response.reasoning_summary.done';
|
|
1635
|
+
readonly item_id: string;
|
|
1636
|
+
readonly output_index: number;
|
|
1637
|
+
readonly summary_index: number;
|
|
1638
|
+
readonly text: string;
|
|
1639
|
+
}
|
|
1640
|
+
interface AxAIOpenAIResponsesImageGenerationCallInProgressEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1641
|
+
readonly type: 'response.image_generation_call.in_progress';
|
|
1642
|
+
readonly item_id: string;
|
|
1643
|
+
readonly output_index: number;
|
|
1644
|
+
}
|
|
1645
|
+
interface AxAIOpenAIResponsesImageGenerationCallGeneratingEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1646
|
+
readonly type: 'response.image_generation_call.generating';
|
|
1647
|
+
readonly item_id: string;
|
|
1648
|
+
readonly output_index: number;
|
|
1649
|
+
}
|
|
1650
|
+
interface AxAIOpenAIResponsesImageGenerationCallCompletedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1651
|
+
readonly type: 'response.image_generation_call.completed';
|
|
1652
|
+
readonly item_id: string;
|
|
1653
|
+
readonly output_index: number;
|
|
1654
|
+
}
|
|
1655
|
+
interface AxAIOpenAIResponsesImageGenerationCallPartialImageEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1656
|
+
readonly type: 'response.image_generation_call.partial_image';
|
|
1657
|
+
readonly item_id: string;
|
|
1658
|
+
readonly output_index: number;
|
|
1659
|
+
readonly partial_image_index: number;
|
|
1660
|
+
readonly partial_image_b64: string;
|
|
1661
|
+
}
|
|
1662
|
+
interface AxAIOpenAIResponsesMCPCallInProgressEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1663
|
+
readonly type: 'response.mcp_call.in_progress';
|
|
1664
|
+
readonly item_id: string;
|
|
1665
|
+
readonly output_index: number;
|
|
1666
|
+
}
|
|
1667
|
+
interface AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1668
|
+
readonly type: 'response.mcp_call.arguments.delta';
|
|
1669
|
+
readonly item_id: string;
|
|
1670
|
+
readonly output_index: number;
|
|
1671
|
+
readonly delta: object;
|
|
1672
|
+
}
|
|
1673
|
+
interface AxAIOpenAIResponsesMCPCallArgumentsDoneEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1674
|
+
readonly type: 'response.mcp_call.arguments.done';
|
|
1675
|
+
readonly item_id: string;
|
|
1676
|
+
readonly output_index: number;
|
|
1677
|
+
readonly arguments: object;
|
|
1678
|
+
}
|
|
1679
|
+
interface AxAIOpenAIResponsesMCPCallCompletedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1680
|
+
readonly type: 'response.mcp_call.completed';
|
|
1681
|
+
}
|
|
1682
|
+
interface AxAIOpenAIResponsesMCPCallFailedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1683
|
+
readonly type: 'response.mcp_call.failed';
|
|
1684
|
+
}
|
|
1685
|
+
interface AxAIOpenAIResponsesMCPListToolsInProgressEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1686
|
+
readonly type: 'response.mcp_list_tools.in_progress';
|
|
1687
|
+
}
|
|
1688
|
+
interface AxAIOpenAIResponsesMCPListToolsCompletedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1689
|
+
readonly type: 'response.mcp_list_tools.completed';
|
|
1690
|
+
}
|
|
1691
|
+
interface AxAIOpenAIResponsesMCPListToolsFailedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1692
|
+
readonly type: 'response.mcp_list_tools.failed';
|
|
1693
|
+
}
|
|
1694
|
+
interface AxAIOpenAIResponsesOutputTextAnnotationAddedEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1695
|
+
readonly type: 'response.output_text_annotation.added';
|
|
1696
|
+
readonly item_id: string;
|
|
1697
|
+
readonly output_index: number;
|
|
1698
|
+
readonly content_index: number;
|
|
1699
|
+
readonly annotation_index: number;
|
|
1700
|
+
readonly annotation: object;
|
|
1701
|
+
}
|
|
1702
|
+
interface AxAIOpenAIResponsesErrorEvent extends AxAIOpenAIResponsesStreamEventBase {
|
|
1703
|
+
readonly type: 'error';
|
|
1704
|
+
readonly code: string | null;
|
|
1705
|
+
readonly message: string;
|
|
1706
|
+
readonly param: string | null;
|
|
1707
|
+
}
|
|
1708
|
+
type AxAIOpenAIResponsesStreamEvent = AxAIOpenAIResponsesResponseCreatedEvent | AxAIOpenAIResponsesResponseInProgressEvent | AxAIOpenAIResponsesResponseCompletedEvent | AxAIOpenAIResponsesResponseFailedEvent | AxAIOpenAIResponsesResponseIncompleteEvent | AxAIOpenAIResponsesResponseQueuedEvent | AxAIOpenAIResponsesOutputItemAddedEvent | AxAIOpenAIResponsesOutputItemDoneEvent | AxAIOpenAIResponsesContentPartAddedEvent | AxAIOpenAIResponsesContentPartDoneEvent | AxAIOpenAIResponsesOutputTextDeltaEvent | AxAIOpenAIResponsesOutputTextDoneEvent | AxAIOpenAIResponsesRefusalDeltaEvent | AxAIOpenAIResponsesRefusalDoneEvent | AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent | AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent | AxAIOpenAIResponsesFileSearchCallInProgressEvent | AxAIOpenAIResponsesFileSearchCallSearchingEvent | AxAIOpenAIResponsesFileSearchCallCompletedEvent | AxAIOpenAIResponsesWebSearchCallInProgressEvent | AxAIOpenAIResponsesWebSearchCallSearchingEvent | AxAIOpenAIResponsesWebSearchCallCompletedEvent | AxAIOpenAIResponsesReasoningDeltaEvent | AxAIOpenAIResponsesReasoningDoneEvent | AxAIOpenAIResponsesReasoningSummaryPartAddedEvent | AxAIOpenAIResponsesReasoningSummaryPartDoneEvent | AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent | AxAIOpenAIResponsesReasoningSummaryTextDoneEvent | AxAIOpenAIResponsesReasoningSummaryDeltaEvent | AxAIOpenAIResponsesReasoningSummaryDoneEvent | AxAIOpenAIResponsesImageGenerationCallInProgressEvent | AxAIOpenAIResponsesImageGenerationCallGeneratingEvent | AxAIOpenAIResponsesImageGenerationCallCompletedEvent | AxAIOpenAIResponsesImageGenerationCallPartialImageEvent | AxAIOpenAIResponsesMCPCallInProgressEvent | AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent | AxAIOpenAIResponsesMCPCallArgumentsDoneEvent | AxAIOpenAIResponsesMCPCallCompletedEvent | AxAIOpenAIResponsesMCPCallFailedEvent | AxAIOpenAIResponsesMCPListToolsInProgressEvent | AxAIOpenAIResponsesMCPListToolsCompletedEvent | AxAIOpenAIResponsesMCPListToolsFailedEvent | AxAIOpenAIResponsesOutputTextAnnotationAddedEvent | AxAIOpenAIResponsesErrorEvent;
|
|
1709
|
+
interface AxAIOpenAIResponsesResponseDelta {
|
|
1710
|
+
readonly id?: string;
|
|
1711
|
+
readonly model?: string;
|
|
1712
|
+
readonly event?: string;
|
|
1713
|
+
readonly delta?: {
|
|
1714
|
+
readonly content?: string;
|
|
1715
|
+
readonly arguments?: string;
|
|
1716
|
+
};
|
|
1717
|
+
readonly item_index?: number;
|
|
1718
|
+
readonly item?: Partial<Readonly<AxAIOpenAIResponsesOutputItem>>;
|
|
1719
|
+
readonly response?: Readonly<AxAIOpenAIResponsesResponse>;
|
|
1720
|
+
readonly usage?: {
|
|
1721
|
+
readonly prompt_tokens: number;
|
|
1722
|
+
readonly completion_tokens: number;
|
|
1723
|
+
readonly total_tokens: number;
|
|
1724
|
+
} | null;
|
|
1725
|
+
}
|
|
1726
|
+
type ResponsesReqUpdater<TModel, TResponsesReq extends AxAIOpenAIResponsesRequest<TModel>> = (req: Readonly<TResponsesReq>) => Readonly<TResponsesReq>;
|
|
1727
|
+
type AxAIOpenAIResponsesConfig<TModel, TEmbedModel> = Omit<AxModelConfig, 'topK'> & {
|
|
1728
|
+
model: TModel;
|
|
1729
|
+
embedModel?: TEmbedModel;
|
|
1730
|
+
user?: string;
|
|
1731
|
+
bestOf?: number;
|
|
1732
|
+
logitBias?: Map<string, number>;
|
|
1733
|
+
suffix?: string | null;
|
|
1734
|
+
stop?: string[];
|
|
1735
|
+
logprobs?: number;
|
|
1736
|
+
echo?: boolean;
|
|
1737
|
+
dimensions?: number;
|
|
1738
|
+
reasoningEffort?: 'low' | 'medium' | 'high';
|
|
1739
|
+
store?: boolean;
|
|
1740
|
+
systemPrompt?: string;
|
|
1741
|
+
parallelToolCalls?: boolean;
|
|
1742
|
+
seed?: number;
|
|
1743
|
+
responseFormat?: 'text' | 'json_object' | 'json_schema';
|
|
1744
|
+
serviceTier?: 'auto' | 'default' | 'flex';
|
|
1745
|
+
};
|
|
1746
|
+
interface AxAIOpenAIResponsesToolCallBase {
|
|
1747
|
+
id: string;
|
|
1748
|
+
type: string;
|
|
1749
|
+
status?: string;
|
|
1750
|
+
}
|
|
1751
|
+
interface AxAIOpenAIResponsesFileSearchToolCall extends AxAIOpenAIResponsesToolCallBase {
|
|
1752
|
+
type: 'file_search_call';
|
|
1753
|
+
queries: string[];
|
|
1754
|
+
results?: {
|
|
1755
|
+
file_id: string;
|
|
1756
|
+
filename: string;
|
|
1757
|
+
score: number;
|
|
1758
|
+
text: string;
|
|
1759
|
+
attributes?: Record<string, string | boolean | number>;
|
|
1760
|
+
}[];
|
|
1761
|
+
}
|
|
1762
|
+
interface AxAIOpenAIResponsesWebSearchToolCall extends AxAIOpenAIResponsesToolCallBase {
|
|
1763
|
+
type: 'web_search_call';
|
|
1764
|
+
queries: string[];
|
|
1765
|
+
}
|
|
1766
|
+
interface AxAIOpenAIResponsesComputerToolCall extends AxAIOpenAIResponsesToolCallBase {
|
|
1767
|
+
type: 'computer_call';
|
|
1768
|
+
action: object;
|
|
1769
|
+
}
|
|
1770
|
+
interface AxAIOpenAIResponsesCodeInterpreterToolCall extends AxAIOpenAIResponsesToolCallBase {
|
|
1771
|
+
type: 'code_interpreter_call';
|
|
1772
|
+
code: string;
|
|
1773
|
+
results?: unknown[];
|
|
1774
|
+
}
|
|
1775
|
+
interface AxAIOpenAIResponsesImageGenerationToolCall extends AxAIOpenAIResponsesToolCallBase {
|
|
1776
|
+
type: 'image_generation_call';
|
|
1777
|
+
result?: string;
|
|
1778
|
+
}
|
|
1779
|
+
interface AxAIOpenAIResponsesLocalShellToolCall extends AxAIOpenAIResponsesToolCallBase {
|
|
1780
|
+
type: 'local_shell_call';
|
|
1781
|
+
action: object;
|
|
1782
|
+
}
|
|
1783
|
+
interface AxAIOpenAIResponsesMCPToolCall extends AxAIOpenAIResponsesToolCallBase {
|
|
1784
|
+
type: 'mcp_call';
|
|
1785
|
+
name: string;
|
|
1786
|
+
args: string;
|
|
1787
|
+
server_label: string;
|
|
1788
|
+
output?: string;
|
|
1789
|
+
error?: string;
|
|
1790
|
+
}
|
|
1791
|
+
type AxAIOpenAIResponsesToolCall = AxAIOpenAIResponsesFunctionCallItem | AxAIOpenAIResponsesFileSearchToolCall | AxAIOpenAIResponsesWebSearchToolCall | AxAIOpenAIResponsesComputerToolCall | AxAIOpenAIResponsesCodeInterpreterToolCall | AxAIOpenAIResponsesImageGenerationToolCall | AxAIOpenAIResponsesLocalShellToolCall | AxAIOpenAIResponsesMCPToolCall;
|
|
1792
|
+
|
|
1793
|
+
declare const axAIOpenAIResponsesDefaultConfig: () => AxAIOpenAIResponsesConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
|
|
1794
|
+
declare const axAIOpenAIResponsesBestConfig: () => AxAIOpenAIResponsesConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
|
|
1795
|
+
declare const axAIOpenAIResponsesCreativeConfig: () => AxAIOpenAIResponsesConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
|
|
1796
|
+
interface AxAIOpenAIResponsesBaseArgs<TModel, TEmbedModel, TResponsesReq extends AxAIOpenAIResponsesRequest<TModel>> {
|
|
1797
|
+
apiKey: string;
|
|
1798
|
+
config: AxAIOpenAIResponsesConfig<TModel, TEmbedModel>;
|
|
1799
|
+
options?: {
|
|
1800
|
+
streamingUsage?: boolean;
|
|
1801
|
+
} & AxAIServiceOptions;
|
|
1802
|
+
apiURL?: string;
|
|
1803
|
+
modelInfo?: ReadonlyArray<AxModelInfo>;
|
|
1804
|
+
models?: AxAIInputModelList<TModel, TEmbedModel>;
|
|
1805
|
+
responsesReqUpdater?: (req: Readonly<TResponsesReq>) => Readonly<TResponsesReq>;
|
|
1806
|
+
supportFor?: AxAIFeatures | ((model: TModel) => AxAIFeatures);
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Base class for OpenAI AI services using the /v1/responses API endpoint
|
|
1810
|
+
*/
|
|
1811
|
+
declare class AxAIOpenAIResponsesBase<TModel, TEmbedModel, TResponsesReq extends AxAIOpenAIResponsesRequest<TModel>> extends AxBaseAI<TModel, TEmbedModel, AxAIOpenAIResponsesRequest<TModel>, AxAIOpenAIEmbedRequest<TEmbedModel>, AxAIOpenAIResponsesResponse, AxAIOpenAIResponsesResponseDelta, AxAIOpenAIEmbedResponse> {
|
|
1812
|
+
constructor({ apiKey, config, options, apiURL, modelInfo, models, responsesReqUpdater, supportFor, }: Readonly<AxAIOpenAIResponsesBaseArgs<TModel, TEmbedModel, TResponsesReq>>);
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* Ready-to-use implementation of the OpenAI Responses API client
|
|
1816
|
+
* This class uses OpenAI's /v1/responses API endpoint which supports text, image, and audio inputs
|
|
1817
|
+
*/
|
|
1818
|
+
interface AxAIOpenAIResponsesArgs<TName = 'openai-responses', TModel = AxAIOpenAIModel, TEmbedModel = AxAIOpenAIEmbedModel, TChatReq extends AxAIOpenAIResponsesRequest<TModel> = AxAIOpenAIResponsesRequest<TModel>> extends Omit<AxAIOpenAIResponsesBaseArgs<TModel, TEmbedModel, TChatReq>, 'config' | 'supportFor' | 'modelInfo'> {
|
|
1819
|
+
name: TName;
|
|
1820
|
+
modelInfo?: AxModelInfo[];
|
|
1821
|
+
config?: Partial<AxAIOpenAIResponsesBaseArgs<TModel, TEmbedModel, TChatReq>['config']>;
|
|
1822
|
+
}
|
|
1823
|
+
declare class AxAIOpenAIResponses extends AxAIOpenAIResponsesBase<AxAIOpenAIModel, AxAIOpenAIEmbedModel, AxAIOpenAIResponsesRequest<AxAIOpenAIModel>> {
|
|
1824
|
+
constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAIOpenAIResponsesArgs, 'name'>>);
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1324
1827
|
declare enum AxAIRekaModel {
|
|
1325
1828
|
RekaCore = "reka-core",
|
|
1326
1829
|
RekaFlash = "reka-flash",
|
|
@@ -1414,7 +1917,7 @@ declare class AxAITogether extends AxAIOpenAIBase<string, unknown> {
|
|
|
1414
1917
|
constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAITogetherArgs, 'name'>>);
|
|
1415
1918
|
}
|
|
1416
1919
|
|
|
1417
|
-
type AxAIArgs = AxAIOpenAIArgs | AxAIAzureOpenAIArgs | AxAITogetherArgs | AxAIAnthropicArgs | AxAIGroqArgs | AxAIGoogleGeminiArgs | AxAICohereArgs | AxAIHuggingFaceArgs | AxAIMistralArgs | AxAIDeepSeekArgs | AxAIOllamaArgs | AxAIRekaArgs;
|
|
1920
|
+
type AxAIArgs = AxAIOpenAIArgs | AxAIOpenAIResponsesArgs | AxAIAzureOpenAIArgs | AxAITogetherArgs | AxAIAnthropicArgs | AxAIGroqArgs | AxAIGoogleGeminiArgs | AxAICohereArgs | AxAIHuggingFaceArgs | AxAIMistralArgs | AxAIDeepSeekArgs | AxAIOllamaArgs | AxAIRekaArgs;
|
|
1418
1921
|
type AxAIModels = AxAIOpenAIModel | AxAIAnthropicModel | AxAIGroqModel | AxAIGoogleGeminiModel | AxAICohereModel | AxAIHuggingFaceModel | AxAIMistralModel | AxAIDeepSeekModel;
|
|
1419
1922
|
type AxAIEmbedModels = AxAIOpenAIEmbedModel | AxAIGoogleGeminiEmbedModel | AxAICohereEmbedModel;
|
|
1420
1923
|
declare class AxAI implements AxAIService {
|
|
@@ -1449,13 +1952,42 @@ declare enum AxAIGrokEmbedModels {
|
|
|
1449
1952
|
|
|
1450
1953
|
declare const axAIGrokDefaultConfig: () => AxAIOpenAIConfig<AxAIGrokModel, AxAIGrokEmbedModels>;
|
|
1451
1954
|
declare const axAIGrokBestConfig: () => AxAIOpenAIConfig<AxAIGrokModel, AxAIGrokEmbedModels>;
|
|
1452
|
-
|
|
1453
|
-
|
|
1955
|
+
interface AxAIGrokSearchSource {
|
|
1956
|
+
type: 'web' | 'x' | 'news' | 'rss';
|
|
1957
|
+
country?: string;
|
|
1958
|
+
excludedWebsites?: string[];
|
|
1959
|
+
allowedWebsites?: string[];
|
|
1960
|
+
safeSearch?: boolean;
|
|
1961
|
+
xHandles?: string[];
|
|
1962
|
+
links?: string[];
|
|
1963
|
+
}
|
|
1964
|
+
interface AxAIGrokOptionsTools {
|
|
1965
|
+
searchParameters?: {
|
|
1966
|
+
mode?: 'auto' | 'on' | 'off';
|
|
1967
|
+
returnCitations?: boolean;
|
|
1968
|
+
fromDate?: string;
|
|
1969
|
+
toDate?: string;
|
|
1970
|
+
maxSearchResults?: number;
|
|
1971
|
+
sources?: AxAIGrokSearchSource[];
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
type AxAIGrokChatRequest = AxAIOpenAIChatRequest<AxAIGrokModel> & {
|
|
1975
|
+
search_parameters?: {
|
|
1976
|
+
mode?: 'auto' | 'on' | 'off';
|
|
1977
|
+
return_citations?: boolean;
|
|
1978
|
+
from_date?: string;
|
|
1979
|
+
to_date?: string;
|
|
1980
|
+
max_search_results?: number;
|
|
1981
|
+
sources?: AxAIGrokSearchSource[];
|
|
1982
|
+
};
|
|
1983
|
+
};
|
|
1984
|
+
type AxAIGrokArgs = AxAIOpenAIArgs<'grok', AxAIGrokModel, AxAIGrokEmbedModels, AxAIGrokChatRequest> & {
|
|
1985
|
+
options?: Readonly<AxAIServiceOptions & AxAIGrokOptionsTools> & {
|
|
1454
1986
|
tokensPerMinute?: number;
|
|
1455
1987
|
};
|
|
1456
1988
|
modelInfo?: AxModelInfo[];
|
|
1457
1989
|
};
|
|
1458
|
-
declare class AxAIGrok extends AxAIOpenAIBase<AxAIGrokModel, AxAIGrokEmbedModels> {
|
|
1990
|
+
declare class AxAIGrok extends AxAIOpenAIBase<AxAIGrokModel, AxAIGrokEmbedModels, AxAIGrokChatRequest> {
|
|
1459
1991
|
constructor({ apiKey, config, options, models, modelInfo, }: Readonly<Omit<AxAIGrokArgs, 'name'>>);
|
|
1460
1992
|
}
|
|
1461
1993
|
|
|
@@ -1668,9 +2200,17 @@ type AxFieldValue = string | string[] | number | boolean | object | null | undef
|
|
|
1668
2200
|
data: string;
|
|
1669
2201
|
}[];
|
|
1670
2202
|
type AxGenIn = {
|
|
1671
|
-
[key:
|
|
2203
|
+
[key: string]: AxFieldValue;
|
|
1672
2204
|
};
|
|
1673
2205
|
type AxGenOut = Record<string, AxFieldValue>;
|
|
2206
|
+
type AxMessage = {
|
|
2207
|
+
role: 'user';
|
|
2208
|
+
values: AxGenIn;
|
|
2209
|
+
} | {
|
|
2210
|
+
role: 'assistant';
|
|
2211
|
+
values: AxGenOut;
|
|
2212
|
+
};
|
|
2213
|
+
|
|
1674
2214
|
type AxProgramTrace = {
|
|
1675
2215
|
trace: Record<string, AxFieldValue>;
|
|
1676
2216
|
programId: string;
|
|
@@ -1698,15 +2238,15 @@ type AxProgramForwardOptions = {
|
|
|
1698
2238
|
fastFail?: boolean;
|
|
1699
2239
|
debug?: boolean;
|
|
1700
2240
|
debugHideSystemPrompt?: boolean;
|
|
1701
|
-
thinkingTokenBudget?: 'minimal' | 'low' | 'medium' | 'high' | 'highest';
|
|
2241
|
+
thinkingTokenBudget?: 'minimal' | 'low' | 'medium' | 'high' | 'highest' | 'none';
|
|
1702
2242
|
traceLabel?: string;
|
|
1703
2243
|
};
|
|
1704
2244
|
type AxProgramStreamingForwardOptions = Omit<AxProgramForwardOptions, 'stream'>;
|
|
1705
|
-
type AxGenDeltaOut<OUT> = {
|
|
2245
|
+
type AxGenDeltaOut<OUT extends AxGenOut> = {
|
|
1706
2246
|
version: number;
|
|
1707
2247
|
delta: Partial<OUT>;
|
|
1708
2248
|
};
|
|
1709
|
-
type AxGenStreamingOut<OUT> = AsyncGenerator<AxGenDeltaOut<OUT>, void | OUT, unknown>;
|
|
2249
|
+
type AxGenStreamingOut<OUT extends AxGenOut> = AsyncGenerator<AxGenDeltaOut<OUT>, void | OUT, unknown>;
|
|
1710
2250
|
interface AxTunable {
|
|
1711
2251
|
setExamples: (examples: Readonly<AxProgramExamples>) => void;
|
|
1712
2252
|
setId: (id: string) => void;
|
|
@@ -1725,7 +2265,7 @@ type AxProgramUsage = AxChatResponse['modelUsage'] & {
|
|
|
1725
2265
|
interface AxProgramWithSignatureOptions {
|
|
1726
2266
|
description?: string;
|
|
1727
2267
|
}
|
|
1728
|
-
declare class AxProgramWithSignature<IN extends AxGenIn
|
|
2268
|
+
declare class AxProgramWithSignature<IN extends AxGenIn | ReadonlyArray<AxMessage>, OUT extends AxGenOut> implements AxTunable, AxUsable {
|
|
1729
2269
|
protected signature: AxSignature;
|
|
1730
2270
|
protected sigHash: string;
|
|
1731
2271
|
protected examples?: Record<string, AxFieldValue>[];
|
|
@@ -1811,6 +2351,10 @@ interface AxFieldProcessor {
|
|
|
1811
2351
|
type Writeable<T> = {
|
|
1812
2352
|
-readonly [P in keyof T]: T[P];
|
|
1813
2353
|
};
|
|
2354
|
+
interface AxPromptTemplateOptions {
|
|
2355
|
+
functions?: Readonly<AxInputFunctionType>;
|
|
2356
|
+
thoughtFieldName?: string;
|
|
2357
|
+
}
|
|
1814
2358
|
type AxChatRequestChatPrompt = Writeable<AxChatRequest['chatPrompt'][0]>;
|
|
1815
2359
|
type ChatRequestUserMessage = Exclude<Extract<AxChatRequestChatPrompt, {
|
|
1816
2360
|
role: 'user';
|
|
@@ -1820,8 +2364,11 @@ declare class AxPromptTemplate {
|
|
|
1820
2364
|
private sig;
|
|
1821
2365
|
private fieldTemplates?;
|
|
1822
2366
|
private task;
|
|
1823
|
-
|
|
1824
|
-
|
|
2367
|
+
private readonly thoughtFieldName;
|
|
2368
|
+
private readonly functions?;
|
|
2369
|
+
constructor(sig: Readonly<AxSignature>, options?: Readonly<AxPromptTemplateOptions>, fieldTemplates?: Record<string, AxFieldTemplateFn>);
|
|
2370
|
+
render: <T extends AxGenIn>(values: T | ReadonlyArray<AxMessage>, // Allow T (AxGenIn) or array of AxMessages
|
|
2371
|
+
{ examples, demos, }: Readonly<{
|
|
1825
2372
|
skipSystemPrompt?: boolean;
|
|
1826
2373
|
examples?: Record<string, AxFieldValue>[];
|
|
1827
2374
|
demos?: Record<string, AxFieldValue>[];
|
|
@@ -1857,6 +2404,7 @@ interface AxGenOptions {
|
|
|
1857
2404
|
rateLimiter?: AxRateLimiterFunction;
|
|
1858
2405
|
stream?: boolean;
|
|
1859
2406
|
description?: string;
|
|
2407
|
+
thoughtFieldName?: string;
|
|
1860
2408
|
functions?: AxInputFunctionType;
|
|
1861
2409
|
functionCall?: AxChatRequest['functionCall'];
|
|
1862
2410
|
stopFunction?: string;
|
|
@@ -1890,7 +2438,7 @@ interface AxStreamingEvent<T> {
|
|
|
1890
2438
|
functions?: AxChatResponseFunctionCall[];
|
|
1891
2439
|
};
|
|
1892
2440
|
}
|
|
1893
|
-
declare class AxGen<IN extends AxGenIn = AxGenIn
|
|
2441
|
+
declare class AxGen<IN extends AxGenIn | ReadonlyArray<AxMessage> = AxGenIn | ReadonlyArray<AxMessage>, OUT extends AxGenerateResult<AxGenOut> = AxGenerateResult<AxGenOut>> extends AxProgramWithSignature<IN, OUT> {
|
|
1894
2442
|
private promptTemplate;
|
|
1895
2443
|
private asserts;
|
|
1896
2444
|
private streamingAsserts;
|
|
@@ -1901,6 +2449,7 @@ declare class AxGen<IN extends AxGenIn = AxGenIn, OUT extends AxGenerateResult<A
|
|
|
1901
2449
|
private streamingFieldProcessors;
|
|
1902
2450
|
private values;
|
|
1903
2451
|
private excludeContentFromTrace;
|
|
2452
|
+
private thoughtFieldName;
|
|
1904
2453
|
constructor(signature: Readonly<AxSignature | string>, options?: Readonly<AxGenOptions>);
|
|
1905
2454
|
addAssert: (fn: AxAssertion["fn"], message?: string) => void;
|
|
1906
2455
|
addStreamingAssert: (fieldName: string, fn: AxStreamingAssertion["fn"], message?: string) => void;
|
|
@@ -2083,7 +2632,7 @@ type AxExample = Record<string, AxFieldValue>;
|
|
|
2083
2632
|
type AxMetricFn = <T extends AxGenOut = AxGenOut>(arg0: Readonly<{
|
|
2084
2633
|
prediction: T;
|
|
2085
2634
|
example: AxExample;
|
|
2086
|
-
}>) =>
|
|
2635
|
+
}>) => number;
|
|
2087
2636
|
type AxMetricFnArgs = Parameters<AxMetricFn>[0];
|
|
2088
2637
|
type AxOptimizerArgs<IN extends AxGenIn, OUT extends AxGenOut> = {
|
|
2089
2638
|
ai: AxAIService;
|
|
@@ -2528,6 +3077,127 @@ declare enum AxSpanKindValues {
|
|
|
2528
3077
|
UNKNOWN = "unknown"
|
|
2529
3078
|
}
|
|
2530
3079
|
|
|
3080
|
+
interface JSONRPCRequest<T> {
|
|
3081
|
+
jsonrpc: '2.0';
|
|
3082
|
+
id: string | number;
|
|
3083
|
+
method: string;
|
|
3084
|
+
params?: T;
|
|
3085
|
+
}
|
|
3086
|
+
interface JSONRPCSuccessResponse<T = unknown> {
|
|
3087
|
+
jsonrpc: '2.0';
|
|
3088
|
+
id: string | number;
|
|
3089
|
+
result: T;
|
|
3090
|
+
}
|
|
3091
|
+
interface JSONRPCErrorResponse {
|
|
3092
|
+
jsonrpc: '2.0';
|
|
3093
|
+
id: string | number;
|
|
3094
|
+
error: {
|
|
3095
|
+
code: number;
|
|
3096
|
+
message: string;
|
|
3097
|
+
data?: unknown;
|
|
3098
|
+
};
|
|
3099
|
+
}
|
|
3100
|
+
type JSONRPCResponse<T = unknown> = JSONRPCSuccessResponse<T> | JSONRPCErrorResponse;
|
|
3101
|
+
interface JSONRPCNotification {
|
|
3102
|
+
jsonrpc: '2.0';
|
|
3103
|
+
method: string;
|
|
3104
|
+
params?: Record<string, unknown>;
|
|
3105
|
+
}
|
|
3106
|
+
|
|
3107
|
+
interface AxMCPTransport {
|
|
3108
|
+
/**
|
|
3109
|
+
* Sends a JSON-RPC request or notification and returns the response
|
|
3110
|
+
* @param message The JSON-RPC request or notification to send
|
|
3111
|
+
* @returns A Promise that resolves to the JSON-RPC response
|
|
3112
|
+
*/
|
|
3113
|
+
send(message: Readonly<JSONRPCRequest<unknown>>): Promise<JSONRPCResponse<unknown>>;
|
|
3114
|
+
/**
|
|
3115
|
+
* Sends a JSON-RPC notification
|
|
3116
|
+
* @param message The JSON-RPC notification to send
|
|
3117
|
+
*/
|
|
3118
|
+
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
|
|
3119
|
+
/**
|
|
3120
|
+
* Connects to the transport if needed
|
|
3121
|
+
* This method is optional and only required for transports that need connection setup
|
|
3122
|
+
*/
|
|
3123
|
+
connect?(): Promise<void>;
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
declare class AxMCPHTTPSSETransport implements AxMCPTransport {
|
|
3127
|
+
private endpoint;
|
|
3128
|
+
private sseUrl;
|
|
3129
|
+
private eventSource?;
|
|
3130
|
+
constructor(sseUrl: string);
|
|
3131
|
+
connect(): Promise<void>;
|
|
3132
|
+
send(message: JSONRPCRequest<unknown> | JSONRPCNotification): Promise<JSONRPCResponse<unknown>>;
|
|
3133
|
+
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
|
|
3134
|
+
}
|
|
3135
|
+
interface AxMCPStreamableHTTPTransportOptions {
|
|
3136
|
+
/**
|
|
3137
|
+
* Custom headers to include with all HTTP requests
|
|
3138
|
+
* Note: Content-Type, Accept, and Mcp-Session-Id are managed automatically
|
|
3139
|
+
*/
|
|
3140
|
+
headers?: Record<string, string>;
|
|
3141
|
+
/**
|
|
3142
|
+
* Authorization header value (convenience for common use case)
|
|
3143
|
+
* If provided, will be added to the headers as 'Authorization'
|
|
3144
|
+
*/
|
|
3145
|
+
authorization?: string;
|
|
3146
|
+
}
|
|
3147
|
+
/**
|
|
3148
|
+
* AxMCPStreambleHTTPTransport implements the 2025-03-26 Streamable HTTP transport specification
|
|
3149
|
+
* This transport uses a single HTTP endpoint that supports both POST and GET methods
|
|
3150
|
+
*/
|
|
3151
|
+
declare class AxMCPStreambleHTTPTransport implements AxMCPTransport {
|
|
3152
|
+
private mcpEndpoint;
|
|
3153
|
+
private sessionId?;
|
|
3154
|
+
private eventSource?;
|
|
3155
|
+
private pendingRequests;
|
|
3156
|
+
private messageHandler?;
|
|
3157
|
+
private customHeaders;
|
|
3158
|
+
constructor(mcpEndpoint: string, options?: AxMCPStreamableHTTPTransportOptions);
|
|
3159
|
+
/**
|
|
3160
|
+
* Update custom headers (useful for refreshing tokens)
|
|
3161
|
+
*/
|
|
3162
|
+
setHeaders(headers: Record<string, string>): void;
|
|
3163
|
+
/**
|
|
3164
|
+
* Update authorization header (convenience method)
|
|
3165
|
+
*/
|
|
3166
|
+
setAuthorization(authorization: string): void;
|
|
3167
|
+
/**
|
|
3168
|
+
* Get a copy of the current custom headers
|
|
3169
|
+
*/
|
|
3170
|
+
getHeaders(): Record<string, string>;
|
|
3171
|
+
/**
|
|
3172
|
+
* Build headers for HTTP requests, merging custom headers with required ones
|
|
3173
|
+
*/
|
|
3174
|
+
private buildHeaders;
|
|
3175
|
+
/**
|
|
3176
|
+
* Set a handler for incoming server messages (requests/notifications)
|
|
3177
|
+
*/
|
|
3178
|
+
setMessageHandler(handler: (message: JSONRPCRequest<unknown> | JSONRPCNotification) => void): void;
|
|
3179
|
+
connect(): Promise<void>;
|
|
3180
|
+
/**
|
|
3181
|
+
* Opens an SSE stream to listen for server-initiated messages
|
|
3182
|
+
*/
|
|
3183
|
+
openListeningStream(): Promise<void>;
|
|
3184
|
+
/**
|
|
3185
|
+
* Opens an SSE stream using fetch API to support custom headers
|
|
3186
|
+
*/
|
|
3187
|
+
private openListeningStreamWithFetch;
|
|
3188
|
+
send(message: Readonly<JSONRPCRequest<unknown>>): Promise<JSONRPCResponse<unknown>>;
|
|
3189
|
+
private handleSSEResponse;
|
|
3190
|
+
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
|
|
3191
|
+
/**
|
|
3192
|
+
* Explicitly terminate the session (if supported by server)
|
|
3193
|
+
*/
|
|
3194
|
+
terminateSession(): Promise<void>;
|
|
3195
|
+
/**
|
|
3196
|
+
* Close any open connections
|
|
3197
|
+
*/
|
|
3198
|
+
close(): void;
|
|
3199
|
+
}
|
|
3200
|
+
|
|
2531
3201
|
interface AxMiPROOptions {
|
|
2532
3202
|
numCandidates?: number;
|
|
2533
3203
|
initTemperature?: number;
|
|
@@ -2736,10 +3406,32 @@ declare class AxTestPrompt<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut =
|
|
|
2736
3406
|
run(metricFn: AxMetricFn): Promise<void>;
|
|
2737
3407
|
}
|
|
2738
3408
|
|
|
2739
|
-
declare class
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
3409
|
+
declare class AxAIOpenAIResponsesImpl<TModel, TEmbedModel, // Kept for interface compatibility, but not used by this impl.
|
|
3410
|
+
TResponsesReq extends AxAIOpenAIResponsesRequest<TModel>> implements AxAIServiceImpl<TModel, TEmbedModel, Readonly<AxAIOpenAIResponsesRequest<TModel>>, // ChatReq (now ResponsesReq)
|
|
3411
|
+
Readonly<AxAIOpenAIEmbedRequest<TEmbedModel>>, // EmbedReq
|
|
3412
|
+
Readonly<AxAIOpenAIResponsesResponse>, // ChatResp (now ResponsesResp)
|
|
3413
|
+
Readonly<AxAIOpenAIResponsesResponseDelta>, // ChatRespDelta (now ResponsesRespDelta)
|
|
3414
|
+
Readonly<AxAIOpenAIEmbedResponse>> {
|
|
3415
|
+
private readonly config;
|
|
3416
|
+
private readonly streamingUsage;
|
|
3417
|
+
private readonly responsesReqUpdater?;
|
|
3418
|
+
private tokensUsed;
|
|
3419
|
+
constructor(config: Readonly<AxAIOpenAIResponsesConfig<TModel, TEmbedModel>>, streamingUsage: boolean, // If /v1/responses supports include_usage for streams
|
|
3420
|
+
responsesReqUpdater?: ResponsesReqUpdater<TModel, TResponsesReq> | undefined);
|
|
3421
|
+
getTokenUsage(): Readonly<AxTokenUsage> | undefined;
|
|
3422
|
+
getModelConfig(): Readonly<AxModelConfig>;
|
|
3423
|
+
private mapInternalContentToResponsesInput;
|
|
3424
|
+
private createResponsesReqInternalInput;
|
|
3425
|
+
createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, _config: Readonly<AxAIPromptConfig>): [Readonly<AxAPI>, Readonly<AxAIOpenAIResponsesRequest<TModel>>];
|
|
3426
|
+
createChatResp(resp: Readonly<AxAIOpenAIResponsesResponse>): Readonly<AxChatResponse>;
|
|
3427
|
+
createChatStreamResp(streamEvent: Readonly<AxAIOpenAIResponsesResponseDelta>): Readonly<AxChatResponse>;
|
|
3428
|
+
createEmbedReq(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): [AxAPI, AxAIOpenAIEmbedRequest<TEmbedModel>];
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
declare class AxChainOfThought<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> extends AxGen<IN, OUT> {
|
|
3432
|
+
constructor(signature: Readonly<AxSignature | string>, options?: Readonly<AxGenOptions & {
|
|
3433
|
+
setVisibleReasoning?: boolean;
|
|
3434
|
+
}>);
|
|
2743
3435
|
}
|
|
2744
3436
|
|
|
2745
3437
|
declare class AxDefaultQueryRewriter extends AxGen<AxRewriteIn, AxRewriteOut> {
|
|
@@ -2776,9 +3468,9 @@ declare class AxEmbeddingAdapter {
|
|
|
2776
3468
|
*
|
|
2777
3469
|
* @param prediction The predicted text.
|
|
2778
3470
|
* @param groundTruth The actual correct text.
|
|
2779
|
-
* @returns A
|
|
3471
|
+
* @returns A number (1.0 for exact match, 0.0 otherwise).
|
|
2780
3472
|
*/
|
|
2781
|
-
declare function emScore(prediction: string, groundTruth: string):
|
|
3473
|
+
declare function emScore(prediction: string, groundTruth: string): number;
|
|
2782
3474
|
/**
|
|
2783
3475
|
* Calculates the F1 score between a prediction and ground truth.
|
|
2784
3476
|
*
|
|
@@ -2818,52 +3510,6 @@ declare class AxInstanceRegistry<T> {
|
|
|
2818
3510
|
[Symbol.iterator](): Generator<T, void, unknown>;
|
|
2819
3511
|
}
|
|
2820
3512
|
|
|
2821
|
-
interface JSONRPCRequest<T> {
|
|
2822
|
-
jsonrpc: '2.0';
|
|
2823
|
-
id: string | number;
|
|
2824
|
-
method: string;
|
|
2825
|
-
params?: T;
|
|
2826
|
-
}
|
|
2827
|
-
interface JSONRPCSuccessResponse<T = unknown> {
|
|
2828
|
-
jsonrpc: '2.0';
|
|
2829
|
-
id: string | number;
|
|
2830
|
-
result: T;
|
|
2831
|
-
}
|
|
2832
|
-
interface JSONRPCErrorResponse {
|
|
2833
|
-
jsonrpc: '2.0';
|
|
2834
|
-
id: string | number;
|
|
2835
|
-
error: {
|
|
2836
|
-
code: number;
|
|
2837
|
-
message: string;
|
|
2838
|
-
data?: unknown;
|
|
2839
|
-
};
|
|
2840
|
-
}
|
|
2841
|
-
type JSONRPCResponse<T = unknown> = JSONRPCSuccessResponse<T> | JSONRPCErrorResponse;
|
|
2842
|
-
interface JSONRPCNotification {
|
|
2843
|
-
jsonrpc: '2.0';
|
|
2844
|
-
method: string;
|
|
2845
|
-
params?: Record<string, unknown>;
|
|
2846
|
-
}
|
|
2847
|
-
|
|
2848
|
-
interface AxMCPTransport {
|
|
2849
|
-
/**
|
|
2850
|
-
* Sends a JSON-RPC request or notification and returns the response
|
|
2851
|
-
* @param message The JSON-RPC request or notification to send
|
|
2852
|
-
* @returns A Promise that resolves to the JSON-RPC response
|
|
2853
|
-
*/
|
|
2854
|
-
send(message: Readonly<JSONRPCRequest<unknown>>): Promise<JSONRPCResponse<unknown>>;
|
|
2855
|
-
/**
|
|
2856
|
-
* Sends a JSON-RPC notification
|
|
2857
|
-
* @param message The JSON-RPC notification to send
|
|
2858
|
-
*/
|
|
2859
|
-
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
|
|
2860
|
-
/**
|
|
2861
|
-
* Connects to the transport if needed
|
|
2862
|
-
* This method is optional and only required for transports that need connection setup
|
|
2863
|
-
*/
|
|
2864
|
-
connect?(): Promise<void>;
|
|
2865
|
-
}
|
|
2866
|
-
|
|
2867
3513
|
/**
|
|
2868
3514
|
* Configuration for overriding function properties
|
|
2869
3515
|
*/
|
|
@@ -2920,16 +3566,6 @@ declare class AxMCPClient {
|
|
|
2920
3566
|
private sendNotification;
|
|
2921
3567
|
}
|
|
2922
3568
|
|
|
2923
|
-
declare class AxMCPHTTPTransport implements AxMCPTransport {
|
|
2924
|
-
private endpoint;
|
|
2925
|
-
private sseUrl;
|
|
2926
|
-
private eventSource?;
|
|
2927
|
-
constructor(sseUrl: string);
|
|
2928
|
-
connect(): Promise<void>;
|
|
2929
|
-
send(message: JSONRPCRequest<unknown> | JSONRPCNotification): Promise<JSONRPCResponse<unknown>>;
|
|
2930
|
-
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
3569
|
interface StdioTransportConfig {
|
|
2934
3570
|
command: string;
|
|
2935
3571
|
args?: string[];
|
|
@@ -3026,7 +3662,6 @@ declare class AxRAG extends AxChainOfThought<{
|
|
|
3026
3662
|
question: string;
|
|
3027
3663
|
}>, options?: Readonly<AxProgramForwardOptions>): Promise<{
|
|
3028
3664
|
answer: string;
|
|
3029
|
-
reason: string;
|
|
3030
3665
|
}>;
|
|
3031
3666
|
}
|
|
3032
3667
|
|
|
@@ -3079,4 +3714,4 @@ declare const axModelInfoReka: AxModelInfo[];
|
|
|
3079
3714
|
|
|
3080
3715
|
declare const axModelInfoTogether: AxModelInfo[];
|
|
3081
3716
|
|
|
3082
|
-
export { AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicErrorEvent, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, AxAIGrokEmbedModels, AxAIGrokModel, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBootstrapFewShot, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMCPClient, AxMCPHTTPTransport, AxMCPStdioTransport, type AxMCPTransport, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMiPRO, type AxMiPROOptions, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, AxMultiServiceRouter, type AxOptimizationStats, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxSignature, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents };
|
|
3717
|
+
export { AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicErrorEvent, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBootstrapFewShot, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMCPClient, AxMCPHTTPSSETransport, AxMCPStdioTransport, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTransport, AxMemory, type AxMessage, type AxMetricFn, type AxMetricFnArgs, AxMiPRO, type AxMiPROOptions, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, AxMultiServiceRouter, type AxOptimizationStats, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, type AxPromptTemplateOptions, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxSignature, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents };
|