@cloudflare/workers-types 4.20250313.0 → 4.20250317.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2021-11-03/index.d.ts +39 -1
- package/2021-11-03/index.ts +39 -1
- package/2022-01-31/index.d.ts +39 -1
- package/2022-01-31/index.ts +39 -1
- package/2022-03-21/index.d.ts +39 -1
- package/2022-03-21/index.ts +39 -1
- package/2022-08-04/index.d.ts +39 -1
- package/2022-08-04/index.ts +39 -1
- package/2022-10-31/index.d.ts +39 -1
- package/2022-10-31/index.ts +39 -1
- package/2022-11-30/index.d.ts +39 -1
- package/2022-11-30/index.ts +39 -1
- package/2023-03-01/index.d.ts +39 -1
- package/2023-03-01/index.ts +39 -1
- package/2023-07-01/index.d.ts +39 -1
- package/2023-07-01/index.ts +39 -1
- package/experimental/index.d.ts +39 -1
- package/experimental/index.ts +39 -1
- package/index.d.ts +39 -1
- package/index.ts +39 -1
- package/oldest/index.d.ts +39 -1
- package/oldest/index.ts +39 -1
- package/package.json +1 -1
package/2021-11-03/index.d.ts
CHANGED
|
@@ -4278,6 +4278,7 @@ type AiModelListType = Record<string, any>;
|
|
|
4278
4278
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
4279
4279
|
aiGatewayLogId: string | null;
|
|
4280
4280
|
gateway(gatewayId: string): AiGateway;
|
|
4281
|
+
autorag(autoragId: string): AutoRAG;
|
|
4281
4282
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4282
4283
|
model: Name,
|
|
4283
4284
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4297,6 +4298,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4297
4298
|
}[],
|
|
4298
4299
|
options?: {
|
|
4299
4300
|
gateway?: GatewayOptions;
|
|
4301
|
+
extraHeaders?: object;
|
|
4300
4302
|
},
|
|
4301
4303
|
): Promise<ConversionResponse[]>;
|
|
4302
4304
|
public toMarkdown(
|
|
@@ -4306,6 +4308,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4306
4308
|
},
|
|
4307
4309
|
options?: {
|
|
4308
4310
|
gateway?: GatewayOptions;
|
|
4311
|
+
extraHeaders?: object;
|
|
4309
4312
|
},
|
|
4310
4313
|
): Promise<ConversionResponse>;
|
|
4311
4314
|
}
|
|
@@ -4405,7 +4408,42 @@ declare abstract class AiGateway {
|
|
|
4405
4408
|
run(
|
|
4406
4409
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4407
4410
|
): Promise<Response>;
|
|
4408
|
-
getUrl(provider
|
|
4411
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4412
|
+
}
|
|
4413
|
+
interface AutoRAGInternalError extends Error {}
|
|
4414
|
+
interface AutoRAGNotFoundError extends Error {}
|
|
4415
|
+
interface AutoRAGUnauthorizedError extends Error {}
|
|
4416
|
+
type AutoRagSearchRequest = {
|
|
4417
|
+
query: string;
|
|
4418
|
+
max_num_results?: number;
|
|
4419
|
+
ranking_options?: {
|
|
4420
|
+
ranker?: string;
|
|
4421
|
+
score_threshold?: number;
|
|
4422
|
+
};
|
|
4423
|
+
rewrite_query?: boolean;
|
|
4424
|
+
};
|
|
4425
|
+
type AutoRagSearchResponse = {
|
|
4426
|
+
object: "vector_store.search_results.page";
|
|
4427
|
+
search_query: string;
|
|
4428
|
+
data: {
|
|
4429
|
+
file_id: string;
|
|
4430
|
+
filename: string;
|
|
4431
|
+
score: number;
|
|
4432
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4433
|
+
content: {
|
|
4434
|
+
type: "text";
|
|
4435
|
+
text: string;
|
|
4436
|
+
}[];
|
|
4437
|
+
}[];
|
|
4438
|
+
has_more: boolean;
|
|
4439
|
+
next_page: string | null;
|
|
4440
|
+
};
|
|
4441
|
+
type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4442
|
+
response: string;
|
|
4443
|
+
};
|
|
4444
|
+
declare abstract class AutoRAG {
|
|
4445
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4446
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4409
4447
|
}
|
|
4410
4448
|
interface BasicImageTransformations {
|
|
4411
4449
|
/**
|
package/2021-11-03/index.ts
CHANGED
|
@@ -4292,6 +4292,7 @@ export declare abstract class Ai<
|
|
|
4292
4292
|
> {
|
|
4293
4293
|
aiGatewayLogId: string | null;
|
|
4294
4294
|
gateway(gatewayId: string): AiGateway;
|
|
4295
|
+
autorag(autoragId: string): AutoRAG;
|
|
4295
4296
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4296
4297
|
model: Name,
|
|
4297
4298
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4311,6 +4312,7 @@ export declare abstract class Ai<
|
|
|
4311
4312
|
}[],
|
|
4312
4313
|
options?: {
|
|
4313
4314
|
gateway?: GatewayOptions;
|
|
4315
|
+
extraHeaders?: object;
|
|
4314
4316
|
},
|
|
4315
4317
|
): Promise<ConversionResponse[]>;
|
|
4316
4318
|
public toMarkdown(
|
|
@@ -4320,6 +4322,7 @@ export declare abstract class Ai<
|
|
|
4320
4322
|
},
|
|
4321
4323
|
options?: {
|
|
4322
4324
|
gateway?: GatewayOptions;
|
|
4325
|
+
extraHeaders?: object;
|
|
4323
4326
|
},
|
|
4324
4327
|
): Promise<ConversionResponse>;
|
|
4325
4328
|
}
|
|
@@ -4419,7 +4422,42 @@ export declare abstract class AiGateway {
|
|
|
4419
4422
|
run(
|
|
4420
4423
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4421
4424
|
): Promise<Response>;
|
|
4422
|
-
getUrl(provider
|
|
4425
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4426
|
+
}
|
|
4427
|
+
export interface AutoRAGInternalError extends Error {}
|
|
4428
|
+
export interface AutoRAGNotFoundError extends Error {}
|
|
4429
|
+
export interface AutoRAGUnauthorizedError extends Error {}
|
|
4430
|
+
export type AutoRagSearchRequest = {
|
|
4431
|
+
query: string;
|
|
4432
|
+
max_num_results?: number;
|
|
4433
|
+
ranking_options?: {
|
|
4434
|
+
ranker?: string;
|
|
4435
|
+
score_threshold?: number;
|
|
4436
|
+
};
|
|
4437
|
+
rewrite_query?: boolean;
|
|
4438
|
+
};
|
|
4439
|
+
export type AutoRagSearchResponse = {
|
|
4440
|
+
object: "vector_store.search_results.page";
|
|
4441
|
+
search_query: string;
|
|
4442
|
+
data: {
|
|
4443
|
+
file_id: string;
|
|
4444
|
+
filename: string;
|
|
4445
|
+
score: number;
|
|
4446
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4447
|
+
content: {
|
|
4448
|
+
type: "text";
|
|
4449
|
+
text: string;
|
|
4450
|
+
}[];
|
|
4451
|
+
}[];
|
|
4452
|
+
has_more: boolean;
|
|
4453
|
+
next_page: string | null;
|
|
4454
|
+
};
|
|
4455
|
+
export type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4456
|
+
response: string;
|
|
4457
|
+
};
|
|
4458
|
+
export declare abstract class AutoRAG {
|
|
4459
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4460
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4423
4461
|
}
|
|
4424
4462
|
export interface BasicImageTransformations {
|
|
4425
4463
|
/**
|
package/2022-01-31/index.d.ts
CHANGED
|
@@ -4304,6 +4304,7 @@ type AiModelListType = Record<string, any>;
|
|
|
4304
4304
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
4305
4305
|
aiGatewayLogId: string | null;
|
|
4306
4306
|
gateway(gatewayId: string): AiGateway;
|
|
4307
|
+
autorag(autoragId: string): AutoRAG;
|
|
4307
4308
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4308
4309
|
model: Name,
|
|
4309
4310
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4323,6 +4324,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4323
4324
|
}[],
|
|
4324
4325
|
options?: {
|
|
4325
4326
|
gateway?: GatewayOptions;
|
|
4327
|
+
extraHeaders?: object;
|
|
4326
4328
|
},
|
|
4327
4329
|
): Promise<ConversionResponse[]>;
|
|
4328
4330
|
public toMarkdown(
|
|
@@ -4332,6 +4334,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4332
4334
|
},
|
|
4333
4335
|
options?: {
|
|
4334
4336
|
gateway?: GatewayOptions;
|
|
4337
|
+
extraHeaders?: object;
|
|
4335
4338
|
},
|
|
4336
4339
|
): Promise<ConversionResponse>;
|
|
4337
4340
|
}
|
|
@@ -4431,7 +4434,42 @@ declare abstract class AiGateway {
|
|
|
4431
4434
|
run(
|
|
4432
4435
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4433
4436
|
): Promise<Response>;
|
|
4434
|
-
getUrl(provider
|
|
4437
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4438
|
+
}
|
|
4439
|
+
interface AutoRAGInternalError extends Error {}
|
|
4440
|
+
interface AutoRAGNotFoundError extends Error {}
|
|
4441
|
+
interface AutoRAGUnauthorizedError extends Error {}
|
|
4442
|
+
type AutoRagSearchRequest = {
|
|
4443
|
+
query: string;
|
|
4444
|
+
max_num_results?: number;
|
|
4445
|
+
ranking_options?: {
|
|
4446
|
+
ranker?: string;
|
|
4447
|
+
score_threshold?: number;
|
|
4448
|
+
};
|
|
4449
|
+
rewrite_query?: boolean;
|
|
4450
|
+
};
|
|
4451
|
+
type AutoRagSearchResponse = {
|
|
4452
|
+
object: "vector_store.search_results.page";
|
|
4453
|
+
search_query: string;
|
|
4454
|
+
data: {
|
|
4455
|
+
file_id: string;
|
|
4456
|
+
filename: string;
|
|
4457
|
+
score: number;
|
|
4458
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4459
|
+
content: {
|
|
4460
|
+
type: "text";
|
|
4461
|
+
text: string;
|
|
4462
|
+
}[];
|
|
4463
|
+
}[];
|
|
4464
|
+
has_more: boolean;
|
|
4465
|
+
next_page: string | null;
|
|
4466
|
+
};
|
|
4467
|
+
type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4468
|
+
response: string;
|
|
4469
|
+
};
|
|
4470
|
+
declare abstract class AutoRAG {
|
|
4471
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4472
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4435
4473
|
}
|
|
4436
4474
|
interface BasicImageTransformations {
|
|
4437
4475
|
/**
|
package/2022-01-31/index.ts
CHANGED
|
@@ -4318,6 +4318,7 @@ export declare abstract class Ai<
|
|
|
4318
4318
|
> {
|
|
4319
4319
|
aiGatewayLogId: string | null;
|
|
4320
4320
|
gateway(gatewayId: string): AiGateway;
|
|
4321
|
+
autorag(autoragId: string): AutoRAG;
|
|
4321
4322
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4322
4323
|
model: Name,
|
|
4323
4324
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4337,6 +4338,7 @@ export declare abstract class Ai<
|
|
|
4337
4338
|
}[],
|
|
4338
4339
|
options?: {
|
|
4339
4340
|
gateway?: GatewayOptions;
|
|
4341
|
+
extraHeaders?: object;
|
|
4340
4342
|
},
|
|
4341
4343
|
): Promise<ConversionResponse[]>;
|
|
4342
4344
|
public toMarkdown(
|
|
@@ -4346,6 +4348,7 @@ export declare abstract class Ai<
|
|
|
4346
4348
|
},
|
|
4347
4349
|
options?: {
|
|
4348
4350
|
gateway?: GatewayOptions;
|
|
4351
|
+
extraHeaders?: object;
|
|
4349
4352
|
},
|
|
4350
4353
|
): Promise<ConversionResponse>;
|
|
4351
4354
|
}
|
|
@@ -4445,7 +4448,42 @@ export declare abstract class AiGateway {
|
|
|
4445
4448
|
run(
|
|
4446
4449
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4447
4450
|
): Promise<Response>;
|
|
4448
|
-
getUrl(provider
|
|
4451
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4452
|
+
}
|
|
4453
|
+
export interface AutoRAGInternalError extends Error {}
|
|
4454
|
+
export interface AutoRAGNotFoundError extends Error {}
|
|
4455
|
+
export interface AutoRAGUnauthorizedError extends Error {}
|
|
4456
|
+
export type AutoRagSearchRequest = {
|
|
4457
|
+
query: string;
|
|
4458
|
+
max_num_results?: number;
|
|
4459
|
+
ranking_options?: {
|
|
4460
|
+
ranker?: string;
|
|
4461
|
+
score_threshold?: number;
|
|
4462
|
+
};
|
|
4463
|
+
rewrite_query?: boolean;
|
|
4464
|
+
};
|
|
4465
|
+
export type AutoRagSearchResponse = {
|
|
4466
|
+
object: "vector_store.search_results.page";
|
|
4467
|
+
search_query: string;
|
|
4468
|
+
data: {
|
|
4469
|
+
file_id: string;
|
|
4470
|
+
filename: string;
|
|
4471
|
+
score: number;
|
|
4472
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4473
|
+
content: {
|
|
4474
|
+
type: "text";
|
|
4475
|
+
text: string;
|
|
4476
|
+
}[];
|
|
4477
|
+
}[];
|
|
4478
|
+
has_more: boolean;
|
|
4479
|
+
next_page: string | null;
|
|
4480
|
+
};
|
|
4481
|
+
export type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4482
|
+
response: string;
|
|
4483
|
+
};
|
|
4484
|
+
export declare abstract class AutoRAG {
|
|
4485
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4486
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4449
4487
|
}
|
|
4450
4488
|
export interface BasicImageTransformations {
|
|
4451
4489
|
/**
|
package/2022-03-21/index.d.ts
CHANGED
|
@@ -4329,6 +4329,7 @@ type AiModelListType = Record<string, any>;
|
|
|
4329
4329
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
4330
4330
|
aiGatewayLogId: string | null;
|
|
4331
4331
|
gateway(gatewayId: string): AiGateway;
|
|
4332
|
+
autorag(autoragId: string): AutoRAG;
|
|
4332
4333
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4333
4334
|
model: Name,
|
|
4334
4335
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4348,6 +4349,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4348
4349
|
}[],
|
|
4349
4350
|
options?: {
|
|
4350
4351
|
gateway?: GatewayOptions;
|
|
4352
|
+
extraHeaders?: object;
|
|
4351
4353
|
},
|
|
4352
4354
|
): Promise<ConversionResponse[]>;
|
|
4353
4355
|
public toMarkdown(
|
|
@@ -4357,6 +4359,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4357
4359
|
},
|
|
4358
4360
|
options?: {
|
|
4359
4361
|
gateway?: GatewayOptions;
|
|
4362
|
+
extraHeaders?: object;
|
|
4360
4363
|
},
|
|
4361
4364
|
): Promise<ConversionResponse>;
|
|
4362
4365
|
}
|
|
@@ -4456,7 +4459,42 @@ declare abstract class AiGateway {
|
|
|
4456
4459
|
run(
|
|
4457
4460
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4458
4461
|
): Promise<Response>;
|
|
4459
|
-
getUrl(provider
|
|
4462
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4463
|
+
}
|
|
4464
|
+
interface AutoRAGInternalError extends Error {}
|
|
4465
|
+
interface AutoRAGNotFoundError extends Error {}
|
|
4466
|
+
interface AutoRAGUnauthorizedError extends Error {}
|
|
4467
|
+
type AutoRagSearchRequest = {
|
|
4468
|
+
query: string;
|
|
4469
|
+
max_num_results?: number;
|
|
4470
|
+
ranking_options?: {
|
|
4471
|
+
ranker?: string;
|
|
4472
|
+
score_threshold?: number;
|
|
4473
|
+
};
|
|
4474
|
+
rewrite_query?: boolean;
|
|
4475
|
+
};
|
|
4476
|
+
type AutoRagSearchResponse = {
|
|
4477
|
+
object: "vector_store.search_results.page";
|
|
4478
|
+
search_query: string;
|
|
4479
|
+
data: {
|
|
4480
|
+
file_id: string;
|
|
4481
|
+
filename: string;
|
|
4482
|
+
score: number;
|
|
4483
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4484
|
+
content: {
|
|
4485
|
+
type: "text";
|
|
4486
|
+
text: string;
|
|
4487
|
+
}[];
|
|
4488
|
+
}[];
|
|
4489
|
+
has_more: boolean;
|
|
4490
|
+
next_page: string | null;
|
|
4491
|
+
};
|
|
4492
|
+
type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4493
|
+
response: string;
|
|
4494
|
+
};
|
|
4495
|
+
declare abstract class AutoRAG {
|
|
4496
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4497
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4460
4498
|
}
|
|
4461
4499
|
interface BasicImageTransformations {
|
|
4462
4500
|
/**
|
package/2022-03-21/index.ts
CHANGED
|
@@ -4343,6 +4343,7 @@ export declare abstract class Ai<
|
|
|
4343
4343
|
> {
|
|
4344
4344
|
aiGatewayLogId: string | null;
|
|
4345
4345
|
gateway(gatewayId: string): AiGateway;
|
|
4346
|
+
autorag(autoragId: string): AutoRAG;
|
|
4346
4347
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4347
4348
|
model: Name,
|
|
4348
4349
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4362,6 +4363,7 @@ export declare abstract class Ai<
|
|
|
4362
4363
|
}[],
|
|
4363
4364
|
options?: {
|
|
4364
4365
|
gateway?: GatewayOptions;
|
|
4366
|
+
extraHeaders?: object;
|
|
4365
4367
|
},
|
|
4366
4368
|
): Promise<ConversionResponse[]>;
|
|
4367
4369
|
public toMarkdown(
|
|
@@ -4371,6 +4373,7 @@ export declare abstract class Ai<
|
|
|
4371
4373
|
},
|
|
4372
4374
|
options?: {
|
|
4373
4375
|
gateway?: GatewayOptions;
|
|
4376
|
+
extraHeaders?: object;
|
|
4374
4377
|
},
|
|
4375
4378
|
): Promise<ConversionResponse>;
|
|
4376
4379
|
}
|
|
@@ -4470,7 +4473,42 @@ export declare abstract class AiGateway {
|
|
|
4470
4473
|
run(
|
|
4471
4474
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4472
4475
|
): Promise<Response>;
|
|
4473
|
-
getUrl(provider
|
|
4476
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4477
|
+
}
|
|
4478
|
+
export interface AutoRAGInternalError extends Error {}
|
|
4479
|
+
export interface AutoRAGNotFoundError extends Error {}
|
|
4480
|
+
export interface AutoRAGUnauthorizedError extends Error {}
|
|
4481
|
+
export type AutoRagSearchRequest = {
|
|
4482
|
+
query: string;
|
|
4483
|
+
max_num_results?: number;
|
|
4484
|
+
ranking_options?: {
|
|
4485
|
+
ranker?: string;
|
|
4486
|
+
score_threshold?: number;
|
|
4487
|
+
};
|
|
4488
|
+
rewrite_query?: boolean;
|
|
4489
|
+
};
|
|
4490
|
+
export type AutoRagSearchResponse = {
|
|
4491
|
+
object: "vector_store.search_results.page";
|
|
4492
|
+
search_query: string;
|
|
4493
|
+
data: {
|
|
4494
|
+
file_id: string;
|
|
4495
|
+
filename: string;
|
|
4496
|
+
score: number;
|
|
4497
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4498
|
+
content: {
|
|
4499
|
+
type: "text";
|
|
4500
|
+
text: string;
|
|
4501
|
+
}[];
|
|
4502
|
+
}[];
|
|
4503
|
+
has_more: boolean;
|
|
4504
|
+
next_page: string | null;
|
|
4505
|
+
};
|
|
4506
|
+
export type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4507
|
+
response: string;
|
|
4508
|
+
};
|
|
4509
|
+
export declare abstract class AutoRAG {
|
|
4510
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4511
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4474
4512
|
}
|
|
4475
4513
|
export interface BasicImageTransformations {
|
|
4476
4514
|
/**
|
package/2022-08-04/index.d.ts
CHANGED
|
@@ -4330,6 +4330,7 @@ type AiModelListType = Record<string, any>;
|
|
|
4330
4330
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
4331
4331
|
aiGatewayLogId: string | null;
|
|
4332
4332
|
gateway(gatewayId: string): AiGateway;
|
|
4333
|
+
autorag(autoragId: string): AutoRAG;
|
|
4333
4334
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4334
4335
|
model: Name,
|
|
4335
4336
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4349,6 +4350,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4349
4350
|
}[],
|
|
4350
4351
|
options?: {
|
|
4351
4352
|
gateway?: GatewayOptions;
|
|
4353
|
+
extraHeaders?: object;
|
|
4352
4354
|
},
|
|
4353
4355
|
): Promise<ConversionResponse[]>;
|
|
4354
4356
|
public toMarkdown(
|
|
@@ -4358,6 +4360,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4358
4360
|
},
|
|
4359
4361
|
options?: {
|
|
4360
4362
|
gateway?: GatewayOptions;
|
|
4363
|
+
extraHeaders?: object;
|
|
4361
4364
|
},
|
|
4362
4365
|
): Promise<ConversionResponse>;
|
|
4363
4366
|
}
|
|
@@ -4457,7 +4460,42 @@ declare abstract class AiGateway {
|
|
|
4457
4460
|
run(
|
|
4458
4461
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4459
4462
|
): Promise<Response>;
|
|
4460
|
-
getUrl(provider
|
|
4463
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4464
|
+
}
|
|
4465
|
+
interface AutoRAGInternalError extends Error {}
|
|
4466
|
+
interface AutoRAGNotFoundError extends Error {}
|
|
4467
|
+
interface AutoRAGUnauthorizedError extends Error {}
|
|
4468
|
+
type AutoRagSearchRequest = {
|
|
4469
|
+
query: string;
|
|
4470
|
+
max_num_results?: number;
|
|
4471
|
+
ranking_options?: {
|
|
4472
|
+
ranker?: string;
|
|
4473
|
+
score_threshold?: number;
|
|
4474
|
+
};
|
|
4475
|
+
rewrite_query?: boolean;
|
|
4476
|
+
};
|
|
4477
|
+
type AutoRagSearchResponse = {
|
|
4478
|
+
object: "vector_store.search_results.page";
|
|
4479
|
+
search_query: string;
|
|
4480
|
+
data: {
|
|
4481
|
+
file_id: string;
|
|
4482
|
+
filename: string;
|
|
4483
|
+
score: number;
|
|
4484
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4485
|
+
content: {
|
|
4486
|
+
type: "text";
|
|
4487
|
+
text: string;
|
|
4488
|
+
}[];
|
|
4489
|
+
}[];
|
|
4490
|
+
has_more: boolean;
|
|
4491
|
+
next_page: string | null;
|
|
4492
|
+
};
|
|
4493
|
+
type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4494
|
+
response: string;
|
|
4495
|
+
};
|
|
4496
|
+
declare abstract class AutoRAG {
|
|
4497
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4498
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4461
4499
|
}
|
|
4462
4500
|
interface BasicImageTransformations {
|
|
4463
4501
|
/**
|
package/2022-08-04/index.ts
CHANGED
|
@@ -4344,6 +4344,7 @@ export declare abstract class Ai<
|
|
|
4344
4344
|
> {
|
|
4345
4345
|
aiGatewayLogId: string | null;
|
|
4346
4346
|
gateway(gatewayId: string): AiGateway;
|
|
4347
|
+
autorag(autoragId: string): AutoRAG;
|
|
4347
4348
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4348
4349
|
model: Name,
|
|
4349
4350
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4363,6 +4364,7 @@ export declare abstract class Ai<
|
|
|
4363
4364
|
}[],
|
|
4364
4365
|
options?: {
|
|
4365
4366
|
gateway?: GatewayOptions;
|
|
4367
|
+
extraHeaders?: object;
|
|
4366
4368
|
},
|
|
4367
4369
|
): Promise<ConversionResponse[]>;
|
|
4368
4370
|
public toMarkdown(
|
|
@@ -4372,6 +4374,7 @@ export declare abstract class Ai<
|
|
|
4372
4374
|
},
|
|
4373
4375
|
options?: {
|
|
4374
4376
|
gateway?: GatewayOptions;
|
|
4377
|
+
extraHeaders?: object;
|
|
4375
4378
|
},
|
|
4376
4379
|
): Promise<ConversionResponse>;
|
|
4377
4380
|
}
|
|
@@ -4471,7 +4474,42 @@ export declare abstract class AiGateway {
|
|
|
4471
4474
|
run(
|
|
4472
4475
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4473
4476
|
): Promise<Response>;
|
|
4474
|
-
getUrl(provider
|
|
4477
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4478
|
+
}
|
|
4479
|
+
export interface AutoRAGInternalError extends Error {}
|
|
4480
|
+
export interface AutoRAGNotFoundError extends Error {}
|
|
4481
|
+
export interface AutoRAGUnauthorizedError extends Error {}
|
|
4482
|
+
export type AutoRagSearchRequest = {
|
|
4483
|
+
query: string;
|
|
4484
|
+
max_num_results?: number;
|
|
4485
|
+
ranking_options?: {
|
|
4486
|
+
ranker?: string;
|
|
4487
|
+
score_threshold?: number;
|
|
4488
|
+
};
|
|
4489
|
+
rewrite_query?: boolean;
|
|
4490
|
+
};
|
|
4491
|
+
export type AutoRagSearchResponse = {
|
|
4492
|
+
object: "vector_store.search_results.page";
|
|
4493
|
+
search_query: string;
|
|
4494
|
+
data: {
|
|
4495
|
+
file_id: string;
|
|
4496
|
+
filename: string;
|
|
4497
|
+
score: number;
|
|
4498
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4499
|
+
content: {
|
|
4500
|
+
type: "text";
|
|
4501
|
+
text: string;
|
|
4502
|
+
}[];
|
|
4503
|
+
}[];
|
|
4504
|
+
has_more: boolean;
|
|
4505
|
+
next_page: string | null;
|
|
4506
|
+
};
|
|
4507
|
+
export type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4508
|
+
response: string;
|
|
4509
|
+
};
|
|
4510
|
+
export declare abstract class AutoRAG {
|
|
4511
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4512
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4475
4513
|
}
|
|
4476
4514
|
export interface BasicImageTransformations {
|
|
4477
4515
|
/**
|
package/2022-10-31/index.d.ts
CHANGED
|
@@ -4334,6 +4334,7 @@ type AiModelListType = Record<string, any>;
|
|
|
4334
4334
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
4335
4335
|
aiGatewayLogId: string | null;
|
|
4336
4336
|
gateway(gatewayId: string): AiGateway;
|
|
4337
|
+
autorag(autoragId: string): AutoRAG;
|
|
4337
4338
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4338
4339
|
model: Name,
|
|
4339
4340
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4353,6 +4354,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4353
4354
|
}[],
|
|
4354
4355
|
options?: {
|
|
4355
4356
|
gateway?: GatewayOptions;
|
|
4357
|
+
extraHeaders?: object;
|
|
4356
4358
|
},
|
|
4357
4359
|
): Promise<ConversionResponse[]>;
|
|
4358
4360
|
public toMarkdown(
|
|
@@ -4362,6 +4364,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
4362
4364
|
},
|
|
4363
4365
|
options?: {
|
|
4364
4366
|
gateway?: GatewayOptions;
|
|
4367
|
+
extraHeaders?: object;
|
|
4365
4368
|
},
|
|
4366
4369
|
): Promise<ConversionResponse>;
|
|
4367
4370
|
}
|
|
@@ -4461,7 +4464,42 @@ declare abstract class AiGateway {
|
|
|
4461
4464
|
run(
|
|
4462
4465
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4463
4466
|
): Promise<Response>;
|
|
4464
|
-
getUrl(provider
|
|
4467
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4468
|
+
}
|
|
4469
|
+
interface AutoRAGInternalError extends Error {}
|
|
4470
|
+
interface AutoRAGNotFoundError extends Error {}
|
|
4471
|
+
interface AutoRAGUnauthorizedError extends Error {}
|
|
4472
|
+
type AutoRagSearchRequest = {
|
|
4473
|
+
query: string;
|
|
4474
|
+
max_num_results?: number;
|
|
4475
|
+
ranking_options?: {
|
|
4476
|
+
ranker?: string;
|
|
4477
|
+
score_threshold?: number;
|
|
4478
|
+
};
|
|
4479
|
+
rewrite_query?: boolean;
|
|
4480
|
+
};
|
|
4481
|
+
type AutoRagSearchResponse = {
|
|
4482
|
+
object: "vector_store.search_results.page";
|
|
4483
|
+
search_query: string;
|
|
4484
|
+
data: {
|
|
4485
|
+
file_id: string;
|
|
4486
|
+
filename: string;
|
|
4487
|
+
score: number;
|
|
4488
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4489
|
+
content: {
|
|
4490
|
+
type: "text";
|
|
4491
|
+
text: string;
|
|
4492
|
+
}[];
|
|
4493
|
+
}[];
|
|
4494
|
+
has_more: boolean;
|
|
4495
|
+
next_page: string | null;
|
|
4496
|
+
};
|
|
4497
|
+
type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4498
|
+
response: string;
|
|
4499
|
+
};
|
|
4500
|
+
declare abstract class AutoRAG {
|
|
4501
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4502
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4465
4503
|
}
|
|
4466
4504
|
interface BasicImageTransformations {
|
|
4467
4505
|
/**
|
package/2022-10-31/index.ts
CHANGED
|
@@ -4348,6 +4348,7 @@ export declare abstract class Ai<
|
|
|
4348
4348
|
> {
|
|
4349
4349
|
aiGatewayLogId: string | null;
|
|
4350
4350
|
gateway(gatewayId: string): AiGateway;
|
|
4351
|
+
autorag(autoragId: string): AutoRAG;
|
|
4351
4352
|
run<Name extends keyof AiModelList, Options extends AiOptions>(
|
|
4352
4353
|
model: Name,
|
|
4353
4354
|
inputs: AiModelList[Name]["inputs"],
|
|
@@ -4367,6 +4368,7 @@ export declare abstract class Ai<
|
|
|
4367
4368
|
}[],
|
|
4368
4369
|
options?: {
|
|
4369
4370
|
gateway?: GatewayOptions;
|
|
4371
|
+
extraHeaders?: object;
|
|
4370
4372
|
},
|
|
4371
4373
|
): Promise<ConversionResponse[]>;
|
|
4372
4374
|
public toMarkdown(
|
|
@@ -4376,6 +4378,7 @@ export declare abstract class Ai<
|
|
|
4376
4378
|
},
|
|
4377
4379
|
options?: {
|
|
4378
4380
|
gateway?: GatewayOptions;
|
|
4381
|
+
extraHeaders?: object;
|
|
4379
4382
|
},
|
|
4380
4383
|
): Promise<ConversionResponse>;
|
|
4381
4384
|
}
|
|
@@ -4475,7 +4478,42 @@ export declare abstract class AiGateway {
|
|
|
4475
4478
|
run(
|
|
4476
4479
|
data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
|
|
4477
4480
|
): Promise<Response>;
|
|
4478
|
-
getUrl(provider
|
|
4481
|
+
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
|
4482
|
+
}
|
|
4483
|
+
export interface AutoRAGInternalError extends Error {}
|
|
4484
|
+
export interface AutoRAGNotFoundError extends Error {}
|
|
4485
|
+
export interface AutoRAGUnauthorizedError extends Error {}
|
|
4486
|
+
export type AutoRagSearchRequest = {
|
|
4487
|
+
query: string;
|
|
4488
|
+
max_num_results?: number;
|
|
4489
|
+
ranking_options?: {
|
|
4490
|
+
ranker?: string;
|
|
4491
|
+
score_threshold?: number;
|
|
4492
|
+
};
|
|
4493
|
+
rewrite_query?: boolean;
|
|
4494
|
+
};
|
|
4495
|
+
export type AutoRagSearchResponse = {
|
|
4496
|
+
object: "vector_store.search_results.page";
|
|
4497
|
+
search_query: string;
|
|
4498
|
+
data: {
|
|
4499
|
+
file_id: string;
|
|
4500
|
+
filename: string;
|
|
4501
|
+
score: number;
|
|
4502
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
4503
|
+
content: {
|
|
4504
|
+
type: "text";
|
|
4505
|
+
text: string;
|
|
4506
|
+
}[];
|
|
4507
|
+
}[];
|
|
4508
|
+
has_more: boolean;
|
|
4509
|
+
next_page: string | null;
|
|
4510
|
+
};
|
|
4511
|
+
export type AutoRagAiSearchResponse = AutoRagSearchResponse & {
|
|
4512
|
+
response: string;
|
|
4513
|
+
};
|
|
4514
|
+
export declare abstract class AutoRAG {
|
|
4515
|
+
search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
|
|
4516
|
+
aiSearch(params: AutoRagSearchRequest): Promise<AutoRagAiSearchResponse>;
|
|
4479
4517
|
}
|
|
4480
4518
|
export interface BasicImageTransformations {
|
|
4481
4519
|
/**
|