opik 1.9.36 → 1.9.37
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 +48 -48
- package/dist/index.d.cts +246 -5
- package/dist/index.d.ts +246 -5
- package/dist/index.js +31 -31
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -581,6 +581,7 @@ interface ExperimentWrite {
|
|
|
581
581
|
type?: ExperimentWriteType;
|
|
582
582
|
optimizationId?: string;
|
|
583
583
|
status?: ExperimentWriteStatus;
|
|
584
|
+
experimentScores?: ExperimentScoreWrite[];
|
|
584
585
|
promptVersion?: PromptVersionLinkWrite;
|
|
585
586
|
promptVersions?: PromptVersionLinkWrite[];
|
|
586
587
|
}
|
|
@@ -691,6 +692,7 @@ interface ExperimentUpdate {
|
|
|
691
692
|
type?: ExperimentUpdateType;
|
|
692
693
|
/** The status of the experiment */
|
|
693
694
|
status?: ExperimentUpdateStatus;
|
|
695
|
+
experimentScores?: ExperimentScore[];
|
|
694
696
|
}
|
|
695
697
|
|
|
696
698
|
/**
|
|
@@ -792,11 +794,13 @@ interface ProviderApiKeyUpdate {
|
|
|
792
794
|
/**
|
|
793
795
|
* This file was auto-generated by Fern from our API Definition.
|
|
794
796
|
*/
|
|
795
|
-
type OptimizationUpdateStatus = "running" | "completed" | "cancelled";
|
|
797
|
+
type OptimizationUpdateStatus = "running" | "completed" | "cancelled" | "initialized" | "error";
|
|
796
798
|
declare const OptimizationUpdateStatus: {
|
|
797
799
|
readonly Running: "running";
|
|
798
800
|
readonly Completed: "completed";
|
|
799
801
|
readonly Cancelled: "cancelled";
|
|
802
|
+
readonly Initialized: "initialized";
|
|
803
|
+
readonly Error: "error";
|
|
800
804
|
};
|
|
801
805
|
|
|
802
806
|
/**
|
|
@@ -812,6 +816,23 @@ interface FindOptimizationsRequest {
|
|
|
812
816
|
datasetId?: string;
|
|
813
817
|
name?: string;
|
|
814
818
|
datasetDeleted?: boolean;
|
|
819
|
+
filters?: string;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
824
|
+
*/
|
|
825
|
+
/**
|
|
826
|
+
* @example
|
|
827
|
+
* {}
|
|
828
|
+
*/
|
|
829
|
+
interface FindStudioOptimizationsRequest {
|
|
830
|
+
page?: number;
|
|
831
|
+
size?: number;
|
|
832
|
+
datasetId?: string;
|
|
833
|
+
name?: string;
|
|
834
|
+
datasetDeleted?: boolean;
|
|
835
|
+
filters?: string;
|
|
815
836
|
}
|
|
816
837
|
|
|
817
838
|
/**
|
|
@@ -4151,6 +4172,14 @@ declare const ExperimentType: {
|
|
|
4151
4172
|
readonly MiniBatch: "mini-batch";
|
|
4152
4173
|
};
|
|
4153
4174
|
|
|
4175
|
+
/**
|
|
4176
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4177
|
+
*/
|
|
4178
|
+
interface ExperimentScore {
|
|
4179
|
+
name: string;
|
|
4180
|
+
value: number;
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4154
4183
|
/**
|
|
4155
4184
|
* This file was auto-generated by Fern from our API Definition.
|
|
4156
4185
|
*/
|
|
@@ -4160,6 +4189,14 @@ interface PercentageValues {
|
|
|
4160
4189
|
p99?: number;
|
|
4161
4190
|
}
|
|
4162
4191
|
|
|
4192
|
+
/**
|
|
4193
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4194
|
+
*/
|
|
4195
|
+
interface ExperimentScoreWrite {
|
|
4196
|
+
name: string;
|
|
4197
|
+
value: number;
|
|
4198
|
+
}
|
|
4199
|
+
|
|
4163
4200
|
/**
|
|
4164
4201
|
* This file was auto-generated by Fern from our API Definition.
|
|
4165
4202
|
*/
|
|
@@ -4477,6 +4514,14 @@ interface ExperimentPagePublic {
|
|
|
4477
4514
|
sortableBy?: string[];
|
|
4478
4515
|
}
|
|
4479
4516
|
|
|
4517
|
+
/**
|
|
4518
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4519
|
+
*/
|
|
4520
|
+
interface ExperimentScorePublic {
|
|
4521
|
+
name: string;
|
|
4522
|
+
value: number;
|
|
4523
|
+
}
|
|
4524
|
+
|
|
4480
4525
|
/**
|
|
4481
4526
|
* This file was auto-generated by Fern from our API Definition.
|
|
4482
4527
|
*/
|
|
@@ -4521,6 +4566,7 @@ interface ExperimentPublic {
|
|
|
4521
4566
|
createdBy?: string;
|
|
4522
4567
|
lastUpdatedBy?: string;
|
|
4523
4568
|
status?: ExperimentPublicStatus;
|
|
4569
|
+
experimentScores?: ExperimentScorePublic[];
|
|
4524
4570
|
promptVersion?: PromptVersionLinkPublic;
|
|
4525
4571
|
promptVersions?: PromptVersionLinkPublic[];
|
|
4526
4572
|
}
|
|
@@ -4582,6 +4628,7 @@ interface AggregationData {
|
|
|
4582
4628
|
totalEstimatedCostAvg?: number;
|
|
4583
4629
|
duration?: PercentageValues;
|
|
4584
4630
|
feedbackScores?: FeedbackScoreAverage[];
|
|
4631
|
+
experimentScores?: FeedbackScoreAverage[];
|
|
4585
4632
|
}
|
|
4586
4633
|
|
|
4587
4634
|
/**
|
|
@@ -4988,11 +5035,25 @@ interface ManualEvaluationRequest {
|
|
|
4988
5035
|
/**
|
|
4989
5036
|
* This file was auto-generated by Fern from our API Definition.
|
|
4990
5037
|
*/
|
|
4991
|
-
|
|
5038
|
+
|
|
5039
|
+
interface OptimizationStudioConfigWrite {
|
|
5040
|
+
datasetName: string;
|
|
5041
|
+
prompt: StudioPromptWrite;
|
|
5042
|
+
llmModel: StudioLlmModelWrite;
|
|
5043
|
+
evaluation: StudioEvaluationWrite;
|
|
5044
|
+
optimizer: StudioOptimizerWrite;
|
|
5045
|
+
}
|
|
5046
|
+
|
|
5047
|
+
/**
|
|
5048
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5049
|
+
*/
|
|
5050
|
+
type OptimizationWriteStatus = "running" | "completed" | "cancelled" | "initialized" | "error";
|
|
4992
5051
|
declare const OptimizationWriteStatus: {
|
|
4993
5052
|
readonly Running: "running";
|
|
4994
5053
|
readonly Completed: "completed";
|
|
4995
5054
|
readonly Cancelled: "cancelled";
|
|
5055
|
+
readonly Initialized: "initialized";
|
|
5056
|
+
readonly Error: "error";
|
|
4996
5057
|
};
|
|
4997
5058
|
|
|
4998
5059
|
/**
|
|
@@ -5006,9 +5067,61 @@ interface OptimizationWrite {
|
|
|
5006
5067
|
objectiveName: string;
|
|
5007
5068
|
status: OptimizationWriteStatus;
|
|
5008
5069
|
metadata?: JsonListStringWrite;
|
|
5070
|
+
studioConfig?: OptimizationStudioConfigWrite;
|
|
5009
5071
|
lastUpdatedAt?: Date;
|
|
5010
5072
|
}
|
|
5011
5073
|
|
|
5074
|
+
/**
|
|
5075
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5076
|
+
*/
|
|
5077
|
+
|
|
5078
|
+
interface StudioEvaluationWrite {
|
|
5079
|
+
metrics: StudioMetricWrite[];
|
|
5080
|
+
}
|
|
5081
|
+
|
|
5082
|
+
/**
|
|
5083
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5084
|
+
*/
|
|
5085
|
+
|
|
5086
|
+
interface StudioLlmModelWrite {
|
|
5087
|
+
model: string;
|
|
5088
|
+
parameters?: JsonNodeWrite;
|
|
5089
|
+
}
|
|
5090
|
+
|
|
5091
|
+
/**
|
|
5092
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5093
|
+
*/
|
|
5094
|
+
interface StudioMessageWrite {
|
|
5095
|
+
role: string;
|
|
5096
|
+
content: string;
|
|
5097
|
+
}
|
|
5098
|
+
|
|
5099
|
+
/**
|
|
5100
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5101
|
+
*/
|
|
5102
|
+
|
|
5103
|
+
interface StudioMetricWrite {
|
|
5104
|
+
type: string;
|
|
5105
|
+
parameters?: JsonNodeWrite;
|
|
5106
|
+
}
|
|
5107
|
+
|
|
5108
|
+
/**
|
|
5109
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5110
|
+
*/
|
|
5111
|
+
|
|
5112
|
+
interface StudioOptimizerWrite {
|
|
5113
|
+
type: string;
|
|
5114
|
+
parameters?: JsonNodeWrite;
|
|
5115
|
+
}
|
|
5116
|
+
|
|
5117
|
+
/**
|
|
5118
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5119
|
+
*/
|
|
5120
|
+
|
|
5121
|
+
interface StudioPromptWrite {
|
|
5122
|
+
messages: StudioMessageWrite[];
|
|
5123
|
+
}
|
|
5124
|
+
|
|
5012
5125
|
/**
|
|
5013
5126
|
* This file was auto-generated by Fern from our API Definition.
|
|
5014
5127
|
*/
|
|
@@ -5024,11 +5137,25 @@ interface OptimizationPagePublic {
|
|
|
5024
5137
|
/**
|
|
5025
5138
|
* This file was auto-generated by Fern from our API Definition.
|
|
5026
5139
|
*/
|
|
5027
|
-
|
|
5140
|
+
|
|
5141
|
+
interface OptimizationStudioConfigPublic {
|
|
5142
|
+
datasetName: string;
|
|
5143
|
+
prompt: StudioPromptPublic;
|
|
5144
|
+
llmModel: StudioLlmModelPublic;
|
|
5145
|
+
evaluation: StudioEvaluationPublic;
|
|
5146
|
+
optimizer: StudioOptimizerPublic;
|
|
5147
|
+
}
|
|
5148
|
+
|
|
5149
|
+
/**
|
|
5150
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5151
|
+
*/
|
|
5152
|
+
type OptimizationPublicStatus = "running" | "completed" | "cancelled" | "initialized" | "error";
|
|
5028
5153
|
declare const OptimizationPublicStatus: {
|
|
5029
5154
|
readonly Running: "running";
|
|
5030
5155
|
readonly Completed: "completed";
|
|
5031
5156
|
readonly Cancelled: "cancelled";
|
|
5157
|
+
readonly Initialized: "initialized";
|
|
5158
|
+
readonly Error: "error";
|
|
5032
5159
|
};
|
|
5033
5160
|
|
|
5034
5161
|
/**
|
|
@@ -5042,6 +5169,7 @@ interface OptimizationPublic {
|
|
|
5042
5169
|
objectiveName: string;
|
|
5043
5170
|
status: OptimizationPublicStatus;
|
|
5044
5171
|
metadata?: JsonListStringPublic;
|
|
5172
|
+
studioConfig?: OptimizationStudioConfigPublic;
|
|
5045
5173
|
datasetId?: string;
|
|
5046
5174
|
numTrials?: number;
|
|
5047
5175
|
feedbackScores?: FeedbackScoreAveragePublic[];
|
|
@@ -5051,6 +5179,66 @@ interface OptimizationPublic {
|
|
|
5051
5179
|
lastUpdatedBy?: string;
|
|
5052
5180
|
}
|
|
5053
5181
|
|
|
5182
|
+
/**
|
|
5183
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5184
|
+
*/
|
|
5185
|
+
|
|
5186
|
+
interface StudioEvaluationPublic {
|
|
5187
|
+
metrics: StudioMetricPublic[];
|
|
5188
|
+
}
|
|
5189
|
+
|
|
5190
|
+
/**
|
|
5191
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5192
|
+
*/
|
|
5193
|
+
|
|
5194
|
+
interface StudioLlmModelPublic {
|
|
5195
|
+
model: string;
|
|
5196
|
+
parameters?: JsonNodePublic;
|
|
5197
|
+
}
|
|
5198
|
+
|
|
5199
|
+
/**
|
|
5200
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5201
|
+
*/
|
|
5202
|
+
interface StudioMessagePublic {
|
|
5203
|
+
role: string;
|
|
5204
|
+
content: string;
|
|
5205
|
+
}
|
|
5206
|
+
|
|
5207
|
+
/**
|
|
5208
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5209
|
+
*/
|
|
5210
|
+
|
|
5211
|
+
interface StudioMetricPublic {
|
|
5212
|
+
type: string;
|
|
5213
|
+
parameters?: JsonNodePublic;
|
|
5214
|
+
}
|
|
5215
|
+
|
|
5216
|
+
/**
|
|
5217
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5218
|
+
*/
|
|
5219
|
+
|
|
5220
|
+
interface StudioOptimizerPublic {
|
|
5221
|
+
type: string;
|
|
5222
|
+
parameters?: JsonNodePublic;
|
|
5223
|
+
}
|
|
5224
|
+
|
|
5225
|
+
/**
|
|
5226
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5227
|
+
*/
|
|
5228
|
+
|
|
5229
|
+
interface StudioPromptPublic {
|
|
5230
|
+
messages: StudioMessagePublic[];
|
|
5231
|
+
}
|
|
5232
|
+
|
|
5233
|
+
/**
|
|
5234
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
5235
|
+
*/
|
|
5236
|
+
interface OptimizationStudioLog {
|
|
5237
|
+
url?: string;
|
|
5238
|
+
lastModified?: Date;
|
|
5239
|
+
expiresAt?: Date;
|
|
5240
|
+
}
|
|
5241
|
+
|
|
5054
5242
|
/**
|
|
5055
5243
|
* This file was auto-generated by Fern from our API Definition.
|
|
5056
5244
|
*/
|
|
@@ -5110,6 +5298,7 @@ interface FeedbackScoreNames {
|
|
|
5110
5298
|
*/
|
|
5111
5299
|
interface ScoreName {
|
|
5112
5300
|
name?: string;
|
|
5301
|
+
type?: string;
|
|
5113
5302
|
}
|
|
5114
5303
|
|
|
5115
5304
|
/**
|
|
@@ -5377,6 +5566,7 @@ interface ServiceTogglesConfig {
|
|
|
5377
5566
|
welcomeWizardEnabled: boolean;
|
|
5378
5567
|
csvUploadEnabled: boolean;
|
|
5379
5568
|
exportEnabled: boolean;
|
|
5569
|
+
dashboardsEnabled: boolean;
|
|
5380
5570
|
}
|
|
5381
5571
|
|
|
5382
5572
|
/**
|
|
@@ -6676,8 +6866,7 @@ declare class AutomationRuleEvaluators {
|
|
|
6676
6866
|
*
|
|
6677
6867
|
* @example
|
|
6678
6868
|
* await client.automationRuleEvaluators.createAutomationRuleEvaluator({
|
|
6679
|
-
* type: "llm_as_judge"
|
|
6680
|
-
* filters: [{}]
|
|
6869
|
+
* type: "llm_as_judge"
|
|
6681
6870
|
* })
|
|
6682
6871
|
*/
|
|
6683
6872
|
createAutomationRuleEvaluator(request: AutomationRuleEvaluatorWrite, requestOptions?: AutomationRuleEvaluators.RequestOptions): HttpResponsePromise<void>;
|
|
@@ -7989,6 +8178,19 @@ declare namespace Optimizations {
|
|
|
7989
8178
|
declare class Optimizations {
|
|
7990
8179
|
protected readonly _options: Optimizations.Options;
|
|
7991
8180
|
constructor(_options?: Optimizations.Options);
|
|
8181
|
+
/**
|
|
8182
|
+
* Cancel Studio optimizations by id
|
|
8183
|
+
*
|
|
8184
|
+
* @param {string} id
|
|
8185
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
8186
|
+
*
|
|
8187
|
+
* @throws {@link OpikApi.NotImplementedError}
|
|
8188
|
+
*
|
|
8189
|
+
* @example
|
|
8190
|
+
* await client.optimizations.cancelStudioOptimizations("id")
|
|
8191
|
+
*/
|
|
8192
|
+
cancelStudioOptimizations(id: string, requestOptions?: Optimizations.RequestOptions): HttpResponsePromise<void>;
|
|
8193
|
+
private __cancelStudioOptimizations;
|
|
7992
8194
|
/**
|
|
7993
8195
|
* Find optimizations
|
|
7994
8196
|
*
|
|
@@ -8045,6 +8247,19 @@ declare class Optimizations {
|
|
|
8045
8247
|
*/
|
|
8046
8248
|
deleteOptimizationsById(request: DeleteIdsHolder, requestOptions?: Optimizations.RequestOptions): HttpResponsePromise<void>;
|
|
8047
8249
|
private __deleteOptimizationsById;
|
|
8250
|
+
/**
|
|
8251
|
+
* Find Studio optimizations
|
|
8252
|
+
*
|
|
8253
|
+
* @param {OpikApi.FindStudioOptimizationsRequest} request
|
|
8254
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
8255
|
+
*
|
|
8256
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
8257
|
+
*
|
|
8258
|
+
* @example
|
|
8259
|
+
* await client.optimizations.findStudioOptimizations()
|
|
8260
|
+
*/
|
|
8261
|
+
findStudioOptimizations(request?: FindStudioOptimizationsRequest, requestOptions?: Optimizations.RequestOptions): HttpResponsePromise<OptimizationPagePublic>;
|
|
8262
|
+
private __findStudioOptimizations;
|
|
8048
8263
|
/**
|
|
8049
8264
|
* Get optimization by id
|
|
8050
8265
|
*
|
|
@@ -8070,6 +8285,32 @@ declare class Optimizations {
|
|
|
8070
8285
|
*/
|
|
8071
8286
|
updateOptimizationsById(id: string, request?: OptimizationUpdate, requestOptions?: Optimizations.RequestOptions): HttpResponsePromise<void>;
|
|
8072
8287
|
private __updateOptimizationsById;
|
|
8288
|
+
/**
|
|
8289
|
+
* Get Studio optimization with config included
|
|
8290
|
+
*
|
|
8291
|
+
* @param {string} id
|
|
8292
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
8293
|
+
*
|
|
8294
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
8295
|
+
*
|
|
8296
|
+
* @example
|
|
8297
|
+
* await client.optimizations.getStudioOptimizationById("id")
|
|
8298
|
+
*/
|
|
8299
|
+
getStudioOptimizationById(id: string, requestOptions?: Optimizations.RequestOptions): HttpResponsePromise<OptimizationPublic>;
|
|
8300
|
+
private __getStudioOptimizationById;
|
|
8301
|
+
/**
|
|
8302
|
+
* Get presigned S3 URL for downloading optimization logs
|
|
8303
|
+
*
|
|
8304
|
+
* @param {string} id
|
|
8305
|
+
* @param {Optimizations.RequestOptions} requestOptions - Request-specific configuration.
|
|
8306
|
+
*
|
|
8307
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
8308
|
+
*
|
|
8309
|
+
* @example
|
|
8310
|
+
* await client.optimizations.getStudioOptimizationLogs("id")
|
|
8311
|
+
*/
|
|
8312
|
+
getStudioOptimizationLogs(id: string, requestOptions?: Optimizations.RequestOptions): HttpResponsePromise<OptimizationStudioLog>;
|
|
8313
|
+
private __getStudioOptimizationLogs;
|
|
8073
8314
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
8074
8315
|
Authorization: string | undefined;
|
|
8075
8316
|
}>;
|