@ax-llm/ax 14.0.0 → 14.0.1
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 +16 -16
- package/index.cjs.map +1 -1
- package/index.d.cts +59 -9
- package/index.d.ts +59 -9
- package/index.global.js +30 -30
- package/index.global.js.map +1 -1
- package/index.js +16 -16
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.cts
CHANGED
|
@@ -319,12 +319,24 @@ type AxChatRequest<TModel = string> = {
|
|
|
319
319
|
/** Duration of audio in seconds */
|
|
320
320
|
duration?: number;
|
|
321
321
|
} | {
|
|
322
|
-
/** File content type */
|
|
322
|
+
/** File content type with inline data */
|
|
323
323
|
type: 'file';
|
|
324
|
-
/** File data as base64
|
|
324
|
+
/** File data as base64 */
|
|
325
325
|
data: string;
|
|
326
326
|
/** Original filename */
|
|
327
|
-
filename
|
|
327
|
+
filename?: string;
|
|
328
|
+
/** MIME type of the file */
|
|
329
|
+
mimeType: string;
|
|
330
|
+
cache?: boolean;
|
|
331
|
+
/** Pre-extracted text content for fallback */
|
|
332
|
+
extractedText?: string;
|
|
333
|
+
} | {
|
|
334
|
+
/** File content type with cloud storage URI */
|
|
335
|
+
type: 'file';
|
|
336
|
+
/** File URI (e.g., gs:// URL) */
|
|
337
|
+
fileUri: string;
|
|
338
|
+
/** Original filename */
|
|
339
|
+
filename?: string;
|
|
328
340
|
/** MIME type of the file */
|
|
329
341
|
mimeType: string;
|
|
330
342
|
cache?: boolean;
|
|
@@ -3707,7 +3719,14 @@ declare class AxMemory implements AxAIMemory {
|
|
|
3707
3719
|
} | {
|
|
3708
3720
|
type: "file";
|
|
3709
3721
|
data: string;
|
|
3710
|
-
filename
|
|
3722
|
+
filename?: string;
|
|
3723
|
+
mimeType: string;
|
|
3724
|
+
cache?: boolean;
|
|
3725
|
+
extractedText?: string;
|
|
3726
|
+
} | {
|
|
3727
|
+
type: "file";
|
|
3728
|
+
fileUri: string;
|
|
3729
|
+
filename?: string;
|
|
3711
3730
|
mimeType: string;
|
|
3712
3731
|
cache?: boolean;
|
|
3713
3732
|
extractedText?: string;
|
|
@@ -3828,7 +3847,14 @@ declare class AxPromptTemplate {
|
|
|
3828
3847
|
} | {
|
|
3829
3848
|
type: "file";
|
|
3830
3849
|
data: string;
|
|
3831
|
-
filename
|
|
3850
|
+
filename?: string;
|
|
3851
|
+
mimeType: string;
|
|
3852
|
+
cache?: boolean;
|
|
3853
|
+
extractedText?: string;
|
|
3854
|
+
} | {
|
|
3855
|
+
type: "file";
|
|
3856
|
+
fileUri: string;
|
|
3857
|
+
filename?: string;
|
|
3832
3858
|
mimeType: string;
|
|
3833
3859
|
cache?: boolean;
|
|
3834
3860
|
extractedText?: string;
|
|
@@ -3869,6 +3895,9 @@ interface TypeMap {
|
|
|
3869
3895
|
file: {
|
|
3870
3896
|
mimeType: string;
|
|
3871
3897
|
data: string;
|
|
3898
|
+
} | {
|
|
3899
|
+
mimeType: string;
|
|
3900
|
+
fileUri: string;
|
|
3872
3901
|
};
|
|
3873
3902
|
url: string;
|
|
3874
3903
|
code: string;
|
|
@@ -4025,6 +4054,15 @@ type AxGenIn = {
|
|
|
4025
4054
|
type AxGenOut = {
|
|
4026
4055
|
[key: string]: AxFieldValue;
|
|
4027
4056
|
};
|
|
4057
|
+
/**
|
|
4058
|
+
* @deprecated AxMessage will be updated to a new design within this major version.
|
|
4059
|
+
* The current structure will be replaced in v15.0.0.
|
|
4060
|
+
*
|
|
4061
|
+
* Migration timeline:
|
|
4062
|
+
* - v14.0.0+: Deprecation warnings (current)
|
|
4063
|
+
* - v14.x: New message design introduced alongside existing
|
|
4064
|
+
* - v15.0.0: Complete replacement with new design
|
|
4065
|
+
*/
|
|
4028
4066
|
type AxMessage<IN> = {
|
|
4029
4067
|
role: 'user';
|
|
4030
4068
|
values: IN;
|
|
@@ -4229,12 +4267,18 @@ type InferFieldValueType<T> = T extends AxFieldType | AxFluentFieldType ? T['typ
|
|
|
4229
4267
|
}[] : {
|
|
4230
4268
|
format?: 'wav';
|
|
4231
4269
|
data: string;
|
|
4232
|
-
} : T['type'] extends 'file' ? T['isArray'] extends true ? {
|
|
4270
|
+
} : T['type'] extends 'file' ? T['isArray'] extends true ? ({
|
|
4233
4271
|
mimeType: string;
|
|
4234
4272
|
data: string;
|
|
4235
|
-
}
|
|
4273
|
+
} | {
|
|
4274
|
+
mimeType: string;
|
|
4275
|
+
fileUri: string;
|
|
4276
|
+
})[] : {
|
|
4236
4277
|
mimeType: string;
|
|
4237
4278
|
data: string;
|
|
4279
|
+
} | {
|
|
4280
|
+
mimeType: string;
|
|
4281
|
+
fileUri: string;
|
|
4238
4282
|
} : T['type'] extends 'url' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'code' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'class' ? T['options'] extends readonly (infer U)[] ? T['isArray'] extends true ? U[] : U : T['isArray'] extends true ? string[] : string : any : any;
|
|
4239
4283
|
interface AxFluentFieldInfo<TType extends AxFieldType['type'] = AxFieldType['type'], TIsArray extends boolean = false, TOptions extends readonly string[] = readonly string[], TIsOptional extends boolean = false> {
|
|
4240
4284
|
readonly type: TType;
|
|
@@ -4256,12 +4300,18 @@ type InferFluentType<T extends AxFluentFieldInfo<any, any, any, any> | AxFluentF
|
|
|
4256
4300
|
}[] : {
|
|
4257
4301
|
format?: 'wav';
|
|
4258
4302
|
data: string;
|
|
4259
|
-
} : T['type'] extends 'file' ? T['isArray'] extends true ? {
|
|
4303
|
+
} : T['type'] extends 'file' ? T['isArray'] extends true ? ({
|
|
4260
4304
|
mimeType: string;
|
|
4261
4305
|
data: string;
|
|
4262
|
-
}
|
|
4306
|
+
} | {
|
|
4307
|
+
mimeType: string;
|
|
4308
|
+
fileUri: string;
|
|
4309
|
+
})[] : {
|
|
4263
4310
|
mimeType: string;
|
|
4264
4311
|
data: string;
|
|
4312
|
+
} | {
|
|
4313
|
+
mimeType: string;
|
|
4314
|
+
fileUri: string;
|
|
4265
4315
|
} : T['type'] extends 'url' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'code' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'class' ? T['options'] extends readonly (infer U)[] ? T['isArray'] extends true ? U[] : U : T['isArray'] extends true ? string[] : string : any;
|
|
4266
4316
|
interface AxSignatureConfig {
|
|
4267
4317
|
description?: string;
|
package/index.d.ts
CHANGED
|
@@ -319,12 +319,24 @@ type AxChatRequest<TModel = string> = {
|
|
|
319
319
|
/** Duration of audio in seconds */
|
|
320
320
|
duration?: number;
|
|
321
321
|
} | {
|
|
322
|
-
/** File content type */
|
|
322
|
+
/** File content type with inline data */
|
|
323
323
|
type: 'file';
|
|
324
|
-
/** File data as base64
|
|
324
|
+
/** File data as base64 */
|
|
325
325
|
data: string;
|
|
326
326
|
/** Original filename */
|
|
327
|
-
filename
|
|
327
|
+
filename?: string;
|
|
328
|
+
/** MIME type of the file */
|
|
329
|
+
mimeType: string;
|
|
330
|
+
cache?: boolean;
|
|
331
|
+
/** Pre-extracted text content for fallback */
|
|
332
|
+
extractedText?: string;
|
|
333
|
+
} | {
|
|
334
|
+
/** File content type with cloud storage URI */
|
|
335
|
+
type: 'file';
|
|
336
|
+
/** File URI (e.g., gs:// URL) */
|
|
337
|
+
fileUri: string;
|
|
338
|
+
/** Original filename */
|
|
339
|
+
filename?: string;
|
|
328
340
|
/** MIME type of the file */
|
|
329
341
|
mimeType: string;
|
|
330
342
|
cache?: boolean;
|
|
@@ -3707,7 +3719,14 @@ declare class AxMemory implements AxAIMemory {
|
|
|
3707
3719
|
} | {
|
|
3708
3720
|
type: "file";
|
|
3709
3721
|
data: string;
|
|
3710
|
-
filename
|
|
3722
|
+
filename?: string;
|
|
3723
|
+
mimeType: string;
|
|
3724
|
+
cache?: boolean;
|
|
3725
|
+
extractedText?: string;
|
|
3726
|
+
} | {
|
|
3727
|
+
type: "file";
|
|
3728
|
+
fileUri: string;
|
|
3729
|
+
filename?: string;
|
|
3711
3730
|
mimeType: string;
|
|
3712
3731
|
cache?: boolean;
|
|
3713
3732
|
extractedText?: string;
|
|
@@ -3828,7 +3847,14 @@ declare class AxPromptTemplate {
|
|
|
3828
3847
|
} | {
|
|
3829
3848
|
type: "file";
|
|
3830
3849
|
data: string;
|
|
3831
|
-
filename
|
|
3850
|
+
filename?: string;
|
|
3851
|
+
mimeType: string;
|
|
3852
|
+
cache?: boolean;
|
|
3853
|
+
extractedText?: string;
|
|
3854
|
+
} | {
|
|
3855
|
+
type: "file";
|
|
3856
|
+
fileUri: string;
|
|
3857
|
+
filename?: string;
|
|
3832
3858
|
mimeType: string;
|
|
3833
3859
|
cache?: boolean;
|
|
3834
3860
|
extractedText?: string;
|
|
@@ -3869,6 +3895,9 @@ interface TypeMap {
|
|
|
3869
3895
|
file: {
|
|
3870
3896
|
mimeType: string;
|
|
3871
3897
|
data: string;
|
|
3898
|
+
} | {
|
|
3899
|
+
mimeType: string;
|
|
3900
|
+
fileUri: string;
|
|
3872
3901
|
};
|
|
3873
3902
|
url: string;
|
|
3874
3903
|
code: string;
|
|
@@ -4025,6 +4054,15 @@ type AxGenIn = {
|
|
|
4025
4054
|
type AxGenOut = {
|
|
4026
4055
|
[key: string]: AxFieldValue;
|
|
4027
4056
|
};
|
|
4057
|
+
/**
|
|
4058
|
+
* @deprecated AxMessage will be updated to a new design within this major version.
|
|
4059
|
+
* The current structure will be replaced in v15.0.0.
|
|
4060
|
+
*
|
|
4061
|
+
* Migration timeline:
|
|
4062
|
+
* - v14.0.0+: Deprecation warnings (current)
|
|
4063
|
+
* - v14.x: New message design introduced alongside existing
|
|
4064
|
+
* - v15.0.0: Complete replacement with new design
|
|
4065
|
+
*/
|
|
4028
4066
|
type AxMessage<IN> = {
|
|
4029
4067
|
role: 'user';
|
|
4030
4068
|
values: IN;
|
|
@@ -4229,12 +4267,18 @@ type InferFieldValueType<T> = T extends AxFieldType | AxFluentFieldType ? T['typ
|
|
|
4229
4267
|
}[] : {
|
|
4230
4268
|
format?: 'wav';
|
|
4231
4269
|
data: string;
|
|
4232
|
-
} : T['type'] extends 'file' ? T['isArray'] extends true ? {
|
|
4270
|
+
} : T['type'] extends 'file' ? T['isArray'] extends true ? ({
|
|
4233
4271
|
mimeType: string;
|
|
4234
4272
|
data: string;
|
|
4235
|
-
}
|
|
4273
|
+
} | {
|
|
4274
|
+
mimeType: string;
|
|
4275
|
+
fileUri: string;
|
|
4276
|
+
})[] : {
|
|
4236
4277
|
mimeType: string;
|
|
4237
4278
|
data: string;
|
|
4279
|
+
} | {
|
|
4280
|
+
mimeType: string;
|
|
4281
|
+
fileUri: string;
|
|
4238
4282
|
} : T['type'] extends 'url' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'code' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'class' ? T['options'] extends readonly (infer U)[] ? T['isArray'] extends true ? U[] : U : T['isArray'] extends true ? string[] : string : any : any;
|
|
4239
4283
|
interface AxFluentFieldInfo<TType extends AxFieldType['type'] = AxFieldType['type'], TIsArray extends boolean = false, TOptions extends readonly string[] = readonly string[], TIsOptional extends boolean = false> {
|
|
4240
4284
|
readonly type: TType;
|
|
@@ -4256,12 +4300,18 @@ type InferFluentType<T extends AxFluentFieldInfo<any, any, any, any> | AxFluentF
|
|
|
4256
4300
|
}[] : {
|
|
4257
4301
|
format?: 'wav';
|
|
4258
4302
|
data: string;
|
|
4259
|
-
} : T['type'] extends 'file' ? T['isArray'] extends true ? {
|
|
4303
|
+
} : T['type'] extends 'file' ? T['isArray'] extends true ? ({
|
|
4260
4304
|
mimeType: string;
|
|
4261
4305
|
data: string;
|
|
4262
|
-
}
|
|
4306
|
+
} | {
|
|
4307
|
+
mimeType: string;
|
|
4308
|
+
fileUri: string;
|
|
4309
|
+
})[] : {
|
|
4263
4310
|
mimeType: string;
|
|
4264
4311
|
data: string;
|
|
4312
|
+
} | {
|
|
4313
|
+
mimeType: string;
|
|
4314
|
+
fileUri: string;
|
|
4265
4315
|
} : T['type'] extends 'url' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'code' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'class' ? T['options'] extends readonly (infer U)[] ? T['isArray'] extends true ? U[] : U : T['isArray'] extends true ? string[] : string : any;
|
|
4266
4316
|
interface AxSignatureConfig {
|
|
4267
4317
|
description?: string;
|