objectiveai 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +194 -374
- package/dist/index.d.ts +11349 -15877
- package/dist/index.js +194 -374
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2107,62 +2107,54 @@ export var Function;
|
|
|
2107
2107
|
profile: Vector.Completions.Request.ProfileSchema,
|
|
2108
2108
|
})
|
|
2109
2109
|
.describe("A vector completion profile containing an Ensemble and array of weights.");
|
|
2110
|
-
Function_1.
|
|
2110
|
+
Function_1.FunctionProfileCommitRequiredSchema = z
|
|
2111
2111
|
.union([
|
|
2112
2112
|
z.object({
|
|
2113
|
-
|
|
2113
|
+
owner: z
|
|
2114
2114
|
.string()
|
|
2115
|
-
.describe("The
|
|
2116
|
-
|
|
2115
|
+
.describe("The owner of the GitHub repository containing the profile."),
|
|
2116
|
+
repository: z
|
|
2117
2117
|
.string()
|
|
2118
|
-
.describe("The
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2118
|
+
.describe("The name of the GitHub repository containing the profile."),
|
|
2119
|
+
commit: z
|
|
2120
|
+
.string()
|
|
2121
|
+
.describe("The commit SHA of the GitHub repository containing the profile."),
|
|
2122
2122
|
}),
|
|
2123
|
-
z.lazy(() => z.array(Function_1.
|
|
2124
|
-
title: "
|
|
2123
|
+
z.lazy(() => z.array(Function_1.ProfileCommitRequiredSchema).meta({
|
|
2124
|
+
title: "ProfileCommitRequiredArray",
|
|
2125
2125
|
recursive: true,
|
|
2126
2126
|
})),
|
|
2127
2127
|
])
|
|
2128
|
-
.describe("A function profile where remote profiles must specify a
|
|
2129
|
-
Function_1.
|
|
2128
|
+
.describe("A function profile where remote profiles must specify a commit.");
|
|
2129
|
+
Function_1.FunctionProfileCommitOptionalSchema = z
|
|
2130
2130
|
.union([
|
|
2131
2131
|
z.object({
|
|
2132
|
-
|
|
2132
|
+
owner: z
|
|
2133
2133
|
.string()
|
|
2134
|
-
.describe("The
|
|
2135
|
-
|
|
2134
|
+
.describe("The owner of the GitHub repository containing the profile."),
|
|
2135
|
+
repository: z
|
|
2136
2136
|
.string()
|
|
2137
|
-
.describe("The
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
.uint32()
|
|
2142
|
-
.optional()
|
|
2137
|
+
.describe("The name of the GitHub repository containing the profile."),
|
|
2138
|
+
commit: z
|
|
2139
|
+
.string()
|
|
2140
|
+
.describe("The commit SHA of the GitHub repository containing the profile.")
|
|
2143
2141
|
.nullable()
|
|
2144
|
-
.
|
|
2142
|
+
.optional(),
|
|
2145
2143
|
}),
|
|
2146
2144
|
z
|
|
2147
|
-
.lazy(() => z.array(Function_1.
|
|
2145
|
+
.lazy(() => z.array(Function_1.ProfileCommitOptionalSchema))
|
|
2148
2146
|
.meta({
|
|
2149
|
-
title: "
|
|
2147
|
+
title: "ProfileCommitOptionalArray",
|
|
2150
2148
|
recursive: true,
|
|
2151
2149
|
}),
|
|
2152
2150
|
])
|
|
2153
|
-
.describe("A function profile where remote profiles may omit a
|
|
2154
|
-
Function_1.
|
|
2155
|
-
.union([
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
.describe("A profile where remote function profiles
|
|
2160
|
-
Function_1.ProfileVersionOptionalSchema = z
|
|
2161
|
-
.union([
|
|
2162
|
-
Function_1.FunctionProfileVersionOptionalSchema,
|
|
2163
|
-
Function_1.VectorCompletionProfileSchema,
|
|
2164
|
-
])
|
|
2165
|
-
.describe("A profile where remote function profiles may omit a version.");
|
|
2151
|
+
.describe("A function profile where remote profiles may omit a commit.");
|
|
2152
|
+
Function_1.ProfileCommitRequiredSchema = z
|
|
2153
|
+
.union([Function_1.FunctionProfileCommitRequiredSchema, Function_1.VectorCompletionProfileSchema])
|
|
2154
|
+
.describe("A profile where remote function profiles must specify a commit.");
|
|
2155
|
+
Function_1.ProfileCommitOptionalSchema = z
|
|
2156
|
+
.union([Function_1.FunctionProfileCommitOptionalSchema, Function_1.VectorCompletionProfileSchema])
|
|
2157
|
+
.describe("A profile where remote function profiles may omit a commit.");
|
|
2166
2158
|
Function_1.InputSchemaSchema = z.lazy(() => z
|
|
2167
2159
|
.union([
|
|
2168
2160
|
InputSchema.ObjectSchema,
|
|
@@ -2380,15 +2372,15 @@ export var Function;
|
|
|
2380
2372
|
TaskExpression.ScalarFunctionSchema = z
|
|
2381
2373
|
.object({
|
|
2382
2374
|
type: z.literal("scalar.function"),
|
|
2383
|
-
|
|
2375
|
+
owner: z
|
|
2384
2376
|
.string()
|
|
2385
|
-
.describe("The
|
|
2386
|
-
|
|
2377
|
+
.describe("The owner of the GitHub repository containing the function."),
|
|
2378
|
+
repository: z
|
|
2387
2379
|
.string()
|
|
2388
|
-
.describe("The
|
|
2389
|
-
|
|
2390
|
-
.
|
|
2391
|
-
.describe("The
|
|
2380
|
+
.describe("The name of the GitHub repository containing the function."),
|
|
2381
|
+
commit: z
|
|
2382
|
+
.string()
|
|
2383
|
+
.describe("The commit SHA of the GitHub repository containing the function."),
|
|
2392
2384
|
skip: TaskExpression.SkipSchema.optional().nullable(),
|
|
2393
2385
|
map: TaskExpression.MapSchema.optional().nullable(),
|
|
2394
2386
|
input: Function_1.InputExpressionSchema,
|
|
@@ -2397,15 +2389,15 @@ export var Function;
|
|
|
2397
2389
|
TaskExpression.VectorFunctionSchema = z
|
|
2398
2390
|
.object({
|
|
2399
2391
|
type: z.literal("vector.function"),
|
|
2400
|
-
|
|
2392
|
+
owner: z
|
|
2401
2393
|
.string()
|
|
2402
|
-
.describe("The
|
|
2403
|
-
|
|
2394
|
+
.describe("The owner of the GitHub repository containing the function."),
|
|
2395
|
+
repository: z
|
|
2404
2396
|
.string()
|
|
2405
|
-
.describe("The
|
|
2406
|
-
|
|
2407
|
-
.
|
|
2408
|
-
.describe("The
|
|
2397
|
+
.describe("The name of the GitHub repository containing the function."),
|
|
2398
|
+
commit: z
|
|
2399
|
+
.string()
|
|
2400
|
+
.describe("The commit SHA of the GitHub repository containing the function."),
|
|
2409
2401
|
skip: TaskExpression.SkipSchema.optional().nullable(),
|
|
2410
2402
|
map: TaskExpression.MapSchema.optional().nullable(),
|
|
2411
2403
|
input: Function_1.InputExpressionSchema,
|
|
@@ -2437,9 +2429,6 @@ export var Function;
|
|
|
2437
2429
|
Function_1.ScalarSchema = z
|
|
2438
2430
|
.object({
|
|
2439
2431
|
type: z.literal("scalar.function"),
|
|
2440
|
-
author: z.string().describe("The author of the scalar function."),
|
|
2441
|
-
id: z.string().describe("The unique identifier of the scalar function."),
|
|
2442
|
-
version: z.uint32().describe("The version of the scalar function."),
|
|
2443
2432
|
description: z
|
|
2444
2433
|
.string()
|
|
2445
2434
|
.describe("The description of the scalar function."),
|
|
@@ -2458,9 +2447,6 @@ export var Function;
|
|
|
2458
2447
|
Function_1.VectorSchema = z
|
|
2459
2448
|
.object({
|
|
2460
2449
|
type: z.literal("vector.function"),
|
|
2461
|
-
author: z.string().describe("The author of the vector function."),
|
|
2462
|
-
id: z.string().describe("The unique identifier of the vector function."),
|
|
2463
|
-
version: z.uint32().describe("The version of the vector function."),
|
|
2464
2450
|
description: z
|
|
2465
2451
|
.string()
|
|
2466
2452
|
.describe("The description of the vector function."),
|
|
@@ -2486,7 +2472,8 @@ export var Function;
|
|
|
2486
2472
|
(function (Executions) {
|
|
2487
2473
|
let Request;
|
|
2488
2474
|
(function (Request) {
|
|
2489
|
-
|
|
2475
|
+
// Remote Function Remote Profile
|
|
2476
|
+
Request.FunctionExecutionParamsRemoteFunctionRemoteProfileBaseSchema = z
|
|
2490
2477
|
.object({
|
|
2491
2478
|
retry_token: z
|
|
2492
2479
|
.string()
|
|
@@ -2500,233 +2487,104 @@ export var Function;
|
|
|
2500
2487
|
first_chunk_timeout: Chat.Completions.Request.FirstChunkTimeoutSchema.optional().nullable(),
|
|
2501
2488
|
other_chunk_timeout: Chat.Completions.Request.OtherChunkTimeoutSchema.optional().nullable(),
|
|
2502
2489
|
})
|
|
2503
|
-
.describe("Base parameters for executing a function.");
|
|
2504
|
-
|
|
2505
|
-
Request.FunctionExecutionParamsExecuteInlineBaseSchema = Request.FunctionExecutionParamsBaseSchema.extend({
|
|
2506
|
-
function: z.lazy(() => FunctionSchema),
|
|
2507
|
-
profile: Function_1.FunctionProfileVersionOptionalSchema,
|
|
2508
|
-
}).describe("Base parameters for executing an inline function.");
|
|
2509
|
-
Request.FunctionExecutionParamsExecuteInlineStreamingSchema = Request.FunctionExecutionParamsExecuteInlineBaseSchema.extend({
|
|
2510
|
-
stream: Chat.Completions.Request.StreamTrueSchema,
|
|
2511
|
-
})
|
|
2512
|
-
.describe("Parameters for executing an inline function and streaming the response.")
|
|
2513
|
-
.meta({ title: "FunctionExecutionParamsExecuteInlineStreaming" });
|
|
2514
|
-
Request.FunctionExecutionParamsExecuteInlineNonStreamingSchema = Request.FunctionExecutionParamsExecuteInlineBaseSchema.extend({
|
|
2515
|
-
stream: Chat.Completions.Request.StreamFalseSchema.optional().nullable(),
|
|
2516
|
-
})
|
|
2517
|
-
.describe("Parameters for executing an inline function with a unary response.")
|
|
2518
|
-
.meta({ title: "FunctionExecutionParamsExecuteInlineNonStreaming" });
|
|
2519
|
-
Request.FunctionExecutionParamsExecuteInlineSchema = z
|
|
2520
|
-
.union([
|
|
2521
|
-
Request.FunctionExecutionParamsExecuteInlineStreamingSchema,
|
|
2522
|
-
Request.FunctionExecutionParamsExecuteInlineNonStreamingSchema,
|
|
2523
|
-
])
|
|
2524
|
-
.describe("Parameters for executing an inline function.")
|
|
2525
|
-
.meta({ title: "FunctionExecutionParamsExecuteInline" });
|
|
2526
|
-
// Execute Published Function
|
|
2527
|
-
Request.FunctionExecutionParamsExecuteBaseSchema = Request.FunctionExecutionParamsBaseSchema.extend({
|
|
2528
|
-
profile: Function_1.FunctionProfileVersionOptionalSchema.optional().nullable(),
|
|
2529
|
-
}).describe("Base parameters for executing a remote published function.");
|
|
2530
|
-
Request.FunctionExecutionParamsExecuteStreamingSchema = Request.FunctionExecutionParamsExecuteBaseSchema.extend({
|
|
2490
|
+
.describe("Base parameters for executing a remote function with a remote profile.");
|
|
2491
|
+
Request.FunctionExecutionParamsRemoteFunctionRemoteProfileStreamingSchema = Request.FunctionExecutionParamsRemoteFunctionRemoteProfileBaseSchema.extend({
|
|
2531
2492
|
stream: Chat.Completions.Request.StreamTrueSchema,
|
|
2532
2493
|
})
|
|
2533
|
-
.describe("Parameters for executing a remote
|
|
2534
|
-
.meta({
|
|
2535
|
-
|
|
2494
|
+
.describe("Parameters for executing a remote function with a remote profile and streaming the response.")
|
|
2495
|
+
.meta({
|
|
2496
|
+
title: "FunctionExecutionParamsRemoteFunctionRemoteProfileStreaming",
|
|
2497
|
+
});
|
|
2498
|
+
Request.FunctionExecutionParamsRemoteFunctionRemoteProfileNonStreamingSchema = Request.FunctionExecutionParamsRemoteFunctionRemoteProfileBaseSchema.extend({
|
|
2536
2499
|
stream: Chat.Completions.Request.StreamFalseSchema.optional().nullable(),
|
|
2537
2500
|
})
|
|
2538
|
-
.describe("Parameters for executing a remote
|
|
2539
|
-
.meta({
|
|
2540
|
-
|
|
2501
|
+
.describe("Parameters for executing a remote function with a remote profile with a unary response.")
|
|
2502
|
+
.meta({
|
|
2503
|
+
title: "FunctionExecutionParamsRemoteFunctionRemoteProfileNonStreaming",
|
|
2504
|
+
});
|
|
2505
|
+
Request.FunctionExecutionParamsRemoteFunctionRemoteProfileSchema = z
|
|
2541
2506
|
.union([
|
|
2542
|
-
Request.
|
|
2543
|
-
Request.
|
|
2507
|
+
Request.FunctionExecutionParamsRemoteFunctionRemoteProfileStreamingSchema,
|
|
2508
|
+
Request.FunctionExecutionParamsRemoteFunctionRemoteProfileNonStreamingSchema,
|
|
2544
2509
|
])
|
|
2545
|
-
.describe("Parameters for executing a remote
|
|
2546
|
-
.meta({ title: "
|
|
2547
|
-
//
|
|
2548
|
-
Request.
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
description: z
|
|
2553
|
-
.string()
|
|
2554
|
-
.describe("The description of the published scalar function."),
|
|
2555
|
-
changelog: z
|
|
2556
|
-
.string()
|
|
2557
|
-
.optional()
|
|
2558
|
-
.nullable()
|
|
2559
|
-
.describe("When present, describes changes from the previous version or versions."),
|
|
2560
|
-
input_schema: Function_1.InputSchemaSchema,
|
|
2561
|
-
})
|
|
2562
|
-
.describe("Details about the scalar function to be published."),
|
|
2563
|
-
profile: Function_1.FunctionProfileVersionRequiredSchema,
|
|
2564
|
-
publish_profile: z
|
|
2565
|
-
.object({
|
|
2566
|
-
id: z
|
|
2567
|
-
.literal("default")
|
|
2568
|
-
.describe('The identifier of the profile to publish. Must be "default" when publishing a function.'),
|
|
2569
|
-
version: z
|
|
2570
|
-
.uint32()
|
|
2571
|
-
.describe("The version of the profile to publish. Must match the function's version."),
|
|
2572
|
-
description: z
|
|
2573
|
-
.string()
|
|
2574
|
-
.describe("The description of the published profile."),
|
|
2575
|
-
changelog: z
|
|
2576
|
-
.string()
|
|
2577
|
-
.optional()
|
|
2578
|
-
.nullable()
|
|
2579
|
-
.describe("When present, describes changes from the previous version or versions."),
|
|
2580
|
-
})
|
|
2581
|
-
.describe("Details about the profile to be published."),
|
|
2582
|
-
}).describe("Base parameters for executing and publishing an inline scalar function.");
|
|
2583
|
-
Request.FunctionExecutionParamsPublishScalarFunctionStreamingSchema = Request.FunctionExecutionParamsPublishScalarFunctionBaseSchema.extend({
|
|
2510
|
+
.describe("Parameters for executing a remote function with a remote profile.")
|
|
2511
|
+
.meta({ title: "FunctionExecutionParamsRemoteFunctionRemoteProfile" });
|
|
2512
|
+
// Remote Function Inline Profile
|
|
2513
|
+
Request.FunctionExecutionParamsRemoteFunctionInlineProfileBaseSchema = Request.FunctionExecutionParamsRemoteFunctionRemoteProfileBaseSchema.extend({
|
|
2514
|
+
profile: Function_1.FunctionProfileCommitOptionalSchema,
|
|
2515
|
+
}).describe("Base parameters for executing a remote function with an inline profile.");
|
|
2516
|
+
Request.FunctionExecutionParamsRemoteFunctionInlineProfileStreamingSchema = Request.FunctionExecutionParamsRemoteFunctionInlineProfileBaseSchema.extend({
|
|
2584
2517
|
stream: Chat.Completions.Request.StreamTrueSchema,
|
|
2585
2518
|
})
|
|
2586
|
-
.describe("Parameters for executing
|
|
2519
|
+
.describe("Parameters for executing a remote function with an inline profile and streaming the response.")
|
|
2587
2520
|
.meta({
|
|
2588
|
-
title: "
|
|
2521
|
+
title: "FunctionExecutionParamsRemoteFunctionInlineProfileStreaming",
|
|
2589
2522
|
});
|
|
2590
|
-
Request.
|
|
2523
|
+
Request.FunctionExecutionParamsRemoteFunctionInlineProfileNonStreamingSchema = Request.FunctionExecutionParamsRemoteFunctionInlineProfileBaseSchema.extend({
|
|
2591
2524
|
stream: Chat.Completions.Request.StreamFalseSchema.optional().nullable(),
|
|
2592
2525
|
})
|
|
2593
|
-
.describe("Parameters for executing
|
|
2526
|
+
.describe("Parameters for executing a remote function with an inline profile with a unary response.")
|
|
2594
2527
|
.meta({
|
|
2595
|
-
title: "
|
|
2528
|
+
title: "FunctionExecutionParamsRemoteFunctionInlineProfileNonStreaming",
|
|
2596
2529
|
});
|
|
2597
|
-
Request.
|
|
2530
|
+
Request.FunctionExecutionParamsRemoteFunctionInlineProfileSchema = z
|
|
2598
2531
|
.union([
|
|
2599
|
-
Request.
|
|
2600
|
-
Request.
|
|
2532
|
+
Request.FunctionExecutionParamsRemoteFunctionInlineProfileStreamingSchema,
|
|
2533
|
+
Request.FunctionExecutionParamsRemoteFunctionInlineProfileNonStreamingSchema,
|
|
2601
2534
|
])
|
|
2602
|
-
.describe("Parameters for executing
|
|
2603
|
-
.meta({ title: "
|
|
2604
|
-
//
|
|
2605
|
-
Request.
|
|
2606
|
-
function:
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
description: z
|
|
2610
|
-
.string()
|
|
2611
|
-
.describe("The description of the published vector function."),
|
|
2612
|
-
changelog: z
|
|
2613
|
-
.string()
|
|
2614
|
-
.optional()
|
|
2615
|
-
.nullable()
|
|
2616
|
-
.describe("When present, describes changes from the previous version or versions."),
|
|
2617
|
-
input_schema: Function_1.InputSchemaSchema,
|
|
2618
|
-
output_length: z
|
|
2619
|
-
.union([
|
|
2620
|
-
z.uint32().describe("The fixed length of the output vector."),
|
|
2621
|
-
ExpressionSchema.describe("An expression which evaluates to the length of the output vector. Will only be provided with the function input. The output length must be determinable from the input alone."),
|
|
2622
|
-
])
|
|
2623
|
-
.describe("The length of the output vector."),
|
|
2624
|
-
})
|
|
2625
|
-
.describe("Details about the vector function to be published."),
|
|
2626
|
-
profile: Function_1.FunctionProfileVersionRequiredSchema,
|
|
2627
|
-
publish_profile: z
|
|
2628
|
-
.object({
|
|
2629
|
-
id: z
|
|
2630
|
-
.literal("default")
|
|
2631
|
-
.describe('The identifier of the profile to publish. Must be "default" when publishing a function.'),
|
|
2632
|
-
version: z
|
|
2633
|
-
.uint32()
|
|
2634
|
-
.describe("The version of the profile to publish. Must match the function's version."),
|
|
2635
|
-
description: z
|
|
2636
|
-
.string()
|
|
2637
|
-
.describe("The description of the published profile."),
|
|
2638
|
-
changelog: z
|
|
2639
|
-
.string()
|
|
2640
|
-
.optional()
|
|
2641
|
-
.nullable()
|
|
2642
|
-
.describe("When present, describes changes from the previous version or versions."),
|
|
2643
|
-
})
|
|
2644
|
-
.describe("Details about the profile to be published."),
|
|
2645
|
-
}).describe("Base parameters for executing and publishing an inline vector function.");
|
|
2646
|
-
Request.FunctionExecutionParamsPublishVectorFunctionStreamingSchema = Request.FunctionExecutionParamsPublishVectorFunctionBaseSchema.extend({
|
|
2535
|
+
.describe("Parameters for executing a remote function with an inline profile.")
|
|
2536
|
+
.meta({ title: "FunctionExecutionParamsRemoteFunctionInlineProfile" });
|
|
2537
|
+
// Inline Function Remote Profile
|
|
2538
|
+
Request.FunctionExecutionParamsInlineFunctionRemoteProfileBaseSchema = Request.FunctionExecutionParamsRemoteFunctionRemoteProfileBaseSchema.extend({
|
|
2539
|
+
function: z.lazy(() => FunctionSchema),
|
|
2540
|
+
}).describe("Base parameters for executing an inline function with a remote profile.");
|
|
2541
|
+
Request.FunctionExecutionParamsInlineFunctionRemoteProfileStreamingSchema = Request.FunctionExecutionParamsInlineFunctionRemoteProfileBaseSchema.extend({
|
|
2647
2542
|
stream: Chat.Completions.Request.StreamTrueSchema,
|
|
2648
2543
|
})
|
|
2649
|
-
.describe("Parameters for executing
|
|
2544
|
+
.describe("Parameters for executing an inline function with a remote profile and streaming the response.")
|
|
2650
2545
|
.meta({
|
|
2651
|
-
title: "
|
|
2546
|
+
title: "FunctionExecutionParamsInlineFunctionRemoteProfileStreaming",
|
|
2652
2547
|
});
|
|
2653
|
-
Request.
|
|
2548
|
+
Request.FunctionExecutionParamsInlineFunctionRemoteProfileNonStreamingSchema = Request.FunctionExecutionParamsInlineFunctionRemoteProfileBaseSchema.extend({
|
|
2654
2549
|
stream: Chat.Completions.Request.StreamFalseSchema.optional().nullable(),
|
|
2655
2550
|
})
|
|
2656
|
-
.describe("Parameters for executing
|
|
2551
|
+
.describe("Parameters for executing an inline function with a remote profile with a unary response.")
|
|
2657
2552
|
.meta({
|
|
2658
|
-
title: "
|
|
2553
|
+
title: "FunctionExecutionParamsInlineFunctionRemoteProfileNonStreaming",
|
|
2659
2554
|
});
|
|
2660
|
-
Request.
|
|
2661
|
-
.union([
|
|
2662
|
-
Request.FunctionExecutionParamsPublishVectorFunctionStreamingSchema,
|
|
2663
|
-
Request.FunctionExecutionParamsPublishVectorFunctionNonStreamingSchema,
|
|
2664
|
-
])
|
|
2665
|
-
.describe("Parameters for executing and publishing an inline vector function.")
|
|
2666
|
-
.meta({ title: "FunctionExecutionParamsPublishVectorFunction" });
|
|
2667
|
-
// Publish Function
|
|
2668
|
-
Request.FunctionExecutionParamsPublishFunctionStreamingSchema = z
|
|
2555
|
+
Request.FunctionExecutionParamsInlineFunctionRemoteProfileSchema = z
|
|
2669
2556
|
.union([
|
|
2670
|
-
Request.
|
|
2671
|
-
Request.
|
|
2557
|
+
Request.FunctionExecutionParamsInlineFunctionRemoteProfileStreamingSchema,
|
|
2558
|
+
Request.FunctionExecutionParamsInlineFunctionRemoteProfileNonStreamingSchema,
|
|
2672
2559
|
])
|
|
2673
|
-
.describe("Parameters for executing
|
|
2674
|
-
.meta({ title: "
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
.meta({ title: "FunctionExecutionParamsPublishFunctionNonStreaming" });
|
|
2682
|
-
Request.FunctionExecutionParamsPublishFunctionSchema = z
|
|
2683
|
-
.union([
|
|
2684
|
-
Request.FunctionExecutionParamsPublishScalarFunctionSchema,
|
|
2685
|
-
Request.FunctionExecutionParamsPublishVectorFunctionSchema,
|
|
2686
|
-
])
|
|
2687
|
-
.describe("Parameters for executing and publishing an inline function.")
|
|
2688
|
-
.meta({ title: "FunctionExecutionParamsPublishFunction" });
|
|
2689
|
-
// Publish Profile
|
|
2690
|
-
Request.FunctionExecutionParamsPublishProfileBaseSchema = Request.FunctionExecutionParamsBaseSchema.extend({
|
|
2691
|
-
profile: z
|
|
2692
|
-
.array(Function_1.ProfileVersionRequiredSchema)
|
|
2693
|
-
.describe("The profile to publish."),
|
|
2694
|
-
publish_profile: z
|
|
2695
|
-
.object({
|
|
2696
|
-
id: z
|
|
2697
|
-
.string()
|
|
2698
|
-
.describe("The unique identifier of the profile to publish."),
|
|
2699
|
-
version: z
|
|
2700
|
-
.uint32()
|
|
2701
|
-
.describe("The version of the profile to publish."),
|
|
2702
|
-
description: z
|
|
2703
|
-
.string()
|
|
2704
|
-
.describe("The description of the published profile."),
|
|
2705
|
-
changelog: z
|
|
2706
|
-
.string()
|
|
2707
|
-
.optional()
|
|
2708
|
-
.nullable()
|
|
2709
|
-
.describe("When present, describes changes from the previous version or versions."),
|
|
2710
|
-
})
|
|
2711
|
-
.describe("Details about the profile to be published."),
|
|
2712
|
-
}).describe("Base parameters for executing a remote published function and publishing a profile.");
|
|
2713
|
-
Request.FunctionExecutionParamsPublishProfileStreamingSchema = Request.FunctionExecutionParamsPublishProfileBaseSchema.extend({
|
|
2560
|
+
.describe("Parameters for executing an inline function with a remote profile.")
|
|
2561
|
+
.meta({ title: "FunctionExecutionParamsInlineFunctionRemoteProfile" });
|
|
2562
|
+
// Inline Function Inline Profile
|
|
2563
|
+
Request.FunctionExecutionParamsInlineFunctionInlineProfileBaseSchema = Request.FunctionExecutionParamsRemoteFunctionRemoteProfileBaseSchema.extend({
|
|
2564
|
+
function: z.lazy(() => FunctionSchema),
|
|
2565
|
+
profile: Function_1.FunctionProfileCommitOptionalSchema,
|
|
2566
|
+
}).describe("Base parameters for executing an inline function with an inline profile.");
|
|
2567
|
+
Request.FunctionExecutionParamsInlineFunctionInlineProfileStreamingSchema = Request.FunctionExecutionParamsInlineFunctionInlineProfileBaseSchema.extend({
|
|
2714
2568
|
stream: Chat.Completions.Request.StreamTrueSchema,
|
|
2715
2569
|
})
|
|
2716
|
-
.describe("Parameters for executing
|
|
2717
|
-
.meta({
|
|
2718
|
-
|
|
2570
|
+
.describe("Parameters for executing an inline function with an inline profile and streaming the response.")
|
|
2571
|
+
.meta({
|
|
2572
|
+
title: "FunctionExecutionParamsInlineFunctionInlineProfileStreaming",
|
|
2573
|
+
});
|
|
2574
|
+
Request.FunctionExecutionParamsInlineFunctionInlineProfileNonStreamingSchema = Request.FunctionExecutionParamsInlineFunctionInlineProfileBaseSchema.extend({
|
|
2719
2575
|
stream: Chat.Completions.Request.StreamFalseSchema.optional().nullable(),
|
|
2720
2576
|
})
|
|
2721
|
-
.describe("Parameters for executing
|
|
2722
|
-
.meta({
|
|
2723
|
-
|
|
2577
|
+
.describe("Parameters for executing an inline function with an inline profile with a unary response.")
|
|
2578
|
+
.meta({
|
|
2579
|
+
title: "FunctionExecutionParamsInlineFunctionInlineProfileNonStreaming",
|
|
2580
|
+
});
|
|
2581
|
+
Request.FunctionExecutionParamsInlineFunctionInlineProfileSchema = z
|
|
2724
2582
|
.union([
|
|
2725
|
-
Request.
|
|
2726
|
-
Request.
|
|
2583
|
+
Request.FunctionExecutionParamsInlineFunctionInlineProfileStreamingSchema,
|
|
2584
|
+
Request.FunctionExecutionParamsInlineFunctionInlineProfileNonStreamingSchema,
|
|
2727
2585
|
])
|
|
2728
|
-
.describe("Parameters for executing
|
|
2729
|
-
.meta({ title: "
|
|
2586
|
+
.describe("Parameters for executing an inline function with an inline profile.")
|
|
2587
|
+
.meta({ title: "FunctionExecutionParamsInlineFunctionInlineProfile" });
|
|
2730
2588
|
})(Request = Executions.Request || (Executions.Request = {}));
|
|
2731
2589
|
let Response;
|
|
2732
2590
|
(function (Response) {
|
|
@@ -2856,8 +2714,6 @@ export var Function;
|
|
|
2856
2714
|
const [output, outputChanged] = merge(a.output, b.output);
|
|
2857
2715
|
const [error, errorChanged] = merge(a.error, b.error);
|
|
2858
2716
|
const [retry_token, retry_tokenChanged] = merge(a.retry_token, b.retry_token);
|
|
2859
|
-
const [function_published, function_publishedChanged] = merge(a.function_published, b.function_published);
|
|
2860
|
-
const [profile_published, profile_publishedChanged] = merge(a.profile_published, b.profile_published);
|
|
2861
2717
|
const created = a.created;
|
|
2862
2718
|
const function_ = a.function;
|
|
2863
2719
|
const profile = a.profile;
|
|
@@ -2868,16 +2724,10 @@ export var Function;
|
|
|
2868
2724
|
outputChanged ||
|
|
2869
2725
|
errorChanged ||
|
|
2870
2726
|
retry_tokenChanged ||
|
|
2871
|
-
function_publishedChanged ||
|
|
2872
|
-
profile_publishedChanged ||
|
|
2873
2727
|
usageChanged) {
|
|
2874
2728
|
return [
|
|
2875
|
-
Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(
|
|
2876
|
-
tasks }, (tasks_errors !== undefined ? { tasks_errors } : {})), (output !== undefined ? { output } : {})), (error !== undefined ? { error } : {})), (retry_token !== undefined ? { retry_token } : {})),
|
|
2877
|
-
? { function_published }
|
|
2878
|
-
: {})), (profile_published !== undefined
|
|
2879
|
-
? { profile_published }
|
|
2880
|
-
: {})), { created, function: function_, profile,
|
|
2729
|
+
Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ id,
|
|
2730
|
+
tasks }, (tasks_errors !== undefined ? { tasks_errors } : {})), (output !== undefined ? { output } : {})), (error !== undefined ? { error } : {})), (retry_token !== undefined ? { retry_token } : {})), { created, function: function_, profile,
|
|
2881
2731
|
object }), (usage !== undefined ? { usage } : {})),
|
|
2882
2732
|
true,
|
|
2883
2733
|
];
|
|
@@ -2917,14 +2767,6 @@ export var Function;
|
|
|
2917
2767
|
.string()
|
|
2918
2768
|
.optional()
|
|
2919
2769
|
.describe("A token which may be used to retry the function execution."),
|
|
2920
|
-
function_published: z
|
|
2921
|
-
.boolean()
|
|
2922
|
-
.optional()
|
|
2923
|
-
.describe("When true, indicates that a function was published as part of this execution."),
|
|
2924
|
-
profile_published: z
|
|
2925
|
-
.boolean()
|
|
2926
|
-
.optional()
|
|
2927
|
-
.describe("When true, indicates that a profile was published as part of this execution."),
|
|
2928
2770
|
created: z
|
|
2929
2771
|
.uint32()
|
|
2930
2772
|
.describe("The UNIX timestamp (in seconds) when the function execution chunk was created."),
|
|
@@ -3001,14 +2843,6 @@ export var Function;
|
|
|
3001
2843
|
.string()
|
|
3002
2844
|
.nullable()
|
|
3003
2845
|
.describe("A token which may be used to retry the function execution."),
|
|
3004
|
-
function_published: z
|
|
3005
|
-
.boolean()
|
|
3006
|
-
.optional()
|
|
3007
|
-
.describe("When true, indicates that a function was published as part of this execution."),
|
|
3008
|
-
profile_published: z
|
|
3009
|
-
.boolean()
|
|
3010
|
-
.optional()
|
|
3011
|
-
.describe("When true, indicates that a profile was published as part of this execution."),
|
|
3012
2846
|
created: z
|
|
3013
2847
|
.uint32()
|
|
3014
2848
|
.describe("The UNIX timestamp (in seconds) when the function execution chunk was created."),
|
|
@@ -3243,7 +3077,7 @@ export var Function;
|
|
|
3243
3077
|
.optional()
|
|
3244
3078
|
.describe("When true, indicates that one or more function executions encountered errors during profile computation."),
|
|
3245
3079
|
profile: z
|
|
3246
|
-
.array(Function_1.
|
|
3080
|
+
.array(Function_1.ProfileCommitRequiredSchema)
|
|
3247
3081
|
.optional()
|
|
3248
3082
|
.describe("The computed function profile."),
|
|
3249
3083
|
fitting_stats: Response.FittingStatsSchema.optional(),
|
|
@@ -3286,7 +3120,7 @@ export var Function;
|
|
|
3286
3120
|
.boolean()
|
|
3287
3121
|
.describe("When true, indicates that one or more function executions encountered errors during profile computation."),
|
|
3288
3122
|
profile: z
|
|
3289
|
-
.array(Function_1.
|
|
3123
|
+
.array(Function_1.ProfileCommitRequiredSchema)
|
|
3290
3124
|
.describe("The computed function profile."),
|
|
3291
3125
|
fitting_stats: Response.FittingStatsSchema,
|
|
3292
3126
|
created: z
|
|
@@ -3305,48 +3139,21 @@ export var Function;
|
|
|
3305
3139
|
let Profile;
|
|
3306
3140
|
(function (Profile) {
|
|
3307
3141
|
Profile.ListItemSchema = z.object({
|
|
3308
|
-
|
|
3142
|
+
owner: z
|
|
3143
|
+
.string()
|
|
3144
|
+
.describe("The owner of the GitHub repository containing the profile."),
|
|
3145
|
+
repository: z
|
|
3309
3146
|
.string()
|
|
3310
|
-
.describe("The
|
|
3311
|
-
|
|
3147
|
+
.describe("The name of the GitHub repository containing the profile."),
|
|
3148
|
+
commit: z
|
|
3312
3149
|
.string()
|
|
3313
|
-
.describe("The
|
|
3314
|
-
author: z.string().describe("The author of the profile."),
|
|
3315
|
-
id: z.string().describe("The unique identifier of the profile."),
|
|
3316
|
-
version: z.uint32().describe("The version of the profile."),
|
|
3150
|
+
.describe("The commit SHA of the GitHub repository containing the profile."),
|
|
3317
3151
|
});
|
|
3318
3152
|
async function list(openai, options) {
|
|
3319
3153
|
const response = await openai.get("/functions/profiles", options);
|
|
3320
3154
|
return response;
|
|
3321
3155
|
}
|
|
3322
3156
|
Profile.list = list;
|
|
3323
|
-
Profile.RetrieveItemSchema = z.object({
|
|
3324
|
-
created: z
|
|
3325
|
-
.uint32()
|
|
3326
|
-
.describe("The UNIX timestamp (in seconds) when the profile was created."),
|
|
3327
|
-
shape: z
|
|
3328
|
-
.string()
|
|
3329
|
-
.describe("The shape of the profile. Unless Task Skip expressions work out favorably, profiles only work for functions with the same shape."),
|
|
3330
|
-
function_author: z
|
|
3331
|
-
.string()
|
|
3332
|
-
.describe("The author of the function the profile was published to."),
|
|
3333
|
-
function_id: z
|
|
3334
|
-
.string()
|
|
3335
|
-
.describe("The unique identifier of the function the profile was published to."),
|
|
3336
|
-
author: z.string().describe("The author of the profile."),
|
|
3337
|
-
id: z.string().describe("The unique identifier of the profile."),
|
|
3338
|
-
version: z.uint32().describe("The version of the profile."),
|
|
3339
|
-
profile: z
|
|
3340
|
-
.array(Function.ProfileVersionRequiredSchema)
|
|
3341
|
-
.describe("The function profile."),
|
|
3342
|
-
});
|
|
3343
|
-
async function retrieve(openai, function_author, function_id, author, id, version, options) {
|
|
3344
|
-
const response = await openai.get(version !== null && version !== undefined
|
|
3345
|
-
? `/functions/${function_author}/${function_id}/profiles/${author}/${id}/${version}`
|
|
3346
|
-
: `/functions/${function_author}/${function_id}/profiles/${author}/${id}`, options);
|
|
3347
|
-
return response;
|
|
3348
|
-
}
|
|
3349
|
-
Profile.retrieve = retrieve;
|
|
3350
3157
|
Profile.HistoricalUsageSchema = z.object({
|
|
3351
3158
|
requests: z
|
|
3352
3159
|
.uint32()
|
|
@@ -3361,89 +3168,102 @@ export var Function;
|
|
|
3361
3168
|
.number()
|
|
3362
3169
|
.describe("The total cost incurred by using this Profile."),
|
|
3363
3170
|
});
|
|
3364
|
-
async function retrieveUsage(openai,
|
|
3365
|
-
const response = await openai.get(
|
|
3366
|
-
? `/functions
|
|
3367
|
-
: `/functions
|
|
3171
|
+
async function retrieveUsage(openai, powner, prepository, pcommit, options) {
|
|
3172
|
+
const response = await openai.get(pcommit !== null && pcommit !== undefined
|
|
3173
|
+
? `/functions/profiles/${powner}/${prepository}/${pcommit}/usage`
|
|
3174
|
+
: `/functions/profiles/${powner}/${prepository}/usage`, options);
|
|
3368
3175
|
return response;
|
|
3369
3176
|
}
|
|
3370
3177
|
Profile.retrieveUsage = retrieveUsage;
|
|
3371
3178
|
})(Profile = Function_1.Profile || (Function_1.Profile = {}));
|
|
3372
|
-
async function
|
|
3179
|
+
async function executeInlineFunctionInlineProfile(openai, body, options) {
|
|
3373
3180
|
var _a;
|
|
3374
3181
|
const response = await openai.post("/functions", Object.assign({ body, stream: (_a = body.stream) !== null && _a !== void 0 ? _a : false }, options));
|
|
3375
3182
|
return response;
|
|
3376
3183
|
}
|
|
3377
|
-
Function_1.
|
|
3378
|
-
async function
|
|
3184
|
+
Function_1.executeInlineFunctionInlineProfile = executeInlineFunctionInlineProfile;
|
|
3185
|
+
async function executeRemoteFunctionInlineProfile(openai, fowner, frepository, fcommit, body, options) {
|
|
3379
3186
|
var _a;
|
|
3380
|
-
const response = await openai.post(
|
|
3381
|
-
? `/functions/${
|
|
3382
|
-
: `/functions/${
|
|
3187
|
+
const response = await openai.post(fcommit !== null && fcommit !== undefined
|
|
3188
|
+
? `/functions/${fowner}/${frepository}/${fcommit}`
|
|
3189
|
+
: `/functions/${fowner}/${frepository}`, Object.assign({ body, stream: (_a = body.stream) !== null && _a !== void 0 ? _a : false }, options));
|
|
3383
3190
|
return response;
|
|
3384
3191
|
}
|
|
3385
|
-
Function_1.
|
|
3386
|
-
async function
|
|
3192
|
+
Function_1.executeRemoteFunctionInlineProfile = executeRemoteFunctionInlineProfile;
|
|
3193
|
+
async function executeInlineFunctionRemoteProfile(openai, powner, prepository, pcommit, body, options) {
|
|
3387
3194
|
var _a;
|
|
3388
|
-
const response = await openai.post(
|
|
3195
|
+
const response = await openai.post(pcommit !== null && pcommit !== undefined
|
|
3196
|
+
? `/functions/profiles/${powner}/${prepository}/${pcommit}`
|
|
3197
|
+
: `/functions/profiles/${powner}/${prepository}`, Object.assign({ body, stream: (_a = body.stream) !== null && _a !== void 0 ? _a : false }, options));
|
|
3389
3198
|
return response;
|
|
3390
3199
|
}
|
|
3391
|
-
Function_1.
|
|
3392
|
-
async function
|
|
3200
|
+
Function_1.executeInlineFunctionRemoteProfile = executeInlineFunctionRemoteProfile;
|
|
3201
|
+
async function executeRemoteFunctionRemoteProfile(openai, fowner, frepository, fcommit, powner, prepository, pcommit, body, options) {
|
|
3393
3202
|
var _a;
|
|
3394
|
-
|
|
3203
|
+
let url;
|
|
3204
|
+
if (fcommit !== null && fcommit !== undefined) {
|
|
3205
|
+
if (pcommit !== null && pcommit !== undefined) {
|
|
3206
|
+
url = `/functions/${fowner}/${frepository}/${fcommit}/profiles/${powner}/${prepository}/${pcommit}`;
|
|
3207
|
+
}
|
|
3208
|
+
else {
|
|
3209
|
+
url = `/functions/${fowner}/${frepository}/${fcommit}/profiles/${powner}/${prepository}`;
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
else if (pcommit !== null && pcommit !== undefined) {
|
|
3213
|
+
url = `/functions/${fowner}/${frepository}/profiles/${powner}/${prepository}/${pcommit}`;
|
|
3214
|
+
}
|
|
3215
|
+
else {
|
|
3216
|
+
url = `/functions/${fowner}/${frepository}/profiles/${powner}/${prepository}`;
|
|
3217
|
+
}
|
|
3218
|
+
const response = await openai.post(url, Object.assign({ body, stream: (_a = body.stream) !== null && _a !== void 0 ? _a : false }, options));
|
|
3395
3219
|
return response;
|
|
3396
3220
|
}
|
|
3397
|
-
Function_1.
|
|
3398
|
-
async function
|
|
3221
|
+
Function_1.executeRemoteFunctionRemoteProfile = executeRemoteFunctionRemoteProfile;
|
|
3222
|
+
async function execute(openai, function_, profile, body, options) {
|
|
3223
|
+
if ("owner" in function_ && "repository" in function_) {
|
|
3224
|
+
if ("owner" in profile && "repository" in profile) {
|
|
3225
|
+
const requestBody = body;
|
|
3226
|
+
return executeRemoteFunctionRemoteProfile(openai, function_.owner, function_.repository, function_.commit, profile.owner, profile.repository, profile.commit, requestBody, options);
|
|
3227
|
+
}
|
|
3228
|
+
else {
|
|
3229
|
+
const requestBody = Object.assign(Object.assign({}, body), { profile });
|
|
3230
|
+
return executeRemoteFunctionInlineProfile(openai, function_.owner, function_.repository, function_.commit, requestBody, options);
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
else if ("owner" in profile && "repository" in profile) {
|
|
3234
|
+
const requestBody = Object.assign(Object.assign({}, body), { function: function_ });
|
|
3235
|
+
return executeInlineFunctionRemoteProfile(openai, profile.owner, profile.repository, profile.commit, requestBody, options);
|
|
3236
|
+
}
|
|
3237
|
+
else {
|
|
3238
|
+
const requestBody = Object.assign(Object.assign({}, body), { function: function_, profile });
|
|
3239
|
+
return executeInlineFunctionInlineProfile(openai, requestBody, options);
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
Function_1.execute = execute;
|
|
3243
|
+
async function computeProfile(openai, fowner, frepository, fcommit, body, options) {
|
|
3399
3244
|
var _a;
|
|
3400
|
-
const response = await openai.post(
|
|
3401
|
-
? `/functions/${
|
|
3402
|
-
: `/functions/${
|
|
3245
|
+
const response = await openai.post(fcommit !== null && fcommit !== undefined
|
|
3246
|
+
? `/functions/${fowner}/${frepository}/${fcommit}/profiles/compute`
|
|
3247
|
+
: `/functions/${fowner}/${frepository}/profiles/compute`, Object.assign({ body, stream: (_a = body.stream) !== null && _a !== void 0 ? _a : false }, options));
|
|
3403
3248
|
return response;
|
|
3404
3249
|
}
|
|
3405
3250
|
Function_1.computeProfile = computeProfile;
|
|
3406
3251
|
Function_1.ListItemSchema = z.object({
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3252
|
+
owner: z
|
|
3253
|
+
.string()
|
|
3254
|
+
.describe("The owner of the GitHub repository containing the function."),
|
|
3255
|
+
repository: z
|
|
3256
|
+
.string()
|
|
3257
|
+
.describe("The name of the GitHub repository containing the function."),
|
|
3258
|
+
commit: z
|
|
3259
|
+
.string()
|
|
3260
|
+
.describe("The commit SHA of the GitHub repository containing the function."),
|
|
3410
3261
|
});
|
|
3411
3262
|
async function list(openai, options) {
|
|
3412
3263
|
const response = await openai.get("/functions", options);
|
|
3413
3264
|
return response;
|
|
3414
3265
|
}
|
|
3415
3266
|
Function_1.list = list;
|
|
3416
|
-
Function_1.ScalarRetrieveItemSchema = Function_1.ScalarSchema.extend({
|
|
3417
|
-
created: z
|
|
3418
|
-
.uint32()
|
|
3419
|
-
.describe("The UNIX timestamp (in seconds) when the function was created."),
|
|
3420
|
-
shape: z
|
|
3421
|
-
.string()
|
|
3422
|
-
.describe("The shape of the function. Unless Task Skip expressions work out favorably, functions only work with profiles that have the same shape."),
|
|
3423
|
-
})
|
|
3424
|
-
.describe("A retrieved scalar function.")
|
|
3425
|
-
.meta({ title: "RetrievedScalarFunction" });
|
|
3426
|
-
Function_1.VectorRetrieveItemSchema = Function_1.VectorSchema.extend({
|
|
3427
|
-
created: z
|
|
3428
|
-
.uint32()
|
|
3429
|
-
.describe("The UNIX timestamp (in seconds) when the function was created."),
|
|
3430
|
-
shape: z
|
|
3431
|
-
.string()
|
|
3432
|
-
.describe("The shape of the function. Unless Task Skip expressions work out favorably, functions only work with profiles that have the same shape."),
|
|
3433
|
-
})
|
|
3434
|
-
.describe("A retrieved vector function.")
|
|
3435
|
-
.meta({ title: "RetrievedVectorFunction" });
|
|
3436
|
-
Function_1.RetrieveItemSchema = z.discriminatedUnion("type", [
|
|
3437
|
-
Function_1.ScalarRetrieveItemSchema,
|
|
3438
|
-
Function_1.VectorRetrieveItemSchema,
|
|
3439
|
-
]);
|
|
3440
|
-
async function retrieve(openai, author, id, version, options) {
|
|
3441
|
-
const response = await openai.get(version !== null && version !== undefined
|
|
3442
|
-
? `/functions/${author}/${id}/${version}`
|
|
3443
|
-
: `/functions/${author}/${id}`, options);
|
|
3444
|
-
return response;
|
|
3445
|
-
}
|
|
3446
|
-
Function_1.retrieve = retrieve;
|
|
3447
3267
|
Function_1.HistoricalUsageSchema = z.object({
|
|
3448
3268
|
requests: z
|
|
3449
3269
|
.uint32()
|
|
@@ -3458,10 +3278,10 @@ export var Function;
|
|
|
3458
3278
|
.number()
|
|
3459
3279
|
.describe("The total cost incurred by using this Function."),
|
|
3460
3280
|
});
|
|
3461
|
-
async function retrieveUsage(openai,
|
|
3462
|
-
const response = await openai.get(
|
|
3463
|
-
? `/functions/${
|
|
3464
|
-
: `/functions/${
|
|
3281
|
+
async function retrieveUsage(openai, fowner, frepository, fcommit, options) {
|
|
3282
|
+
const response = await openai.get(fcommit !== null && fcommit !== undefined
|
|
3283
|
+
? `/functions/${fowner}/${frepository}/${fcommit}/usage`
|
|
3284
|
+
: `/functions/${fowner}/${frepository}/usage`, options);
|
|
3465
3285
|
return response;
|
|
3466
3286
|
}
|
|
3467
3287
|
Function_1.retrieveUsage = retrieveUsage;
|