opik 2.2.121 → 2.2.122
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-YQXWKD5B.js +404 -0
- package/dist/cli.js +1 -1
- package/dist/index.cjs +36 -36
- package/dist/index.d.cts +67 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +1 -1
- package/dist/{suite-TFWMALYP.js → suite-A47OOMVJ.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-UYO4ICKF.js +0 -404
package/dist/index.d.cts
CHANGED
|
@@ -613,6 +613,7 @@ interface AnnotationQueueUpdate {
|
|
|
613
613
|
annotatorsPerItem?: number;
|
|
614
614
|
lockTimeoutSeconds?: number;
|
|
615
615
|
automation?: AnnotationQueueAutomation;
|
|
616
|
+
annotatorView?: AnnotationQueueAnnotatorView;
|
|
616
617
|
}
|
|
617
618
|
|
|
618
619
|
/**
|
|
@@ -1432,9 +1433,12 @@ interface ExperimentExecutionRequest {
|
|
|
1432
1433
|
datasetVersionId?: string;
|
|
1433
1434
|
prompts: PromptVariant[];
|
|
1434
1435
|
projectName?: string;
|
|
1436
|
+
projectId?: string;
|
|
1435
1437
|
datasetId: string;
|
|
1436
1438
|
versionHash?: string;
|
|
1437
1439
|
promptVersions?: PromptVersionLink[];
|
|
1440
|
+
selectedRuleIds?: string[];
|
|
1441
|
+
filters?: string;
|
|
1438
1442
|
}
|
|
1439
1443
|
|
|
1440
1444
|
/**
|
|
@@ -1590,6 +1594,16 @@ type GetExperimentByIdRequest = {};
|
|
|
1590
1594
|
*/
|
|
1591
1595
|
type GetExperimentItemByIdRequest = {};
|
|
1592
1596
|
|
|
1597
|
+
/**
|
|
1598
|
+
* @example
|
|
1599
|
+
* {
|
|
1600
|
+
* ids: ["ids"]
|
|
1601
|
+
* }
|
|
1602
|
+
*/
|
|
1603
|
+
interface IdsHolder {
|
|
1604
|
+
ids: string[];
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1593
1607
|
/**
|
|
1594
1608
|
* @example
|
|
1595
1609
|
* {
|
|
@@ -1610,6 +1624,7 @@ declare const ExperimentWriteStatus: {
|
|
|
1610
1624
|
readonly Running: "running";
|
|
1611
1625
|
readonly Completed: "completed";
|
|
1612
1626
|
readonly Cancelled: "cancelled";
|
|
1627
|
+
readonly Failed: "failed";
|
|
1613
1628
|
};
|
|
1614
1629
|
type ExperimentWriteStatus = (typeof ExperimentWriteStatus)[keyof typeof ExperimentWriteStatus];
|
|
1615
1630
|
|
|
@@ -4004,6 +4019,33 @@ interface AnalyticsQueryResponse {
|
|
|
4004
4019
|
results?: JsonNode[];
|
|
4005
4020
|
}
|
|
4006
4021
|
|
|
4022
|
+
interface AnnotationQueueAnnotatorView {
|
|
4023
|
+
/** A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation */
|
|
4024
|
+
html?: string;
|
|
4025
|
+
/** Version of the view kit the html was written for */
|
|
4026
|
+
kitVersion?: number;
|
|
4027
|
+
/** What annotators see in the view, in one or two sentences */
|
|
4028
|
+
summary?: string;
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
interface AnnotationQueueAnnotatorViewPublic {
|
|
4032
|
+
/** A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation */
|
|
4033
|
+
html?: string;
|
|
4034
|
+
/** Version of the view kit the html was written for */
|
|
4035
|
+
kitVersion?: number;
|
|
4036
|
+
/** What annotators see in the view, in one or two sentences */
|
|
4037
|
+
summary?: string;
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
interface AnnotationQueueAnnotatorViewWrite {
|
|
4041
|
+
/** A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation */
|
|
4042
|
+
html?: string;
|
|
4043
|
+
/** Version of the view kit the html was written for */
|
|
4044
|
+
kitVersion?: number;
|
|
4045
|
+
/** What annotators see in the view, in one or two sentences */
|
|
4046
|
+
summary?: string;
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4007
4049
|
interface AnnotationQueueAutomation {
|
|
4008
4050
|
enabled?: boolean;
|
|
4009
4051
|
conditions?: Conditions;
|
|
@@ -4066,6 +4108,7 @@ interface AnnotationQueuePublic {
|
|
|
4066
4108
|
annotatorsPerItem?: number;
|
|
4067
4109
|
lockTimeoutSeconds?: number;
|
|
4068
4110
|
automation?: AnnotationQueueAutomationPublic;
|
|
4111
|
+
annotatorView?: AnnotationQueueAnnotatorViewPublic;
|
|
4069
4112
|
reviewers?: AnnotationQueueReviewerPublic[];
|
|
4070
4113
|
feedbackScores?: FeedbackScoreAveragePublic[];
|
|
4071
4114
|
itemsCount?: number;
|
|
@@ -4121,6 +4164,7 @@ interface AnnotationQueueWrite {
|
|
|
4121
4164
|
annotatorsPerItem?: number;
|
|
4122
4165
|
lockTimeoutSeconds?: number;
|
|
4123
4166
|
automation?: AnnotationQueueAutomationWrite;
|
|
4167
|
+
annotatorView?: AnnotationQueueAnnotatorViewWrite;
|
|
4124
4168
|
}
|
|
4125
4169
|
|
|
4126
4170
|
declare const AnnotationQueueWriteScope: {
|
|
@@ -5606,6 +5650,7 @@ interface ExperimentGroupResponse {
|
|
|
5606
5650
|
interface ExperimentInfo {
|
|
5607
5651
|
experimentId?: string;
|
|
5608
5652
|
promptIndex?: number;
|
|
5653
|
+
totalItems?: number;
|
|
5609
5654
|
}
|
|
5610
5655
|
|
|
5611
5656
|
interface ExperimentItem {
|
|
@@ -5773,6 +5818,8 @@ interface ExperimentPublic {
|
|
|
5773
5818
|
createdBy?: string;
|
|
5774
5819
|
lastUpdatedBy?: string;
|
|
5775
5820
|
status?: ExperimentPublicStatus;
|
|
5821
|
+
/** When the run stopped producing items. Unset while it may still produce more, whatever its status */
|
|
5822
|
+
finishedAt?: Date;
|
|
5776
5823
|
experimentScores?: ExperimentScorePublic[];
|
|
5777
5824
|
promptVersion?: PromptVersionLinkPublic;
|
|
5778
5825
|
promptVersions?: PromptVersionLinkPublic[];
|
|
@@ -5799,6 +5846,7 @@ declare const ExperimentPublicStatus: {
|
|
|
5799
5846
|
readonly Running: "running";
|
|
5800
5847
|
readonly Completed: "completed";
|
|
5801
5848
|
readonly Cancelled: "cancelled";
|
|
5849
|
+
readonly Failed: "failed";
|
|
5802
5850
|
};
|
|
5803
5851
|
type ExperimentPublicStatus = (typeof ExperimentPublicStatus)[keyof typeof ExperimentPublicStatus];
|
|
5804
5852
|
|
|
@@ -5889,6 +5937,7 @@ declare const ExperimentUpdateStatus: {
|
|
|
5889
5937
|
readonly Running: "running";
|
|
5890
5938
|
readonly Completed: "completed";
|
|
5891
5939
|
readonly Cancelled: "cancelled";
|
|
5940
|
+
readonly Failed: "failed";
|
|
5892
5941
|
};
|
|
5893
5942
|
type ExperimentUpdateStatus = (typeof ExperimentUpdateStatus)[keyof typeof ExperimentUpdateStatus];
|
|
5894
5943
|
|
|
@@ -10659,6 +10708,22 @@ declare class ExperimentsClient {
|
|
|
10659
10708
|
*/
|
|
10660
10709
|
batchUpdateExperiments(request: ExperimentBatchUpdate, requestOptions?: ExperimentsClient.RequestOptions): HttpResponsePromise<void>;
|
|
10661
10710
|
private __batchUpdateExperiments;
|
|
10711
|
+
/**
|
|
10712
|
+
* Stops the given experiments: queued items are skipped and the experiments are marked cancelled
|
|
10713
|
+
*
|
|
10714
|
+
* @param {OpikApi.IdsHolder} request
|
|
10715
|
+
* @param {ExperimentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
10716
|
+
*
|
|
10717
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
10718
|
+
* @throws {@link OpikApi.TooManyRequestsError}
|
|
10719
|
+
*
|
|
10720
|
+
* @example
|
|
10721
|
+
* await client.experiments.cancelExperiments({
|
|
10722
|
+
* ids: ["ids"]
|
|
10723
|
+
* })
|
|
10724
|
+
*/
|
|
10725
|
+
cancelExperiments(request: IdsHolder, requestOptions?: ExperimentsClient.RequestOptions): HttpResponsePromise<void>;
|
|
10726
|
+
private __cancelExperiments;
|
|
10662
10727
|
/**
|
|
10663
10728
|
* Find experiments
|
|
10664
10729
|
*
|
|
@@ -10733,6 +10798,8 @@ declare class ExperimentsClient {
|
|
|
10733
10798
|
* @param {ExperimentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
10734
10799
|
*
|
|
10735
10800
|
* @throws {@link OpikApi.BadRequestError}
|
|
10801
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
10802
|
+
* @throws {@link OpikApi.TooManyRequestsError}
|
|
10736
10803
|
*
|
|
10737
10804
|
* @example
|
|
10738
10805
|
* await client.experiments.executeExperiment({
|
package/dist/index.d.ts
CHANGED
|
@@ -613,6 +613,7 @@ interface AnnotationQueueUpdate {
|
|
|
613
613
|
annotatorsPerItem?: number;
|
|
614
614
|
lockTimeoutSeconds?: number;
|
|
615
615
|
automation?: AnnotationQueueAutomation;
|
|
616
|
+
annotatorView?: AnnotationQueueAnnotatorView;
|
|
616
617
|
}
|
|
617
618
|
|
|
618
619
|
/**
|
|
@@ -1432,9 +1433,12 @@ interface ExperimentExecutionRequest {
|
|
|
1432
1433
|
datasetVersionId?: string;
|
|
1433
1434
|
prompts: PromptVariant[];
|
|
1434
1435
|
projectName?: string;
|
|
1436
|
+
projectId?: string;
|
|
1435
1437
|
datasetId: string;
|
|
1436
1438
|
versionHash?: string;
|
|
1437
1439
|
promptVersions?: PromptVersionLink[];
|
|
1440
|
+
selectedRuleIds?: string[];
|
|
1441
|
+
filters?: string;
|
|
1438
1442
|
}
|
|
1439
1443
|
|
|
1440
1444
|
/**
|
|
@@ -1590,6 +1594,16 @@ type GetExperimentByIdRequest = {};
|
|
|
1590
1594
|
*/
|
|
1591
1595
|
type GetExperimentItemByIdRequest = {};
|
|
1592
1596
|
|
|
1597
|
+
/**
|
|
1598
|
+
* @example
|
|
1599
|
+
* {
|
|
1600
|
+
* ids: ["ids"]
|
|
1601
|
+
* }
|
|
1602
|
+
*/
|
|
1603
|
+
interface IdsHolder {
|
|
1604
|
+
ids: string[];
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1593
1607
|
/**
|
|
1594
1608
|
* @example
|
|
1595
1609
|
* {
|
|
@@ -1610,6 +1624,7 @@ declare const ExperimentWriteStatus: {
|
|
|
1610
1624
|
readonly Running: "running";
|
|
1611
1625
|
readonly Completed: "completed";
|
|
1612
1626
|
readonly Cancelled: "cancelled";
|
|
1627
|
+
readonly Failed: "failed";
|
|
1613
1628
|
};
|
|
1614
1629
|
type ExperimentWriteStatus = (typeof ExperimentWriteStatus)[keyof typeof ExperimentWriteStatus];
|
|
1615
1630
|
|
|
@@ -4004,6 +4019,33 @@ interface AnalyticsQueryResponse {
|
|
|
4004
4019
|
results?: JsonNode[];
|
|
4005
4020
|
}
|
|
4006
4021
|
|
|
4022
|
+
interface AnnotationQueueAnnotatorView {
|
|
4023
|
+
/** A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation */
|
|
4024
|
+
html?: string;
|
|
4025
|
+
/** Version of the view kit the html was written for */
|
|
4026
|
+
kitVersion?: number;
|
|
4027
|
+
/** What annotators see in the view, in one or two sentences */
|
|
4028
|
+
summary?: string;
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
interface AnnotationQueueAnnotatorViewPublic {
|
|
4032
|
+
/** A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation */
|
|
4033
|
+
html?: string;
|
|
4034
|
+
/** Version of the view kit the html was written for */
|
|
4035
|
+
kitVersion?: number;
|
|
4036
|
+
/** What annotators see in the view, in one or two sentences */
|
|
4037
|
+
summary?: string;
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
interface AnnotationQueueAnnotatorViewWrite {
|
|
4041
|
+
/** A custom HTML view rendered in a sandboxed iframe instead of the default trace blocks or conversation */
|
|
4042
|
+
html?: string;
|
|
4043
|
+
/** Version of the view kit the html was written for */
|
|
4044
|
+
kitVersion?: number;
|
|
4045
|
+
/** What annotators see in the view, in one or two sentences */
|
|
4046
|
+
summary?: string;
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4007
4049
|
interface AnnotationQueueAutomation {
|
|
4008
4050
|
enabled?: boolean;
|
|
4009
4051
|
conditions?: Conditions;
|
|
@@ -4066,6 +4108,7 @@ interface AnnotationQueuePublic {
|
|
|
4066
4108
|
annotatorsPerItem?: number;
|
|
4067
4109
|
lockTimeoutSeconds?: number;
|
|
4068
4110
|
automation?: AnnotationQueueAutomationPublic;
|
|
4111
|
+
annotatorView?: AnnotationQueueAnnotatorViewPublic;
|
|
4069
4112
|
reviewers?: AnnotationQueueReviewerPublic[];
|
|
4070
4113
|
feedbackScores?: FeedbackScoreAveragePublic[];
|
|
4071
4114
|
itemsCount?: number;
|
|
@@ -4121,6 +4164,7 @@ interface AnnotationQueueWrite {
|
|
|
4121
4164
|
annotatorsPerItem?: number;
|
|
4122
4165
|
lockTimeoutSeconds?: number;
|
|
4123
4166
|
automation?: AnnotationQueueAutomationWrite;
|
|
4167
|
+
annotatorView?: AnnotationQueueAnnotatorViewWrite;
|
|
4124
4168
|
}
|
|
4125
4169
|
|
|
4126
4170
|
declare const AnnotationQueueWriteScope: {
|
|
@@ -5606,6 +5650,7 @@ interface ExperimentGroupResponse {
|
|
|
5606
5650
|
interface ExperimentInfo {
|
|
5607
5651
|
experimentId?: string;
|
|
5608
5652
|
promptIndex?: number;
|
|
5653
|
+
totalItems?: number;
|
|
5609
5654
|
}
|
|
5610
5655
|
|
|
5611
5656
|
interface ExperimentItem {
|
|
@@ -5773,6 +5818,8 @@ interface ExperimentPublic {
|
|
|
5773
5818
|
createdBy?: string;
|
|
5774
5819
|
lastUpdatedBy?: string;
|
|
5775
5820
|
status?: ExperimentPublicStatus;
|
|
5821
|
+
/** When the run stopped producing items. Unset while it may still produce more, whatever its status */
|
|
5822
|
+
finishedAt?: Date;
|
|
5776
5823
|
experimentScores?: ExperimentScorePublic[];
|
|
5777
5824
|
promptVersion?: PromptVersionLinkPublic;
|
|
5778
5825
|
promptVersions?: PromptVersionLinkPublic[];
|
|
@@ -5799,6 +5846,7 @@ declare const ExperimentPublicStatus: {
|
|
|
5799
5846
|
readonly Running: "running";
|
|
5800
5847
|
readonly Completed: "completed";
|
|
5801
5848
|
readonly Cancelled: "cancelled";
|
|
5849
|
+
readonly Failed: "failed";
|
|
5802
5850
|
};
|
|
5803
5851
|
type ExperimentPublicStatus = (typeof ExperimentPublicStatus)[keyof typeof ExperimentPublicStatus];
|
|
5804
5852
|
|
|
@@ -5889,6 +5937,7 @@ declare const ExperimentUpdateStatus: {
|
|
|
5889
5937
|
readonly Running: "running";
|
|
5890
5938
|
readonly Completed: "completed";
|
|
5891
5939
|
readonly Cancelled: "cancelled";
|
|
5940
|
+
readonly Failed: "failed";
|
|
5892
5941
|
};
|
|
5893
5942
|
type ExperimentUpdateStatus = (typeof ExperimentUpdateStatus)[keyof typeof ExperimentUpdateStatus];
|
|
5894
5943
|
|
|
@@ -10659,6 +10708,22 @@ declare class ExperimentsClient {
|
|
|
10659
10708
|
*/
|
|
10660
10709
|
batchUpdateExperiments(request: ExperimentBatchUpdate, requestOptions?: ExperimentsClient.RequestOptions): HttpResponsePromise<void>;
|
|
10661
10710
|
private __batchUpdateExperiments;
|
|
10711
|
+
/**
|
|
10712
|
+
* Stops the given experiments: queued items are skipped and the experiments are marked cancelled
|
|
10713
|
+
*
|
|
10714
|
+
* @param {OpikApi.IdsHolder} request
|
|
10715
|
+
* @param {ExperimentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
10716
|
+
*
|
|
10717
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
10718
|
+
* @throws {@link OpikApi.TooManyRequestsError}
|
|
10719
|
+
*
|
|
10720
|
+
* @example
|
|
10721
|
+
* await client.experiments.cancelExperiments({
|
|
10722
|
+
* ids: ["ids"]
|
|
10723
|
+
* })
|
|
10724
|
+
*/
|
|
10725
|
+
cancelExperiments(request: IdsHolder, requestOptions?: ExperimentsClient.RequestOptions): HttpResponsePromise<void>;
|
|
10726
|
+
private __cancelExperiments;
|
|
10662
10727
|
/**
|
|
10663
10728
|
* Find experiments
|
|
10664
10729
|
*
|
|
@@ -10733,6 +10798,8 @@ declare class ExperimentsClient {
|
|
|
10733
10798
|
* @param {ExperimentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
10734
10799
|
*
|
|
10735
10800
|
* @throws {@link OpikApi.BadRequestError}
|
|
10801
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
10802
|
+
* @throws {@link OpikApi.TooManyRequestsError}
|
|
10736
10803
|
*
|
|
10737
10804
|
* @example
|
|
10738
10805
|
* await client.experiments.executeExperiment({
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Ia}from'./chunk-
|
|
1
|
+
import {Ia}from'./chunk-YQXWKD5B.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-YQXWKD5B.js';Ia();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Ca}from'./chunk-
|
|
1
|
+
import {Ca}from'./chunk-YQXWKD5B.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-YQXWKD5B.js';Ca();
|