opik 1.6.12 → 1.6.14

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.
@@ -16,15 +16,6 @@ declare const AttachmentListRequestEntityType: {
16
16
  readonly Span: "span";
17
17
  };
18
18
 
19
- /**
20
- * This file was auto-generated by Fern from our API Definition.
21
- */
22
- type CompleteMultipartUploadRequestEntityType = "trace" | "span";
23
- declare const CompleteMultipartUploadRequestEntityType: {
24
- readonly Trace: "trace";
25
- readonly Span: "span";
26
- };
27
-
28
19
  /**
29
20
  * This file was auto-generated by Fern from our API Definition.
30
21
  */
@@ -74,36 +65,6 @@ interface AttachmentListRequest {
74
65
  path: string;
75
66
  }
76
67
 
77
- /**
78
- * This file was auto-generated by Fern from our API Definition.
79
- */
80
-
81
- /**
82
- * @example
83
- * {
84
- * fileName: "file_name",
85
- * entityType: "trace",
86
- * entityId: "entity_id",
87
- * fileSize: 1000000,
88
- * uploadId: "upload_id",
89
- * uploadedFileParts: [{
90
- * eTag: "e_tag",
91
- * partNumber: 1
92
- * }]
93
- * }
94
- */
95
- interface CompleteMultipartUploadRequest {
96
- fileName: string;
97
- /** If null, the default project is used */
98
- projectName?: string;
99
- entityType: CompleteMultipartUploadRequestEntityType;
100
- entityId: string;
101
- fileSize: number;
102
- mimeType?: string;
103
- uploadId: string;
104
- uploadedFileParts: MultipartUploadPart[];
105
- }
106
-
107
68
  /**
108
69
  * This file was auto-generated by Fern from our API Definition.
109
70
  */
@@ -857,6 +818,7 @@ interface FindExperimentsRequest {
857
818
  name?: string;
858
819
  datasetDeleted?: boolean;
859
820
  promptId?: string;
821
+ sorting?: string;
860
822
  }
861
823
 
862
824
  /**
@@ -936,25 +898,21 @@ interface FindFeedbackScoreNamesRequest {
936
898
  /**
937
899
  * This file was auto-generated by Fern from our API Definition.
938
900
  */
