opik 2.3.9 → 2.4.1
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/chunk-YLGPJ5MO.js +404 -0
- package/dist/cli.js +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.d.cts +194 -66
- package/dist/index.d.ts +194 -66
- package/dist/index.js +1 -1
- package/dist/{suite-NYOJPSTW.js → suite-7NX3ROE5.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-IP4PNM2L.js +0 -404
package/dist/index.d.cts
CHANGED
|
@@ -825,8 +825,15 @@ interface GetEvaluatorByIdRequest {
|
|
|
825
825
|
*/
|
|
826
826
|
interface GetEvaluatorLogsByIdRequest {
|
|
827
827
|
size?: number;
|
|
828
|
+
traceId?: string;
|
|
828
829
|
}
|
|
829
830
|
|
|
831
|
+
/**
|
|
832
|
+
* @example
|
|
833
|
+
* {}
|
|
834
|
+
*/
|
|
835
|
+
type GetOnlineScoringStatusesRequest = {};
|
|
836
|
+
|
|
830
837
|
/**
|
|
831
838
|
* @example
|
|
832
839
|
* {
|
|
@@ -4433,7 +4440,8 @@ interface AnnotationQueueAnnotatorViewWrite {
|
|
|
4433
4440
|
|
|
4434
4441
|
interface AnnotationQueueAutomation {
|
|
4435
4442
|
enabled?: boolean;
|
|
4436
|
-
|
|
4443
|
+
/** Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints */
|
|
4444
|
+
filterGroups?: AutomationFilter[][];
|
|
4437
4445
|
maxItemsInQueue?: number;
|
|
4438
4446
|
/** When true, removes the item ceiling so automation adds without bound */
|
|
4439
4447
|
clearMaxItemsInQueue?: boolean;
|
|
@@ -4441,13 +4449,15 @@ interface AnnotationQueueAutomation {
|
|
|
4441
4449
|
|
|
4442
4450
|
interface AnnotationQueueAutomationPublic {
|
|
4443
4451
|
enabled?: boolean;
|
|
4444
|
-
|
|
4452
|
+
/** Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints */
|
|
4453
|
+
filterGroups?: AutomationFilterPublic[][];
|
|
4445
4454
|
maxItemsInQueue?: number;
|
|
4446
4455
|
}
|
|
4447
4456
|
|
|
4448
4457
|
interface AnnotationQueueAutomationWrite {
|
|
4449
4458
|
enabled?: boolean;
|
|
4450
|
-
|
|
4459
|
+
/** Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints */
|
|
4460
|
+
filterGroups?: AutomationFilterWrite[][];
|
|
4451
4461
|
maxItemsInQueue?: number;
|
|
4452
4462
|
/** When true, removes the item ceiling so automation adds without bound */
|
|
4453
4463
|
clearMaxItemsInQueue?: boolean;
|
|
@@ -4684,6 +4694,93 @@ interface AuthorizeContext {
|
|
|
4684
4694
|
csrfToken?: string;
|
|
4685
4695
|
}
|
|
4686
4696
|
|
|
4697
|
+
/**
|
|
4698
|
+
* Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints
|
|
4699
|
+
*/
|
|
4700
|
+
interface AutomationFilter {
|
|
4701
|
+
/** A trace field for trace queues, a thread field for thread queues, as accepted by the traces and threads filters */
|
|
4702
|
+
field: string;
|
|
4703
|
+
operator: AutomationFilterOperator;
|
|
4704
|
+
key?: string;
|
|
4705
|
+
value?: string;
|
|
4706
|
+
}
|
|
4707
|
+
|
|
4708
|
+
declare const AutomationFilterOperator: {
|
|
4709
|
+
readonly Contains: "contains";
|
|
4710
|
+
readonly NotContains: "not_contains";
|
|
4711
|
+
readonly StartsWith: "starts_with";
|
|
4712
|
+
readonly EndsWith: "ends_with";
|
|
4713
|
+
readonly EqualTo: "=";
|
|
4714
|
+
readonly NotEquals: "!=";
|
|
4715
|
+
readonly GreaterThan: ">";
|
|
4716
|
+
readonly GreaterThanOrEqualTo: ">=";
|
|
4717
|
+
readonly LessThan: "<";
|
|
4718
|
+
readonly LessThanOrEqualTo: "<=";
|
|
4719
|
+
readonly IsEmpty: "is_empty";
|
|
4720
|
+
readonly IsNotEmpty: "is_not_empty";
|
|
4721
|
+
readonly In: "in";
|
|
4722
|
+
readonly NotIn: "not_in";
|
|
4723
|
+
};
|
|
4724
|
+
type AutomationFilterOperator = (typeof AutomationFilterOperator)[keyof typeof AutomationFilterOperator];
|
|
4725
|
+
|
|
4726
|
+
/**
|
|
4727
|
+
* Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints
|
|
4728
|
+
*/
|
|
4729
|
+
interface AutomationFilterPublic {
|
|
4730
|
+
/** A trace field for trace queues, a thread field for thread queues, as accepted by the traces and threads filters */
|
|
4731
|
+
field: string;
|
|
4732
|
+
operator: AutomationFilterPublicOperator;
|
|
4733
|
+
key?: string;
|
|
4734
|
+
value?: string;
|
|
4735
|
+
}
|
|
4736
|
+
|
|
4737
|
+
declare const AutomationFilterPublicOperator: {
|
|
4738
|
+
readonly Contains: "contains";
|
|
4739
|
+
readonly NotContains: "not_contains";
|
|
4740
|
+
readonly StartsWith: "starts_with";
|
|
4741
|
+
readonly EndsWith: "ends_with";
|
|
4742
|
+
readonly EqualTo: "=";
|
|
4743
|
+
readonly NotEquals: "!=";
|
|
4744
|
+
readonly GreaterThan: ">";
|
|
4745
|
+
readonly GreaterThanOrEqualTo: ">=";
|
|
4746
|
+
readonly LessThan: "<";
|
|
4747
|
+
readonly LessThanOrEqualTo: "<=";
|
|
4748
|
+
readonly IsEmpty: "is_empty";
|
|
4749
|
+
readonly IsNotEmpty: "is_not_empty";
|
|
4750
|
+
readonly In: "in";
|
|
4751
|
+
readonly NotIn: "not_in";
|
|
4752
|
+
};
|
|
4753
|
+
type AutomationFilterPublicOperator = (typeof AutomationFilterPublicOperator)[keyof typeof AutomationFilterPublicOperator];
|
|
4754
|
+
|
|
4755
|
+
/**
|
|
4756
|
+
* Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints
|
|
4757
|
+
*/
|
|
4758
|
+
interface AutomationFilterWrite {
|
|
4759
|
+
/** A trace field for trace queues, a thread field for thread queues, as accepted by the traces and threads filters */
|
|
4760
|
+
field: string;
|
|
4761
|
+
operator: AutomationFilterWriteOperator;
|
|
4762
|
+
key?: string;
|
|
4763
|
+
value?: string;
|
|
4764
|
+
}
|
|
4765
|
+
|
|
4766
|
+
declare const AutomationFilterWriteOperator: {
|
|
4767
|
+
readonly Contains: "contains";
|
|
4768
|
+
readonly NotContains: "not_contains";
|
|
4769
|
+
readonly StartsWith: "starts_with";
|
|
4770
|
+
readonly EndsWith: "ends_with";
|
|
4771
|
+
readonly EqualTo: "=";
|
|
4772
|
+
readonly NotEquals: "!=";
|
|
4773
|
+
readonly GreaterThan: ">";
|
|
4774
|
+
readonly GreaterThanOrEqualTo: ">=";
|
|
4775
|
+
readonly LessThan: "<";
|
|
4776
|
+
readonly LessThanOrEqualTo: "<=";
|
|
4777
|
+
readonly IsEmpty: "is_empty";
|
|
4778
|
+
readonly IsNotEmpty: "is_not_empty";
|
|
4779
|
+
readonly In: "in";
|
|
4780
|
+
readonly NotIn: "not_in";
|
|
4781
|
+
};
|
|
4782
|
+
type AutomationFilterWriteOperator = (typeof AutomationFilterWriteOperator)[keyof typeof AutomationFilterWriteOperator];
|
|
4783
|
+
|
|
4687
4784
|
interface AutomationRuleEvaluatorLlmAsJudgePublic {
|
|
4688
4785
|
filters?: TraceFilterPublic[];
|
|
4689
4786
|
code?: LlmAsJudgeCodePublic;
|
|
@@ -5363,30 +5460,6 @@ interface CompletionTokensDetails {
|
|
|
5363
5460
|
reasoningTokens?: number;
|
|
5364
5461
|
}
|
|
5365
5462
|
|
|
5366
|
-
interface ConditionGroup {
|
|
5367
|
-
conditions: ScoreCondition[];
|
|
5368
|
-
}
|
|
5369
|
-
|
|
5370
|
-
interface ConditionGroupPublic {
|
|
5371
|
-
conditions: ScoreConditionPublic[];
|
|
5372
|
-
}
|
|
5373
|
-
|
|
5374
|
-
interface ConditionGroupWrite {
|
|
5375
|
-
conditions: ScoreConditionWrite[];
|
|
5376
|
-
}
|
|
5377
|
-
|
|
5378
|
-
interface Conditions {
|
|
5379
|
-
groups: ConditionGroup[];
|
|
5380
|
-
}
|
|
5381
|
-
|
|
5382
|
-
interface ConditionsPublic {
|
|
5383
|
-
groups: ConditionGroupPublic[];
|
|
5384
|
-
}
|
|
5385
|
-
|
|
5386
|
-
interface ConditionsWrite {
|
|
5387
|
-
groups: ConditionGroupWrite[];
|
|
5388
|
-
}
|
|
5389
|
-
|
|
5390
5463
|
interface ConsentResponse {
|
|
5391
5464
|
redirectTo?: string;
|
|
5392
5465
|
}
|
|
@@ -7366,6 +7439,62 @@ declare const OllieReportStatus: {
|
|
|
7366
7439
|
};
|
|
7367
7440
|
type OllieReportStatus = (typeof OllieReportStatus)[keyof typeof OllieReportStatus];
|
|
7368
7441
|
|
|
7442
|
+
interface OnlineScoringStatus {
|
|
7443
|
+
ruleId?: string;
|
|
7444
|
+
/** Set for a test suite's assertion judge, whose rule id is not stable */
|
|
7445
|
+
suiteAssertion?: boolean;
|
|
7446
|
+
state?: OnlineScoringStatusState;
|
|
7447
|
+
reason?: OnlineScoringStatusReason;
|
|
7448
|
+
/** The failed delivery while retrying; 0 otherwise */
|
|
7449
|
+
attempt?: number;
|
|
7450
|
+
/** Deliveries before giving up while retrying; 0 otherwise */
|
|
7451
|
+
maxAttempts?: number;
|
|
7452
|
+
updatedAt?: Date;
|
|
7453
|
+
}
|
|
7454
|
+
|
|
7455
|
+
interface OnlineScoringStatusList {
|
|
7456
|
+
content?: OnlineScoringStatus[];
|
|
7457
|
+
}
|
|
7458
|
+
|
|
7459
|
+
declare const OnlineScoringStatusReason: {
|
|
7460
|
+
readonly NotConfigured: "not_configured";
|
|
7461
|
+
readonly Authentication: "authentication";
|
|
7462
|
+
readonly NotFound: "not_found";
|
|
7463
|
+
readonly Rejected: "rejected";
|
|
7464
|
+
readonly Refused: "refused";
|
|
7465
|
+
readonly RateLimited: "rate_limited";
|
|
7466
|
+
readonly Timeout: "timeout";
|
|
7467
|
+
readonly Unreachable: "unreachable";
|
|
7468
|
+
readonly ServerError: "server_error";
|
|
7469
|
+
readonly NoScore: "no_score";
|
|
7470
|
+
readonly UnresolvedArguments: "unresolved_arguments";
|
|
7471
|
+
readonly Other: "other";
|
|
7472
|
+
};
|
|
7473
|
+
type OnlineScoringStatusReason = (typeof OnlineScoringStatusReason)[keyof typeof OnlineScoringStatusReason];
|
|
7474
|
+
|
|
7475
|
+
declare const OnlineScoringStatusState: {
|
|
7476
|
+
readonly Retrying: "retrying";
|
|
7477
|
+
readonly Failed: "failed";
|
|
7478
|
+
readonly Skipped: "skipped";
|
|
7479
|
+
};
|
|
7480
|
+
type OnlineScoringStatusState = (typeof OnlineScoringStatusState)[keyof typeof OnlineScoringStatusState];
|
|
7481
|
+
|
|
7482
|
+
interface OpenRouterRegionResponse {
|
|
7483
|
+
/** Where the workspace's OpenRouter requests go: the host of its OpenRouter provider's base_url, or of the server's default OpenRouter URL when it has none. unknown for a host other than openrouter.ai, eu.openrouter.ai or us.openrouter.ai */
|
|
7484
|
+
region?: OpenRouterRegionResponseRegion;
|
|
7485
|
+
/** Decision models the server refuses for this workspace, each with the region that doesn't serve it: the server's decisions URL region or the workspace's region */
|
|
7486
|
+
unavailableDecisionModels?: UnavailableDecisionModel[];
|
|
7487
|
+
}
|
|
7488
|
+
|
|
7489
|
+
/** Where the workspace's OpenRouter requests go: the host of its OpenRouter provider's base_url, or of the server's default OpenRouter URL when it has none. unknown for a host other than openrouter.ai, eu.openrouter.ai or us.openrouter.ai */
|
|
7490
|
+
declare const OpenRouterRegionResponseRegion: {
|
|
7491
|
+
readonly Global: "global";
|
|
7492
|
+
readonly Eu: "eu";
|
|
7493
|
+
readonly Us: "us";
|
|
7494
|
+
readonly Unknown: "unknown";
|
|
7495
|
+
};
|
|
7496
|
+
type OpenRouterRegionResponseRegion = (typeof OpenRouterRegionResponseRegion)[keyof typeof OpenRouterRegionResponseRegion];
|
|
7497
|
+
|
|
7369
7498
|
interface OptimizationPagePublic {
|
|
7370
7499
|
page?: number;
|
|
7371
7500
|
size?: number;
|
|
@@ -8169,45 +8298,6 @@ interface ScopedAnalyticsQueryRequest {
|
|
|
8169
8298
|
projectId?: string;
|
|
8170
8299
|
}
|
|
8171
8300
|
|
|
8172
|
-
interface ScoreCondition {
|
|
8173
|
-
scoreName: string;
|
|
8174
|
-
operator: ScoreConditionOperator;
|
|
8175
|
-
value: number;
|
|
8176
|
-
}
|
|
8177
|
-
|
|
8178
|
-
declare const ScoreConditionOperator: {
|
|
8179
|
-
readonly GreaterThan: ">";
|
|
8180
|
-
readonly LessThan: "<";
|
|
8181
|
-
readonly EqualTo: "=";
|
|
8182
|
-
};
|
|
8183
|
-
type ScoreConditionOperator = (typeof ScoreConditionOperator)[keyof typeof ScoreConditionOperator];
|
|
8184
|
-
|
|
8185
|
-
interface ScoreConditionPublic {
|
|
8186
|
-
scoreName: string;
|
|
8187
|
-
operator: ScoreConditionPublicOperator;
|
|
8188
|
-
value: number;
|
|
8189
|
-
}
|
|
8190
|
-
|
|
8191
|
-
declare const ScoreConditionPublicOperator: {
|
|
8192
|
-
readonly GreaterThan: ">";
|
|
8193
|
-
readonly LessThan: "<";
|
|
8194
|
-
readonly EqualTo: "=";
|
|
8195
|
-
};
|
|
8196
|
-
type ScoreConditionPublicOperator = (typeof ScoreConditionPublicOperator)[keyof typeof ScoreConditionPublicOperator];
|
|
8197
|
-
|
|
8198
|
-
interface ScoreConditionWrite {
|
|
8199
|
-
scoreName: string;
|
|
8200
|
-
operator: ScoreConditionWriteOperator;
|
|
8201
|
-
value: number;
|
|
8202
|
-
}
|
|
8203
|
-
|
|
8204
|
-
declare const ScoreConditionWriteOperator: {
|
|
8205
|
-
readonly GreaterThan: ">";
|
|
8206
|
-
readonly LessThan: "<";
|
|
8207
|
-
readonly EqualTo: "=";
|
|
8208
|
-
};
|
|
8209
|
-
type ScoreConditionWriteOperator = (typeof ScoreConditionWriteOperator)[keyof typeof ScoreConditionWriteOperator];
|
|
8210
|
-
|
|
8211
8301
|
interface ScoreName {
|
|
8212
8302
|
name?: string;
|
|
8213
8303
|
type?: string;
|
|
@@ -9222,6 +9312,22 @@ declare const TraceWriteSource: {
|
|
|
9222
9312
|
};
|
|
9223
9313
|
type TraceWriteSource = (typeof TraceWriteSource)[keyof typeof TraceWriteSource];
|
|
9224
9314
|
|
|
9315
|
+
/**
|
|
9316
|
+
* Decision models the server refuses for this workspace, each with the region that doesn't serve it: the server's decisions URL region or the workspace's region
|
|
9317
|
+
*/
|
|
9318
|
+
interface UnavailableDecisionModel {
|
|
9319
|
+
model?: string;
|
|
9320
|
+
region?: UnavailableDecisionModelRegion;
|
|
9321
|
+
}
|
|
9322
|
+
|
|
9323
|
+
declare const UnavailableDecisionModelRegion: {
|
|
9324
|
+
readonly Global: "global";
|
|
9325
|
+
readonly Eu: "eu";
|
|
9326
|
+
readonly Us: "us";
|
|
9327
|
+
readonly Unknown: "unknown";
|
|
9328
|
+
};
|
|
9329
|
+
type UnavailableDecisionModelRegion = (typeof UnavailableDecisionModelRegion)[keyof typeof UnavailableDecisionModelRegion];
|
|
9330
|
+
|
|
9225
9331
|
interface Usage {
|
|
9226
9332
|
totalTokens?: number;
|
|
9227
9333
|
promptTokens?: number;
|
|
@@ -10671,6 +10777,18 @@ declare class AutomationRuleEvaluatorsClient {
|
|
|
10671
10777
|
*/
|
|
10672
10778
|
getEvaluatorLogsById(id: string, request?: GetEvaluatorLogsByIdRequest, requestOptions?: AutomationRuleEvaluatorsClient.RequestOptions): HttpResponsePromise<LogPage>;
|
|
10673
10779
|
private __getEvaluatorLogsById;
|
|
10780
|
+
/**
|
|
10781
|
+
* Get, per rule, why an experiment trace has no score from it yet: retrying, failed or skipped. A rule with no entry has scored the trace or not reported on it
|
|
10782
|
+
*
|
|
10783
|
+
* @param {string} trace_id
|
|
10784
|
+
* @param {OpikApi.GetOnlineScoringStatusesRequest} request
|
|
10785
|
+
* @param {AutomationRuleEvaluatorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
10786
|
+
*
|
|
10787
|
+
* @example
|
|
10788
|
+
* await client.automationRuleEvaluators.getOnlineScoringStatuses("trace_id")
|
|
10789
|
+
*/
|
|
10790
|
+
getOnlineScoringStatuses(trace_id: string, request?: GetOnlineScoringStatusesRequest, requestOptions?: AutomationRuleEvaluatorsClient.RequestOptions): HttpResponsePromise<OnlineScoringStatusList>;
|
|
10791
|
+
private __getOnlineScoringStatuses;
|
|
10674
10792
|
}
|
|
10675
10793
|
|
|
10676
10794
|
declare namespace ChatCompletionsClient {
|
|
@@ -12502,6 +12620,16 @@ declare class LlmProviderKeyClient {
|
|
|
12502
12620
|
*/
|
|
12503
12621
|
updateLlmProviderApiKey(id: string, request?: ProviderApiKeyUpdate, requestOptions?: LlmProviderKeyClient.RequestOptions): HttpResponsePromise<void>;
|
|
12504
12622
|
private __updateLlmProviderApiKey;
|
|
12623
|
+
/**
|
|
12624
|
+
* Get the OpenRouter region the workspace's OpenRouter requests go to, from its OpenRouter provider's base_url or the server's default OpenRouter URL
|
|
12625
|
+
*
|
|
12626
|
+
* @param {LlmProviderKeyClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
12627
|
+
*
|
|
12628
|
+
* @example
|
|
12629
|
+
* await client.llmProviderKey.getOpenRouterRegion()
|
|
12630
|
+
*/
|
|
12631
|
+
getOpenRouterRegion(requestOptions?: LlmProviderKeyClient.RequestOptions): HttpResponsePromise<OpenRouterRegionResponse>;
|
|
12632
|
+
private __getOpenRouterRegion;
|
|
12505
12633
|
/**
|
|
12506
12634
|
* Runs the token fetch once, backend-side, and reports the token lifetime. The token itself is never returned. Send provider_id to test the stored config, auth_config to test submitted values, or both to resolve secret sentinels against the stored config.
|
|
12507
12635
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -825,8 +825,15 @@ interface GetEvaluatorByIdRequest {
|
|
|
825
825
|
*/
|
|
826
826
|
interface GetEvaluatorLogsByIdRequest {
|
|
827
827
|
size?: number;
|
|
828
|
+
traceId?: string;
|
|
828
829
|
}
|
|
829
830
|
|
|
831
|
+
/**
|
|
832
|
+
* @example
|
|
833
|
+
* {}
|
|
834
|
+
*/
|
|
835
|
+
type GetOnlineScoringStatusesRequest = {};
|
|
836
|
+
|
|
830
837
|
/**
|
|
831
838
|
* @example
|
|
832
839
|
* {
|
|
@@ -4433,7 +4440,8 @@ interface AnnotationQueueAnnotatorViewWrite {
|
|
|
4433
4440
|
|
|
4434
4441
|
interface AnnotationQueueAutomation {
|
|
4435
4442
|
enabled?: boolean;
|
|
4436
|
-
|
|
4443
|
+
/** Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints */
|
|
4444
|
+
filterGroups?: AutomationFilter[][];
|
|
4437
4445
|
maxItemsInQueue?: number;
|
|
4438
4446
|
/** When true, removes the item ceiling so automation adds without bound */
|
|
4439
4447
|
clearMaxItemsInQueue?: boolean;
|
|
@@ -4441,13 +4449,15 @@ interface AnnotationQueueAutomation {
|
|
|
4441
4449
|
|
|
4442
4450
|
interface AnnotationQueueAutomationPublic {
|
|
4443
4451
|
enabled?: boolean;
|
|
4444
|
-
|
|
4452
|
+
/** Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints */
|
|
4453
|
+
filterGroups?: AutomationFilterPublic[][];
|
|
4445
4454
|
maxItemsInQueue?: number;
|
|
4446
4455
|
}
|
|
4447
4456
|
|
|
4448
4457
|
interface AnnotationQueueAutomationWrite {
|
|
4449
4458
|
enabled?: boolean;
|
|
4450
|
-
|
|
4459
|
+
/** Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints */
|
|
4460
|
+
filterGroups?: AutomationFilterWrite[][];
|
|
4451
4461
|
maxItemsInQueue?: number;
|
|
4452
4462
|
/** When true, removes the item ceiling so automation adds without bound */
|
|
4453
4463
|
clearMaxItemsInQueue?: boolean;
|
|
@@ -4684,6 +4694,93 @@ interface AuthorizeContext {
|
|
|
4684
4694
|
csrfToken?: string;
|
|
4685
4695
|
}
|
|
4686
4696
|
|
|
4697
|
+
/**
|
|
4698
|
+
* Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints
|
|
4699
|
+
*/
|
|
4700
|
+
interface AutomationFilter {
|
|
4701
|
+
/** A trace field for trace queues, a thread field for thread queues, as accepted by the traces and threads filters */
|
|
4702
|
+
field: string;
|
|
4703
|
+
operator: AutomationFilterOperator;
|
|
4704
|
+
key?: string;
|
|
4705
|
+
value?: string;
|
|
4706
|
+
}
|
|
4707
|
+
|
|
4708
|
+
declare const AutomationFilterOperator: {
|
|
4709
|
+
readonly Contains: "contains";
|
|
4710
|
+
readonly NotContains: "not_contains";
|
|
4711
|
+
readonly StartsWith: "starts_with";
|
|
4712
|
+
readonly EndsWith: "ends_with";
|
|
4713
|
+
readonly EqualTo: "=";
|
|
4714
|
+
readonly NotEquals: "!=";
|
|
4715
|
+
readonly GreaterThan: ">";
|
|
4716
|
+
readonly GreaterThanOrEqualTo: ">=";
|
|
4717
|
+
readonly LessThan: "<";
|
|
4718
|
+
readonly LessThanOrEqualTo: "<=";
|
|
4719
|
+
readonly IsEmpty: "is_empty";
|
|
4720
|
+
readonly IsNotEmpty: "is_not_empty";
|
|
4721
|
+
readonly In: "in";
|
|
4722
|
+
readonly NotIn: "not_in";
|
|
4723
|
+
};
|
|
4724
|
+
type AutomationFilterOperator = (typeof AutomationFilterOperator)[keyof typeof AutomationFilterOperator];
|
|
4725
|
+
|
|
4726
|
+
/**
|
|
4727
|
+
* Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints
|
|
4728
|
+
*/
|
|
4729
|
+
interface AutomationFilterPublic {
|
|
4730
|
+
/** A trace field for trace queues, a thread field for thread queues, as accepted by the traces and threads filters */
|
|
4731
|
+
field: string;
|
|
4732
|
+
operator: AutomationFilterPublicOperator;
|
|
4733
|
+
key?: string;
|
|
4734
|
+
value?: string;
|
|
4735
|
+
}
|
|
4736
|
+
|
|
4737
|
+
declare const AutomationFilterPublicOperator: {
|
|
4738
|
+
readonly Contains: "contains";
|
|
4739
|
+
readonly NotContains: "not_contains";
|
|
4740
|
+
readonly StartsWith: "starts_with";
|
|
4741
|
+
readonly EndsWith: "ends_with";
|
|
4742
|
+
readonly EqualTo: "=";
|
|
4743
|
+
readonly NotEquals: "!=";
|
|
4744
|
+
readonly GreaterThan: ">";
|
|
4745
|
+
readonly GreaterThanOrEqualTo: ">=";
|
|
4746
|
+
readonly LessThan: "<";
|
|
4747
|
+
readonly LessThanOrEqualTo: "<=";
|
|
4748
|
+
readonly IsEmpty: "is_empty";
|
|
4749
|
+
readonly IsNotEmpty: "is_not_empty";
|
|
4750
|
+
readonly In: "in";
|
|
4751
|
+
readonly NotIn: "not_in";
|
|
4752
|
+
};
|
|
4753
|
+
type AutomationFilterPublicOperator = (typeof AutomationFilterPublicOperator)[keyof typeof AutomationFilterPublicOperator];
|
|
4754
|
+
|
|
4755
|
+
/**
|
|
4756
|
+
* Items matching every filter of any one group are added. Filters are those of the traces and threads endpoints
|
|
4757
|
+
*/
|
|
4758
|
+
interface AutomationFilterWrite {
|
|
4759
|
+
/** A trace field for trace queues, a thread field for thread queues, as accepted by the traces and threads filters */
|
|
4760
|
+
field: string;
|
|
4761
|
+
operator: AutomationFilterWriteOperator;
|
|
4762
|
+
key?: string;
|
|
4763
|
+
value?: string;
|
|
4764
|
+
}
|
|
4765
|
+
|
|
4766
|
+
declare const AutomationFilterWriteOperator: {
|
|
4767
|
+
readonly Contains: "contains";
|
|
4768
|
+
readonly NotContains: "not_contains";
|
|
4769
|
+
readonly StartsWith: "starts_with";
|
|
4770
|
+
readonly EndsWith: "ends_with";
|
|
4771
|
+
readonly EqualTo: "=";
|
|
4772
|
+
readonly NotEquals: "!=";
|
|
4773
|
+
readonly GreaterThan: ">";
|
|
4774
|
+
readonly GreaterThanOrEqualTo: ">=";
|
|
4775
|
+
readonly LessThan: "<";
|
|
4776
|
+
readonly LessThanOrEqualTo: "<=";
|
|
4777
|
+
readonly IsEmpty: "is_empty";
|
|
4778
|
+
readonly IsNotEmpty: "is_not_empty";
|
|
4779
|
+
readonly In: "in";
|
|
4780
|
+
readonly NotIn: "not_in";
|
|
4781
|
+
};
|
|
4782
|
+
type AutomationFilterWriteOperator = (typeof AutomationFilterWriteOperator)[keyof typeof AutomationFilterWriteOperator];
|
|
4783
|
+
|
|
4687
4784
|
interface AutomationRuleEvaluatorLlmAsJudgePublic {
|
|
4688
4785
|
filters?: TraceFilterPublic[];
|
|
4689
4786
|
code?: LlmAsJudgeCodePublic;
|
|
@@ -5363,30 +5460,6 @@ interface CompletionTokensDetails {
|
|
|
5363
5460
|
reasoningTokens?: number;
|
|
5364
5461
|
}
|
|
5365
5462
|
|
|
5366
|
-
interface ConditionGroup {
|
|
5367
|
-
conditions: ScoreCondition[];
|
|
5368
|
-
}
|
|
5369
|
-
|
|
5370
|
-
interface ConditionGroupPublic {
|
|
5371
|
-
conditions: ScoreConditionPublic[];
|
|
5372
|
-
}
|
|
5373
|
-
|
|
5374
|
-
interface ConditionGroupWrite {
|
|
5375
|
-
conditions: ScoreConditionWrite[];
|
|
5376
|
-
}
|
|
5377
|
-
|
|
5378
|
-
interface Conditions {
|
|
5379
|
-
groups: ConditionGroup[];
|
|
5380
|
-
}
|
|
5381
|
-
|
|
5382
|
-
interface ConditionsPublic {
|
|
5383
|
-
groups: ConditionGroupPublic[];
|
|
5384
|
-
}
|
|
5385
|
-
|
|
5386
|
-
interface ConditionsWrite {
|
|
5387
|
-
groups: ConditionGroupWrite[];
|
|
5388
|
-
}
|
|
5389
|
-
|
|
5390
5463
|
interface ConsentResponse {
|
|
5391
5464
|
redirectTo?: string;
|
|
5392
5465
|
}
|
|
@@ -7366,6 +7439,62 @@ declare const OllieReportStatus: {
|
|
|
7366
7439
|
};
|
|
7367
7440
|
type OllieReportStatus = (typeof OllieReportStatus)[keyof typeof OllieReportStatus];
|
|
7368
7441
|
|
|
7442
|
+
interface OnlineScoringStatus {
|
|
7443
|
+
ruleId?: string;
|
|
7444
|
+
/** Set for a test suite's assertion judge, whose rule id is not stable */
|
|
7445
|
+
suiteAssertion?: boolean;
|
|
7446
|
+
state?: OnlineScoringStatusState;
|
|
7447
|
+
reason?: OnlineScoringStatusReason;
|
|
7448
|
+
/** The failed delivery while retrying; 0 otherwise */
|
|
7449
|
+
attempt?: number;
|
|
7450
|
+
/** Deliveries before giving up while retrying; 0 otherwise */
|
|
7451
|
+
maxAttempts?: number;
|
|
7452
|
+
updatedAt?: Date;
|
|
7453
|
+
}
|
|
7454
|
+
|
|
7455
|
+
interface OnlineScoringStatusList {
|
|
7456
|
+
content?: OnlineScoringStatus[];
|
|
7457
|
+
}
|
|
7458
|
+
|
|
7459
|
+
declare const OnlineScoringStatusReason: {
|
|
7460
|
+
readonly NotConfigured: "not_configured";
|
|
7461
|
+
readonly Authentication: "authentication";
|
|
7462
|
+
readonly NotFound: "not_found";
|
|
7463
|
+
readonly Rejected: "rejected";
|
|
7464
|
+
readonly Refused: "refused";
|
|
7465
|
+
readonly RateLimited: "rate_limited";
|
|
7466
|
+
readonly Timeout: "timeout";
|
|
7467
|
+
readonly Unreachable: "unreachable";
|
|
7468
|
+
readonly ServerError: "server_error";
|
|
7469
|
+
readonly NoScore: "no_score";
|
|
7470
|
+
readonly UnresolvedArguments: "unresolved_arguments";
|
|
7471
|
+
readonly Other: "other";
|
|
7472
|
+
};
|
|
7473
|
+
type OnlineScoringStatusReason = (typeof OnlineScoringStatusReason)[keyof typeof OnlineScoringStatusReason];
|
|
7474
|
+
|
|
7475
|
+
declare const OnlineScoringStatusState: {
|
|
7476
|
+
readonly Retrying: "retrying";
|
|
7477
|
+
readonly Failed: "failed";
|
|
7478
|
+
readonly Skipped: "skipped";
|
|
7479
|
+
};
|
|
7480
|
+
type OnlineScoringStatusState = (typeof OnlineScoringStatusState)[keyof typeof OnlineScoringStatusState];
|
|
7481
|
+
|
|
7482
|
+
interface OpenRouterRegionResponse {
|
|
7483
|
+
/** Where the workspace's OpenRouter requests go: the host of its OpenRouter provider's base_url, or of the server's default OpenRouter URL when it has none. unknown for a host other than openrouter.ai, eu.openrouter.ai or us.openrouter.ai */
|
|
7484
|
+
region?: OpenRouterRegionResponseRegion;
|
|
7485
|
+
/** Decision models the server refuses for this workspace, each with the region that doesn't serve it: the server's decisions URL region or the workspace's region */
|
|
7486
|
+
unavailableDecisionModels?: UnavailableDecisionModel[];
|
|
7487
|
+
}
|
|
7488
|
+
|
|
7489
|
+
/** Where the workspace's OpenRouter requests go: the host of its OpenRouter provider's base_url, or of the server's default OpenRouter URL when it has none. unknown for a host other than openrouter.ai, eu.openrouter.ai or us.openrouter.ai */
|
|
7490
|
+
declare const OpenRouterRegionResponseRegion: {
|
|
7491
|
+
readonly Global: "global";
|
|
7492
|
+
readonly Eu: "eu";
|
|
7493
|
+
readonly Us: "us";
|
|
7494
|
+
readonly Unknown: "unknown";
|
|
7495
|
+
};
|
|
7496
|
+
type OpenRouterRegionResponseRegion = (typeof OpenRouterRegionResponseRegion)[keyof typeof OpenRouterRegionResponseRegion];
|
|
7497
|
+
|
|
7369
7498
|
interface OptimizationPagePublic {
|
|
7370
7499
|
page?: number;
|
|
7371
7500
|
size?: number;
|
|
@@ -8169,45 +8298,6 @@ interface ScopedAnalyticsQueryRequest {
|
|
|
8169
8298
|
projectId?: string;
|
|
8170
8299
|
}
|
|
8171
8300
|
|
|
8172
|
-
interface ScoreCondition {
|
|
8173
|
-
scoreName: string;
|
|
8174
|
-
operator: ScoreConditionOperator;
|
|
8175
|
-
value: number;
|
|
8176
|
-
}
|
|
8177
|
-
|
|
8178
|
-
declare const ScoreConditionOperator: {
|
|
8179
|
-
readonly GreaterThan: ">";
|
|
8180
|
-
readonly LessThan: "<";
|
|
8181
|
-
readonly EqualTo: "=";
|
|
8182
|
-
};
|
|
8183
|
-
type ScoreConditionOperator = (typeof ScoreConditionOperator)[keyof typeof ScoreConditionOperator];
|
|
8184
|
-
|
|
8185
|
-
interface ScoreConditionPublic {
|
|
8186
|
-
scoreName: string;
|
|
8187
|
-
operator: ScoreConditionPublicOperator;
|
|
8188
|
-
value: number;
|
|
8189
|
-
}
|
|
8190
|
-
|
|
8191
|
-
declare const ScoreConditionPublicOperator: {
|
|
8192
|
-
readonly GreaterThan: ">";
|
|
8193
|
-
readonly LessThan: "<";
|
|
8194
|
-
readonly EqualTo: "=";
|
|
8195
|
-
};
|
|
8196
|
-
type ScoreConditionPublicOperator = (typeof ScoreConditionPublicOperator)[keyof typeof ScoreConditionPublicOperator];
|
|
8197
|
-
|
|
8198
|
-
interface ScoreConditionWrite {
|
|
8199
|
-
scoreName: string;
|
|
8200
|
-
operator: ScoreConditionWriteOperator;
|
|
8201
|
-
value: number;
|
|
8202
|
-
}
|
|
8203
|
-
|
|
8204
|
-
declare const ScoreConditionWriteOperator: {
|
|
8205
|
-
readonly GreaterThan: ">";
|
|
8206
|
-
readonly LessThan: "<";
|
|
8207
|
-
readonly EqualTo: "=";
|
|
8208
|
-
};
|
|
8209
|
-
type ScoreConditionWriteOperator = (typeof ScoreConditionWriteOperator)[keyof typeof ScoreConditionWriteOperator];
|
|
8210
|
-
|
|
8211
8301
|
interface ScoreName {
|
|
8212
8302
|
name?: string;
|
|
8213
8303
|
type?: string;
|
|
@@ -9222,6 +9312,22 @@ declare const TraceWriteSource: {
|
|
|
9222
9312
|
};
|
|
9223
9313
|
type TraceWriteSource = (typeof TraceWriteSource)[keyof typeof TraceWriteSource];
|
|
9224
9314
|
|
|
9315
|
+
/**
|
|
9316
|
+
* Decision models the server refuses for this workspace, each with the region that doesn't serve it: the server's decisions URL region or the workspace's region
|
|
9317
|
+
*/
|
|
9318
|
+
interface UnavailableDecisionModel {
|
|
9319
|
+
model?: string;
|
|
9320
|
+
region?: UnavailableDecisionModelRegion;
|
|
9321
|
+
}
|
|
9322
|
+
|
|
9323
|
+
declare const UnavailableDecisionModelRegion: {
|
|
9324
|
+
readonly Global: "global";
|
|
9325
|
+
readonly Eu: "eu";
|
|
9326
|
+
readonly Us: "us";
|
|
9327
|
+
readonly Unknown: "unknown";
|
|
9328
|
+
};
|
|
9329
|
+
type UnavailableDecisionModelRegion = (typeof UnavailableDecisionModelRegion)[keyof typeof UnavailableDecisionModelRegion];
|
|
9330
|
+
|
|
9225
9331
|
interface Usage {
|
|
9226
9332
|
totalTokens?: number;
|
|
9227
9333
|
promptTokens?: number;
|
|
@@ -10671,6 +10777,18 @@ declare class AutomationRuleEvaluatorsClient {
|
|
|
10671
10777
|
*/
|
|
10672
10778
|
getEvaluatorLogsById(id: string, request?: GetEvaluatorLogsByIdRequest, requestOptions?: AutomationRuleEvaluatorsClient.RequestOptions): HttpResponsePromise<LogPage>;
|
|
10673
10779
|
private __getEvaluatorLogsById;
|
|
10780
|
+
/**
|
|
10781
|
+
* Get, per rule, why an experiment trace has no score from it yet: retrying, failed or skipped. A rule with no entry has scored the trace or not reported on it
|
|
10782
|
+
*
|
|
10783
|
+
* @param {string} trace_id
|
|
10784
|
+
* @param {OpikApi.GetOnlineScoringStatusesRequest} request
|
|
10785
|
+
* @param {AutomationRuleEvaluatorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
10786
|
+
*
|
|
10787
|
+
* @example
|
|
10788
|
+
* await client.automationRuleEvaluators.getOnlineScoringStatuses("trace_id")
|
|
10789
|
+
*/
|
|
10790
|
+
getOnlineScoringStatuses(trace_id: string, request?: GetOnlineScoringStatusesRequest, requestOptions?: AutomationRuleEvaluatorsClient.RequestOptions): HttpResponsePromise<OnlineScoringStatusList>;
|
|
10791
|
+
private __getOnlineScoringStatuses;
|
|
10674
10792
|
}
|
|
10675
10793
|
|
|
10676
10794
|
declare namespace ChatCompletionsClient {
|
|
@@ -12502,6 +12620,16 @@ declare class LlmProviderKeyClient {
|
|
|
12502
12620
|
*/
|
|
12503
12621
|
updateLlmProviderApiKey(id: string, request?: ProviderApiKeyUpdate, requestOptions?: LlmProviderKeyClient.RequestOptions): HttpResponsePromise<void>;
|
|
12504
12622
|
private __updateLlmProviderApiKey;
|
|
12623
|
+
/**
|
|
12624
|
+
* Get the OpenRouter region the workspace's OpenRouter requests go to, from its OpenRouter provider's base_url or the server's default OpenRouter URL
|
|
12625
|
+
*
|
|
12626
|
+
* @param {LlmProviderKeyClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
12627
|
+
*
|
|
12628
|
+
* @example
|
|
12629
|
+
* await client.llmProviderKey.getOpenRouterRegion()
|
|
12630
|
+
*/
|
|
12631
|
+
getOpenRouterRegion(requestOptions?: LlmProviderKeyClient.RequestOptions): HttpResponsePromise<OpenRouterRegionResponse>;
|
|
12632
|
+
private __getOpenRouterRegion;
|
|
12505
12633
|
/**
|
|
12506
12634
|
* Runs the token fetch once, backend-side, and reports the token lifetime. The token itself is never returned. Send provider_id to test the stored config, auth_config to test submitted values, or both to resolve secret sentinels against the stored config.
|
|
12507
12635
|
*
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Ia}from'./chunk-
|
|
1
|
+
import {Ia}from'./chunk-YLGPJ5MO.js';export{va as AgentTaskCompletionJudge,ua as AgentToolCorrectnessJudge,ia as AnswerRelevance,ea as BaseLLMJudgeMetric,F as BaseMetric,G as BaseSuiteEvaluator,s as ChatPrompt,xa as ComplianceRiskJudge,l as ConfigMismatchError,k as ConfigNotFoundError,ba as Contains,B as DEFAULT_EXECUTION_POLICY,m as Dataset,i as DatasetVersion,j as DatasetVersionNotFoundError,pa as DemographicBiasJudge,na as DialogueHelpfulnessJudge,aa as ExactMatch,ja as GEval,ka as GEvalPreset,ra as GenderBiasJudge,ha as Hallucination,da as IsJson,T as LLMJudge,K as ModelConfigurationError,I as ModelError,J as ModelGenerationError,fa as Moderation,Fa as OPIK_PARENT_SPAN_ID_HEADER,Ea as OPIK_TRACE_ID_HEADER,Da as Opik,H as OpikBaseModel,t as OpikQueryLanguage,g as OpikSpanType,qa as PoliticalBiasJudge,r as Prompt,n as PromptType,wa as PromptUncertaintyJudge,oa as QARelevanceJudge,ca as RegexMatch,ta as RegionalBiasJudge,sa as ReligiousBiasJudge,S as ResponseSchema,Q as SYSTEM_PROMPT,ma as SummarizationCoherenceJudge,la as SummarizationConsistencyJudge,E as TASK_ERROR_SCORE_NAME,Ba as TestSuite,C as TestSuiteResult,v as ThreadsAnnotationQueue,u as TracesAnnotationQueue,R as USER_PROMPT_TEMPLATE,ga as Usefulness,M as VercelAIChatModel,y as activateRunner,w as agentConfigContext,D as buildSuiteResult,N as createModel,O as createModelFromInstance,V as deserializeEvaluators,L as detectProvider,c as disableLogger,_ as evaluate,$ as evaluatePrompt,Y as evaluateTestSuite,x as flushAll,h as generateId,Ga as getDistributedTraceHeaders,o as getGlobalClient,z as getTrackContext,e as isTracingActive,a as logger,q as resetGlobalClient,f as resetTracingToConfigDefault,ya as resolveEvaluators,W as resolveExecutionPolicy,X as resolveItemExecutionPolicy,P as resolveModel,Z as runTests,U as serializeEvaluators,p as setGlobalClient,b as setLoggerLevel,d as setTracingActive,A as track,za as validateEvaluators,Aa as validateExecutionPolicy,Ha as z}from'./chunk-YLGPJ5MO.js';Ia();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Ca}from'./chunk-
|
|
1
|
+
import {Ca}from'./chunk-YLGPJ5MO.js';export{B as DEFAULT_EXECUTION_POLICY,Ba as TestSuite,C as TestSuiteResult,D as buildSuiteResult,V as deserializeEvaluators,Y as evaluateTestSuite,W as resolveExecutionPolicy,X as resolveItemExecutionPolicy,Z as runTests,U as serializeEvaluators}from'./chunk-YLGPJ5MO.js';Ca();
|