opik 1.7.39 → 1.7.40
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/{Client-BntXB8eo.d.cts → Client-C7Xiey1t.d.cts} +250 -15
- package/dist/{Client-BntXB8eo.d.ts → Client-C7Xiey1t.d.ts} +250 -15
- package/dist/chunk-HRJZXGNA.js +9 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/vercel/index.cjs +7 -7
- package/dist/vercel/index.d.cts +1 -1
- package/dist/vercel/index.d.ts +1 -1
- package/dist/vercel/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-YTKEPPFT.js +0 -9
|
@@ -1119,6 +1119,23 @@ interface TraceUpdate {
|
|
|
1119
1119
|
threadId?: string;
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
+
/**
|
|
1123
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1124
|
+
*/
|
|
1125
|
+
/**
|
|
1126
|
+
* @example
|
|
1127
|
+
* {
|
|
1128
|
+
* projectName: "project_name",
|
|
1129
|
+
* threadId: "thread_id",
|
|
1130
|
+
* names: ["names"]
|
|
1131
|
+
* }
|
|
1132
|
+
*/
|
|
1133
|
+
interface DeleteThreadFeedbackScores {
|
|
1134
|
+
projectName: string;
|
|
1135
|
+
threadId: string;
|
|
1136
|
+
names: string[];
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1122
1139
|
/**
|
|
1123
1140
|
* This file was auto-generated by Fern from our API Definition.
|
|
1124
1141
|
*/
|
|
@@ -1147,6 +1164,19 @@ interface FindFeedbackScoreNames2Request {
|
|
|
1147
1164
|
projectId?: string;
|
|
1148
1165
|
}
|
|
1149
1166
|
|
|
1167
|
+
/**
|
|
1168
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1169
|
+
*/
|
|
1170
|
+
/**
|
|
1171
|
+
* @example
|
|
1172
|
+
* {
|
|
1173
|
+
* projectId: "project_id"
|
|
1174
|
+
* }
|
|
1175
|
+
*/
|
|
1176
|
+
interface FindTraceThreadsFeedbackScoreNamesRequest {
|
|
1177
|
+
projectId: string;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1150
1180
|
/**
|
|
1151
1181
|
* This file was auto-generated by Fern from our API Definition.
|
|
1152
1182
|
*/
|
|
@@ -1181,12 +1211,31 @@ interface GetTraceThreadsRequest {
|
|
|
1181
1211
|
* This file was auto-generated by Fern from our API Definition.
|
|
1182
1212
|
*/
|
|
1183
1213
|
|
|
1184
|
-
|
|
1214
|
+
/**
|
|
1215
|
+
* @example
|
|
1216
|
+
* {
|
|
1217
|
+
* scores: [{
|
|
1218
|
+
* threadId: "thread_id",
|
|
1219
|
+
* name: "name",
|
|
1220
|
+
* value: 1.1,
|
|
1221
|
+
* source: "ui"
|
|
1222
|
+
* }]
|
|
1223
|
+
* }
|
|
1224
|
+
*/
|
|
1225
|
+
interface FeedbackScoreBatchThread {
|
|
1226
|
+
scores: FeedbackScoreBatchItemThread[];
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1231
|
+
*/
|
|
1232
|
+
|
|
1233
|
+
interface TraceThreadSearchStreamRequest {
|
|
1185
1234
|
projectName?: string;
|
|
1186
1235
|
projectId?: string;
|
|
1187
|
-
filters?:
|
|
1188
|
-
|
|
1189
|
-
/** Max number of
|
|
1236
|
+
filters?: TraceThreadFilter[];
|
|
1237
|
+
lastRetrievedThreadModelId?: string;
|
|
1238
|
+
/** Max number of trace thread to be streamed */
|
|
1190
1239
|
limit?: number;
|
|
1191
1240
|
/** Truncate image included in either input, output or metadata */
|
|
1192
1241
|
truncate?: boolean;
|
|
@@ -1195,17 +1244,16 @@ interface TraceSearchStreamRequestPublic {
|
|
|
1195
1244
|
/**
|
|
1196
1245
|
* This file was auto-generated by Fern from our API Definition.
|
|
1197
1246
|
*/
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
*/
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
intervalEnd: Date;
|
|
1247
|
+
|
|
1248
|
+
interface TraceSearchStreamRequestPublic {
|
|
1249
|
+
projectName?: string;
|
|
1250
|
+
projectId?: string;
|
|
1251
|
+
filters?: TraceFilterPublic[];
|
|
1252
|
+
lastRetrievedId?: string;
|
|
1253
|
+
/** Max number of traces to be streamed */
|
|
1254
|
+
limit?: number;
|
|
1255
|
+
/** Truncate image included in either input, output or metadata */
|
|
1256
|
+
truncate?: boolean;
|
|
1209
1257
|
}
|
|
1210
1258
|
|
|
1211
1259
|
/**
|
|
@@ -3783,6 +3831,15 @@ interface TracePublic {
|
|
|
3783
3831
|
llmSpanCount?: number;
|
|
3784
3832
|
}
|
|
3785
3833
|
|
|
3834
|
+
/**
|
|
3835
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3836
|
+
*/
|
|
3837
|
+
type TraceThreadStatus = "active" | "inactive";
|
|
3838
|
+
declare const TraceThreadStatus: {
|
|
3839
|
+
readonly Active: "active";
|
|
3840
|
+
readonly Inactive: "inactive";
|
|
3841
|
+
};
|
|
3842
|
+
|
|
3786
3843
|
/**
|
|
3787
3844
|
* This file was auto-generated by Fern from our API Definition.
|
|
3788
3845
|
*/
|
|
@@ -3790,11 +3847,14 @@ interface TracePublic {
|
|
|
3790
3847
|
interface TraceThread {
|
|
3791
3848
|
id?: string;
|
|
3792
3849
|
projectId?: string;
|
|
3850
|
+
threadModelId?: string;
|
|
3793
3851
|
startTime?: Date;
|
|
3794
3852
|
endTime?: Date;
|
|
3795
3853
|
duration?: number;
|
|
3796
3854
|
firstMessage?: JsonNode;
|
|
3797
3855
|
lastMessage?: JsonNode;
|
|
3856
|
+
feedbackScores?: FeedbackScore[];
|
|
3857
|
+
status?: TraceThreadStatus;
|
|
3798
3858
|
numberOfMessages?: number;
|
|
3799
3859
|
totalEstimatedCost?: number;
|
|
3800
3860
|
usage?: Record<string, number>;
|
|
@@ -3827,6 +3887,61 @@ interface TracePagePublic {
|
|
|
3827
3887
|
sortableBy?: string[];
|
|
3828
3888
|
}
|
|
3829
3889
|
|
|
3890
|
+
/**
|
|
3891
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3892
|
+
*/
|
|
3893
|
+
type FeedbackScoreBatchItemThreadSource = "ui" | "sdk" | "online_scoring";
|
|
3894
|
+
declare const FeedbackScoreBatchItemThreadSource: {
|
|
3895
|
+
readonly Ui: "ui";
|
|
3896
|
+
readonly Sdk: "sdk";
|
|
3897
|
+
readonly OnlineScoring: "online_scoring";
|
|
3898
|
+
};
|
|
3899
|
+
|
|
3900
|
+
/**
|
|
3901
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3902
|
+
*/
|
|
3903
|
+
|
|
3904
|
+
interface FeedbackScoreBatchItemThread {
|
|
3905
|
+
threadId: string;
|
|
3906
|
+
/** If null, the default project is used */
|
|
3907
|
+
projectName?: string;
|
|
3908
|
+
name: string;
|
|
3909
|
+
categoryName?: string;
|
|
3910
|
+
value: number;
|
|
3911
|
+
reason?: string;
|
|
3912
|
+
source: FeedbackScoreBatchItemThreadSource;
|
|
3913
|
+
}
|
|
3914
|
+
|
|
3915
|
+
/**
|
|
3916
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3917
|
+
*/
|
|
3918
|
+
type TraceThreadFilterOperator = "contains" | "not_contains" | "starts_with" | "ends_with" | "=" | "!=" | ">" | ">=" | "<" | "<=" | "is_empty" | "is_not_empty";
|
|
3919
|
+
declare const TraceThreadFilterOperator: {
|
|
3920
|
+
readonly Contains: "contains";
|
|
3921
|
+
readonly NotContains: "not_contains";
|
|
3922
|
+
readonly StartsWith: "starts_with";
|
|
3923
|
+
readonly EndsWith: "ends_with";
|
|
3924
|
+
readonly EqualTo: "=";
|
|
3925
|
+
readonly NotEquals: "!=";
|
|
3926
|
+
readonly GreaterThan: ">";
|
|
3927
|
+
readonly GreaterThanOrEqualTo: ">=";
|
|
3928
|
+
readonly LessThan: "<";
|
|
3929
|
+
readonly LessThanOrEqualTo: "<=";
|
|
3930
|
+
readonly IsEmpty: "is_empty";
|
|
3931
|
+
readonly IsNotEmpty: "is_not_empty";
|
|
3932
|
+
};
|
|
3933
|
+
|
|
3934
|
+
/**
|
|
3935
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3936
|
+
*/
|
|
3937
|
+
|
|
3938
|
+
interface TraceThreadFilter {
|
|
3939
|
+
field?: string;
|
|
3940
|
+
operator?: TraceThreadFilterOperator;
|
|
3941
|
+
key?: string;
|
|
3942
|
+
value?: string;
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3830
3945
|
/**
|
|
3831
3946
|
* This file was auto-generated by Fern from our API Definition.
|
|
3832
3947
|
*/
|
|
@@ -3866,6 +3981,24 @@ interface Result {
|
|
|
3866
3981
|
previous?: number;
|
|
3867
3982
|
}
|
|
3868
3983
|
|
|
3984
|
+
/**
|
|
3985
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3986
|
+
*/
|
|
3987
|
+
interface WorkspaceMetricsSummaryRequest {
|
|
3988
|
+
projectIds?: string[];
|
|
3989
|
+
intervalStart: Date;
|
|
3990
|
+
intervalEnd: Date;
|
|
3991
|
+
startBeforeEnd?: boolean;
|
|
3992
|
+
}
|
|
3993
|
+
|
|
3994
|
+
/**
|
|
3995
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3996
|
+
*/
|
|
3997
|
+
|
|
3998
|
+
interface WorkspaceMetricResponse {
|
|
3999
|
+
results?: Result[];
|
|
4000
|
+
}
|
|
4001
|
+
|
|
3869
4002
|
/**
|
|
3870
4003
|
* This file was auto-generated by Fern from our API Definition.
|
|
3871
4004
|
*/
|
|
@@ -6048,6 +6181,8 @@ declare class Traces {
|
|
|
6048
6181
|
* @param {OpikApi.TraceThreadIdentifier} request
|
|
6049
6182
|
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
6050
6183
|
*
|
|
6184
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
6185
|
+
*
|
|
6051
6186
|
* @example
|
|
6052
6187
|
* await client.traces.closeTraceThread({
|
|
6053
6188
|
* threadId: "thread_id"
|
|
@@ -6128,6 +6263,21 @@ declare class Traces {
|
|
|
6128
6263
|
*/
|
|
6129
6264
|
updateTrace(id: string, request?: TraceUpdate, requestOptions?: Traces.RequestOptions): HttpResponsePromise<void>;
|
|
6130
6265
|
private __updateTrace;
|
|
6266
|
+
/**
|
|
6267
|
+
* Delete thread feedback scores
|
|
6268
|
+
*
|
|
6269
|
+
* @param {OpikApi.DeleteThreadFeedbackScores} request
|
|
6270
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
6271
|
+
*
|
|
6272
|
+
* @example
|
|
6273
|
+
* await client.traces.deleteThreadFeedbackScores({
|
|
6274
|
+
* projectName: "project_name",
|
|
6275
|
+
* threadId: "thread_id",
|
|
6276
|
+
* names: ["names"]
|
|
6277
|
+
* })
|
|
6278
|
+
*/
|
|
6279
|
+
deleteThreadFeedbackScores(request: DeleteThreadFeedbackScores, requestOptions?: Traces.RequestOptions): HttpResponsePromise<void>;
|
|
6280
|
+
private __deleteThreadFeedbackScores;
|
|
6131
6281
|
/**
|
|
6132
6282
|
* Delete trace comments
|
|
6133
6283
|
*
|
|
@@ -6192,6 +6342,19 @@ declare class Traces {
|
|
|
6192
6342
|
*/
|
|
6193
6343
|
findFeedbackScoreNames2(request?: FindFeedbackScoreNames2Request, requestOptions?: Traces.RequestOptions): HttpResponsePromise<string[]>;
|
|
6194
6344
|
private __findFeedbackScoreNames2;
|
|
6345
|
+
/**
|
|
6346
|
+
* Find Trace Threads Feedback Score names
|
|
6347
|
+
*
|
|
6348
|
+
* @param {OpikApi.FindTraceThreadsFeedbackScoreNamesRequest} request
|
|
6349
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
6350
|
+
*
|
|
6351
|
+
* @example
|
|
6352
|
+
* await client.traces.findTraceThreadsFeedbackScoreNames({
|
|
6353
|
+
* projectId: "project_id"
|
|
6354
|
+
* })
|
|
6355
|
+
*/
|
|
6356
|
+
findTraceThreadsFeedbackScoreNames(request: FindTraceThreadsFeedbackScoreNamesRequest, requestOptions?: Traces.RequestOptions): HttpResponsePromise<string[]>;
|
|
6357
|
+
private __findTraceThreadsFeedbackScoreNames;
|
|
6195
6358
|
/**
|
|
6196
6359
|
* Get trace stats
|
|
6197
6360
|
*
|
|
@@ -6256,6 +6419,24 @@ declare class Traces {
|
|
|
6256
6419
|
*/
|
|
6257
6420
|
openTraceThread(request: TraceThreadIdentifier, requestOptions?: Traces.RequestOptions): HttpResponsePromise<void>;
|
|
6258
6421
|
private __openTraceThread;
|
|
6422
|
+
/**
|
|
6423
|
+
* Batch feedback scoring for threads
|
|
6424
|
+
*
|
|
6425
|
+
* @param {OpikApi.FeedbackScoreBatchThread} request
|
|
6426
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
6427
|
+
*
|
|
6428
|
+
* @example
|
|
6429
|
+
* await client.traces.scoreBatchOfThreads({
|
|
6430
|
+
* scores: [{
|
|
6431
|
+
* threadId: "thread_id",
|
|
6432
|
+
* name: "name",
|
|
6433
|
+
* value: 1.1,
|
|
6434
|
+
* source: "ui"
|
|
6435
|
+
* }]
|
|
6436
|
+
* })
|
|
6437
|
+
*/
|
|
6438
|
+
scoreBatchOfThreads(request: FeedbackScoreBatchThread, requestOptions?: Traces.RequestOptions): HttpResponsePromise<void>;
|
|
6439
|
+
private __scoreBatchOfThreads;
|
|
6259
6440
|
/**
|
|
6260
6441
|
* Batch feedback scoring for traces
|
|
6261
6442
|
*
|
|
@@ -6274,6 +6455,12 @@ declare class Traces {
|
|
|
6274
6455
|
*/
|
|
6275
6456
|
scoreBatchOfTraces(request: FeedbackScoreBatch, requestOptions?: Traces.RequestOptions): HttpResponsePromise<void>;
|
|
6276
6457
|
private __scoreBatchOfTraces;
|
|
6458
|
+
/**
|
|
6459
|
+
* Search trace threads
|
|
6460
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
6461
|
+
*/
|
|
6462
|
+
searchTraceThreads(request?: TraceThreadSearchStreamRequest, requestOptions?: Traces.RequestOptions): HttpResponsePromise<stream.Readable>;
|
|
6463
|
+
private __searchTraceThreads;
|
|
6277
6464
|
/**
|
|
6278
6465
|
* Search traces
|
|
6279
6466
|
* @throws {@link OpikApi.BadRequestError}
|
|
@@ -6337,6 +6524,54 @@ declare namespace Workspaces {
|
|
|
6337
6524
|
declare class Workspaces {
|
|
6338
6525
|
protected readonly _options: Workspaces.Options;
|
|
6339
6526
|
constructor(_options?: Workspaces.Options);
|
|
6527
|
+
/**
|
|
6528
|
+
* Get costs summary
|
|
6529
|
+
*
|
|
6530
|
+
* @param {OpikApi.WorkspaceMetricsSummaryRequest} request
|
|
6531
|
+
* @param {Workspaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
6532
|
+
*
|
|
6533
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
6534
|
+
*
|
|
6535
|
+
* @example
|
|
6536
|
+
* await client.workspaces.costsSummary({
|
|
6537
|
+
* intervalStart: "2024-01-15T09:30:00Z",
|
|
6538
|
+
* intervalEnd: "2024-01-15T09:30:00Z"
|
|
6539
|
+
* })
|
|
6540
|
+
*/
|
|
6541
|
+
costsSummary(request: WorkspaceMetricsSummaryRequest, requestOptions?: Workspaces.RequestOptions): HttpResponsePromise<Result>;
|
|
6542
|
+
private __costsSummary;
|
|
6543
|
+
/**
|
|
6544
|
+
* Get cost daily data
|
|
6545
|
+
*
|
|
6546
|
+
* @param {OpikApi.WorkspaceMetricsSummaryRequest} request
|
|
6547
|
+
* @param {Workspaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
6548
|
+
*
|
|
6549
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
6550
|
+
*
|
|
6551
|
+
* @example
|
|
6552
|
+
* await client.workspaces.getCost({
|
|
6553
|
+
* intervalStart: "2024-01-15T09:30:00Z",
|
|
6554
|
+
* intervalEnd: "2024-01-15T09:30:00Z"
|
|
6555
|
+
* })
|
|
6556
|
+
*/
|
|
6557
|
+
getCost(request: WorkspaceMetricsSummaryRequest, requestOptions?: Workspaces.RequestOptions): HttpResponsePromise<WorkspaceMetricResponse>;
|
|
6558
|
+
private __getCost;
|
|
6559
|
+
/**
|
|
6560
|
+
* Get metric daily data
|
|
6561
|
+
*
|
|
6562
|
+
* @param {OpikApi.WorkspaceMetricsSummaryRequest} request
|
|
6563
|
+
* @param {Workspaces.RequestOptions} requestOptions - Request-specific configuration.
|
|
6564
|
+
*
|
|
6565
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
6566
|
+
*
|
|
6567
|
+
* @example
|
|
6568
|
+
* await client.workspaces.getMetric({
|
|
6569
|
+
* intervalStart: "2024-01-15T09:30:00Z",
|
|
6570
|
+
* intervalEnd: "2024-01-15T09:30:00Z"
|
|
6571
|
+
* })
|
|
6572
|
+
*/
|
|
6573
|
+
getMetric(request: WorkspaceMetricsSummaryRequest, requestOptions?: Workspaces.RequestOptions): HttpResponsePromise<WorkspaceMetricResponse>;
|
|
6574
|
+
private __getMetric;
|
|
6340
6575
|
/**
|
|
6341
6576
|
* Get metrics summary
|
|
6342
6577
|
*
|