939
- /**
940
- * @example
941
- * {
942
- * name: "name"
943
- * }
944
- */
945
- interface IdentifierPublic {
946
- name: string;
901
+ interface ExperimentItemStreamRequest {
902
+ experimentName: string;
903
+ limit?: number;
904
+ lastRetrievedId?: string;
905
+ /** Truncate image included in either input, output or metadata */
906
+ truncate?: boolean;
947
907
  }
948
908
 
949
909
  /**
950
910
  * This file was auto-generated by Fern from our API Definition.
951
911
  */
952
- interface ExperimentItemStreamRequest {
953
- experimentName: string;
912
+ interface ExperimentStreamRequestPublic {
913
+ name: string;
954
914
  limit?: number;
955
915
  lastRetrievedId?: string;
956
- /** Truncate image included in either input, output or metadata */
957
- truncate?: boolean;
958
916
  }
959
917
 
960
918
  /**
@@ -1204,9 +1162,9 @@ interface WorkspaceTraceCount {
1204
1162
  */
1205
1163
  interface Attachment {
1206
1164
  link?: string;
1207
- fileName?: string;
1208
- fileSize?: number;
1209
- mimeType?: string;
1165
+ fileName: string;
1166
+ fileSize: number;
1167
+ mimeType: string;
1210
1168
  }
1211
1169
 
1212
1170
  /**
@@ -1221,6 +1179,32 @@ interface AttachmentPage {
1221
1179
  sortableBy?: string[];
1222
1180
  }
1223
1181
 
1182
+ /**
1183
+ * This file was auto-generated by Fern from our API Definition.
1184
+ */
1185
+ type CompleteMultipartUploadRequestEntityType = "trace" | "span";
1186
+ declare const CompleteMultipartUploadRequestEntityType: {
1187
+ readonly Trace: "trace";
1188
+ readonly Span: "span";
1189
+ };
1190
+
1191
+ /**
1192
+ * This file was auto-generated by Fern from our API Definition.
1193
+ */
1194
+
1195
+ interface CompleteMultipartUploadRequest {
1196
+ fileName: string;
1197
+ /** If null, the default project is used */
1198
+ projectName?: string;
1199
+ entityType: CompleteMultipartUploadRequestEntityType;
1200
+ entityId: string;
1201
+ containerId?: string;
1202
+ fileSize: number;
1203
+ mimeType?: string;
1204
+ uploadId: string;
1205
+ uploadedFileParts: MultipartUploadPart[];
1206
+ }
1207
+
1224
1208
  /**
1225
1209
  * This file was auto-generated by Fern from our API Definition.
1226
1210
  */
@@ -2226,6 +2210,7 @@ interface ExperimentPagePublic {
2226
2210
  size?: number;
2227
2211
  total?: number;
2228
2212
  content?: ExperimentPublic[];
2213
+ sortableBy?: string[];
2229
2214
  }
2230
2215
 
2231
2216
  /**
@@ -2770,6 +2755,13 @@ interface PromptPublic {
2770
2755
  versionCount?: number;
2771
2756
  }
2772
2757
 
2758
+ /**
2759
+ * This file was auto-generated by Fern from our API Definition.
2760
+ */
2761
+ interface ServiceTogglesConfig {
2762
+ pythonEvaluatorEnabled: boolean;
2763
+ }
2764
+
2773
2765
  /**
2774
2766
  * This file was auto-generated by Fern from our API Definition.
2775
2767
  */
@@ -2927,6 +2919,8 @@ declare const SpanPublicType: {
2927
2919
 
2928
2920
  interface SpanPublic {
2929
2921
  id?: string;
2922
+ /** If null, the default project is used */
2923
+ projectName?: string;
2930
2924
  projectId?: string;
2931
2925
  traceId: string;
2932
2926
  parentSpanId?: string;
@@ -3412,6 +3406,29 @@ declare class Attachments {
3412
3406
  * })
3413
3407
  */
3414
3408
  startMultiPartUpload(request: CompleteMultipartUploadRequest, requestOptions?: Attachments.RequestOptions): Promise<void>;
3409
+ /**
3410
+ * Delete attachments
3411
+ *
3412
+ * @param {OpikApi.CompleteMultipartUploadRequest} request
3413
+ * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration.
3414
+ *
3415
+ * @throws {@link OpikApi.UnauthorizedError}
3416
+ * @throws {@link OpikApi.ForbiddenError}
3417
+ *
3418
+ * @example
3419
+ * await client.attachments.deleteAttachments({
3420
+ * fileName: "file_name",
3421
+ * entityType: "trace",
3422
+ * entityId: "entity_id",
3423
+ * fileSize: 1000000,
3424
+ * uploadId: "upload_id",
3425
+ * uploadedFileParts: [{
3426
+ * eTag: "e_tag",
3427
+ * partNumber: 1
3428
+ * }]
3429
+ * })
3430
+ */
3431
+ deleteAttachments(request: CompleteMultipartUploadRequest, requestOptions?: Attachments.RequestOptions): Promise<void>;
3415
3432
  /**
3416
3433
  * Download attachment from MinIO
3417
3434
  * @throws {@link OpikApi.UnauthorizedError}
@@ -3940,6 +3957,8 @@ declare class Experiments {
3940
3957
  * @param {OpikApi.FindExperimentsRequest} request
3941
3958
  * @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
3942
3959
  *
3960
+ * @throws {@link OpikApi.BadRequestError}
3961
+ *
3943
3962
  * @example
3944
3963
  * await client.experiments.findExperiments()
3945
3964
  */
@@ -4018,20 +4037,6 @@ declare class Experiments {
4018
4037
  * await client.experiments.getExperimentById("id")
4019
4038
  */
4020
4039
  getExperimentById(id: string, requestOptions?: Experiments.RequestOptions): Promise<ExperimentPublic>;
4021
- /**
4022
- * Get experiment by name
4023
- *
4024
- * @param {OpikApi.IdentifierPublic} request
4025
- * @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
4026
- *
4027
- * @throws {@link OpikApi.NotFoundError}
4028
- *
4029
- * @example
4030
- * await client.experiments.getExperimentByName({
4031
- * name: "name"
4032
- * })
4033
- */
4034
- getExperimentByName(request: IdentifierPublic, requestOptions?: Experiments.RequestOptions): Promise<ExperimentPublic>;
4035
4040
  /**
4036
4041
  * Get experiment item by id
4037
4042
  *
@@ -4048,6 +4053,10 @@ declare class Experiments {
4048
4053
  * Stream experiment items
4049
4054
  */
4050
4055
  streamExperimentItems(request: ExperimentItemStreamRequest, requestOptions?: Experiments.RequestOptions): Promise<stream.Readable>;
4056
+ /**
4057
+ * Stream experiments
4058
+ */
4059
+ streamExperiments(request: ExperimentStreamRequestPublic, requestOptions?: Experiments.RequestOptions): Promise<stream.Readable>;
4051
4060
  protected _getCustomAuthorizationHeaders(): Promise<{
4052
4061
  Authorization: string | undefined;
4053
4062
  }>;
@@ -4270,6 +4279,53 @@ declare class LlmProviderKey {
4270
4279
  }>;
4271
4280
  }
4272
4281
 
4282
+ /**
4283
+ * This file was auto-generated by Fern from our API Definition.
4284
+ */
4285
+
4286
+ declare namespace OpenTelemetryIngestion {
4287
+ interface Options {
4288
+ environment?: Supplier<OpikApiEnvironment | string>;
4289
+ /** Specify a custom URL to connect the client to. */
4290
+ baseUrl?: Supplier<string>;
4291
+ /** Override the Authorization header */
4292
+ apiKey?: Supplier<string | undefined>;
4293
+ /** Override the Comet-Workspace header */
4294
+ workspaceName?: Supplier<string | undefined>;
4295
+ }
4296
+ interface RequestOptions {
4297
+ /** The maximum time to wait for a response in seconds. */
4298
+ timeoutInSeconds?: number;
4299
+ /** The number of times to retry the request. Defaults to 2. */
4300
+ maxRetries?: number;
4301
+ /** A hook to abort the request. */
4302
+ abortSignal?: AbortSignal;
4303
+ /** Override the Authorization header */
4304
+ apiKey?: string | undefined;
4305
+ /** Override the Comet-Workspace header */
4306
+ workspaceName?: string | undefined;
4307
+ /** Additional headers to include in the request. */
4308
+ headers?: Record<string, string>;
4309
+ }
4310
+ }
4311
+ /**
4312
+ * Resource to ingest Traces and Spans via OpenTelemetry
4313
+ */
4314
+ declare class OpenTelemetryIngestion {
4315
+ protected readonly _options: OpenTelemetryIngestion.Options;
4316
+ constructor(_options?: OpenTelemetryIngestion.Options);
4317
+ /**
4318
+ * @param {OpenTelemetryIngestion.RequestOptions} requestOptions - Request-specific configuration.
4319
+ *
4320
+ * @example
4321
+ * await client.openTelemetryIngestion.receiveProtobufTraces()
4322
+ */
4323
+ receiveProtobufTraces(requestOptions?: OpenTelemetryIngestion.RequestOptions): Promise<unknown>;
4324
+ protected _getCustomAuthorizationHeaders(): Promise<{
4325
+ Authorization: string | undefined;
4326
+ }>;
4327
+ }
4328
+
4273
4329
  /**
4274
4330
  * This file was auto-generated by Fern from our API Definition.
4275
4331
  */
@@ -4609,6 +4665,55 @@ declare class Prompts {
4609
4665
  }>;
4610
4666
  }
4611
4667
 
4668
+ /**
4669
+ * This file was auto-generated by Fern from our API Definition.
4670
+ */
4671
+
4672
+ declare namespace ServiceToggles {
4673
+ interface Options {
4674
+ environment?: Supplier<OpikApiEnvironment | string>;
4675
+ /** Specify a custom URL to connect the client to. */
4676
+ baseUrl?: Supplier<string>;
4677
+ /** Override the Authorization header */
4678
+ apiKey?: Supplier<string | undefined>;
4679
+ /** Override the Comet-Workspace header */
4680
+ workspaceName?: Supplier<string | undefined>;
4681
+ }
4682
+ interface RequestOptions {
4683
+ /** The maximum time to wait for a response in seconds. */
4684
+ timeoutInSeconds?: number;
4685
+ /** The number of times to retry the request. Defaults to 2. */
4686
+ maxRetries?: number;
4687
+ /** A hook to abort the request. */
4688
+ abortSignal?: AbortSignal;
4689
+ /** Override the Authorization header */
4690
+ apiKey?: string | undefined;
4691
+ /** Override the Comet-Workspace header */
4692
+ workspaceName?: string | undefined;
4693
+ /** Additional headers to include in the request. */
4694
+ headers?: Record<string, string>;
4695
+ }
4696
+ }
4697
+ /**
4698
+ * Service Toggles resources
4699
+ */
4700
+ declare class ServiceToggles {
4701
+ protected readonly _options: ServiceToggles.Options;
4702
+ constructor(_options?: ServiceToggles.Options);
4703
+ /**
4704
+ * Get Service Toggles
4705
+ *
4706
+ * @param {ServiceToggles.RequestOptions} requestOptions - Request-specific configuration.
4707
+ *
4708
+ * @example
4709
+ * await client.serviceToggles.getServiceToggles()
4710
+ */
4711
+ getServiceToggles(requestOptions?: ServiceToggles.RequestOptions): Promise<ServiceTogglesConfig>;
4712
+ protected _getCustomAuthorizationHeaders(): Promise<{
4713
+ Authorization: string | undefined;
4714
+ }>;
4715
+ }
4716
+
4612
4717
  /**
4613
4718
  * This file was auto-generated by Fern from our API Definition.
4614
4719
  */
@@ -5266,8 +5371,10 @@ declare class OpikApiClient {
5266
5371
  protected _experiments: Experiments | undefined;
5267
5372
  protected _feedbackDefinitions: FeedbackDefinitions | undefined;
5268
5373
  protected _llmProviderKey: LlmProviderKey | undefined;
5374
+ protected _openTelemetryIngestion: OpenTelemetryIngestion | undefined;
5269
5375
  protected _projects: Projects | undefined;
5270
5376
  protected _prompts: Prompts | undefined;
5377
+ protected _serviceToggles: ServiceToggles | undefined;
5271
5378
  protected _spans: Spans | undefined;
5272
5379
  protected _traces: Traces | undefined;
5273
5380
  protected _redirect: Redirect | undefined;
@@ -5281,8 +5388,10 @@ declare class OpikApiClient {
5281
5388
  get experiments(): Experiments;
5282
5389
  get feedbackDefinitions(): FeedbackDefinitions;
5283
5390
  get llmProviderKey(): LlmProviderKey;
5391
+ get openTelemetryIngestion(): OpenTelemetryIngestion;
5284
5392
  get projects(): Projects;
5285
5393
  get prompts(): Prompts;
5394
+ get serviceToggles(): ServiceToggles;
5286
5395
  get spans(): Spans;
5287
5396
  get traces(): Traces;
5288
5397
  get redirect(): Redirect;
@@ -5441,4 +5550,4 @@ declare class OpikClient {
5441
5550
  flush: () => Promise<void>;
5442
5551
  }
5443
5552
 
5444
- export { type JsonNode as J, OpikClient as O, Span as S, Trace as T, SpanType as a, type OpikConfig as b };
5553
+ export { OpikClient as O, Span as S, Trace as T, SpanType as a, type OpikConfig as b };