opik 2.2.87 → 2.2.89

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.d.cts CHANGED
@@ -3250,6 +3250,7 @@ interface GetTraceThreadsRequest {
3250
3250
  stripAttachments?: boolean;
3251
3251
  filters?: string;
3252
3252
  sorting?: string;
3253
+ exclude?: string;
3253
3254
  search?: string;
3254
3255
  fromTime?: Date;
3255
3256
  toTime?: Date;
@@ -3436,6 +3437,7 @@ declare const TraceSearchStreamRequestPublicExcludeItem: {
3436
3437
  readonly VisibilityMode: "visibility_mode";
3437
3438
  readonly Providers: "providers";
3438
3439
  readonly Experiment: "experiment";
3440
+ readonly AnnotationQueues: "annotation_queues";
3439
3441
  readonly Source: "source";
3440
3442
  readonly Environment: "environment";
3441
3443
  };
@@ -3919,6 +3921,8 @@ interface AnnotationQueueAutomation {
3919
3921
  enabled?: boolean;
3920
3922
  conditions?: Conditions;
3921
3923
  maxItemsInQueue?: number;
3924
+ /** When true, removes the item ceiling so automation adds without bound */
3925
+ clearMaxItemsInQueue?: boolean;
3922
3926
  }
3923
3927
 
3924
3928
  interface AnnotationQueueAutomationPublic {
@@ -3931,6 +3935,8 @@ interface AnnotationQueueAutomationWrite {
3931
3935
  enabled?: boolean;
3932
3936
  conditions?: ConditionsWrite;
3933
3937
  maxItemsInQueue?: number;
3938
+ /** When true, removes the item ceiling so automation adds without bound */
3939
+ clearMaxItemsInQueue?: boolean;
3934
3940
  }
3935
3941
 
3936
3942
  interface AnnotationQueueItemIds {
@@ -3988,6 +3994,26 @@ declare const AnnotationQueuePublicScope: {
3988
3994
  };
3989
3995
  type AnnotationQueuePublicScope = (typeof AnnotationQueuePublicScope)[keyof typeof AnnotationQueuePublicScope];
3990
3996
 
3997
+ /**
3998
+ * Annotation queue reference with ID and name
3999
+ */
4000
+ interface AnnotationQueueReference {
4001
+ /** Annotation queue ID */
4002
+ id: string;
4003
+ /** Annotation queue name */
4004
+ name: string;
4005
+ }
4006
+
4007
+ /**
4008
+ * Annotation queue reference with ID and name
4009
+ */
4010
+ interface AnnotationQueueReferencePublic {
4011
+ /** Annotation queue ID */
4012
+ id: string;
4013
+ /** Annotation queue name */
4014
+ name: string;
4015
+ }
4016
+
3991
4017
  interface AnnotationQueueReviewerPublic {
3992
4018
  username?: string;
3993
4019
  status?: number;
@@ -7910,6 +7936,8 @@ interface Trace$1 {
7910
7936
  /** List of unique provider names from all spans in this trace, sorted alphabetically */
7911
7937
  providers?: string[];
7912
7938
  experiment?: ExperimentItemReference;
7939
+ /** Annotation queues this trace is currently an item of */
7940
+ annotationQueues?: AnnotationQueueReference[];
7913
7941
  source?: TraceSource;
7914
7942
  environment?: string;
7915
7943
  }
@@ -8079,6 +8107,8 @@ interface TracePublic {
8079
8107
  /** List of unique provider names from all spans in this trace, sorted alphabetically */
8080
8108
  providers?: string[];
8081
8109
  experiment?: ExperimentItemReferencePublic;
8110
+ /** Annotation queues this trace is currently an item of */
8111
+ annotationQueues?: AnnotationQueueReferencePublic[];
8082
8112
  source?: TracePublicSource;
8083
8113
  environment?: string;
8084
8114
  }
@@ -8123,6 +8153,8 @@ interface TraceThread {
8123
8153
  usage?: Record<string, number>;
8124
8154
  comments?: Comment[];
8125
8155
  tags?: string[];
8156
+ /** Annotation queues this thread is currently an item of */
8157
+ annotationQueues?: AnnotationQueueReference[];
8126
8158
  lastUpdatedAt?: Date;
8127
8159
  lastUpdatedBy?: string;
8128
8160
  createdBy?: string;
@@ -14797,10 +14829,12 @@ type EvaluationScoreResult = {
14797
14829
  /** Optional reason for the score */
14798
14830
  reason?: string;
14799
14831
  /**
14800
- * Whether the scoring failed due to a task-level error rather than a metric
14801
- * failure. When `true`, `name` will equal {@link TASK_ERROR_SCORE_NAME},
14802
- * which is a reserved name injected by the engine — user-defined metrics
14803
- * should never produce a score with that name.
14832
+ * Whether the score could not be computed. Set when the task threw (then
14833
+ * `name` equals {@link TASK_ERROR_SCORE_NAME}, a reserved name user-defined
14834
+ * metrics should never produce) or when the metric itself failed (then
14835
+ * `name` is the metric's name and `reason` holds the error message).
14836
+ * Failed scores are excluded from averages. The ones the engine records for
14837
+ * a thrown task or metric are also not logged on the trace.
14804
14838
  */
14805
14839
  scoringFailed?: boolean;
14806
14840
  /** Optional category name for grouping scores */
package/dist/index.d.ts CHANGED
@@ -3250,6 +3250,7 @@ interface GetTraceThreadsRequest {
3250
3250
  stripAttachments?: boolean;
3251
3251
  filters?: string;
3252
3252
  sorting?: string;
3253
+ exclude?: string;
3253
3254
  search?: string;
3254
3255
  fromTime?: Date;
3255
3256
  toTime?: Date;
@@ -3436,6 +3437,7 @@ declare const TraceSearchStreamRequestPublicExcludeItem: {
3436
3437
  readonly VisibilityMode: "visibility_mode";
3437
3438
  readonly Providers: "providers";
3438
3439
  readonly Experiment: "experiment";
3440
+ readonly AnnotationQueues: "annotation_queues";
3439
3441
  readonly Source: "source";
3440
3442
  readonly Environment: "environment";
3441
3443
  };
@@ -3919,6 +3921,8 @@ interface AnnotationQueueAutomation {
3919
3921
  enabled?: boolean;
3920
3922
  conditions?: Conditions;
3921
3923
  maxItemsInQueue?: number;
3924
+ /** When true, removes the item ceiling so automation adds without bound */
3925
+ clearMaxItemsInQueue?: boolean;
3922
3926
  }
3923
3927
 
3924
3928
  interface AnnotationQueueAutomationPublic {
@@ -3931,6 +3935,8 @@ interface AnnotationQueueAutomationWrite {
3931
3935
  enabled?: boolean;
3932
3936
  conditions?: ConditionsWrite;
3933
3937
  maxItemsInQueue?: number;
3938
+ /** When true, removes the item ceiling so automation adds without bound */
3939
+ clearMaxItemsInQueue?: boolean;
3934
3940
  }
3935
3941
 
3936
3942
  interface AnnotationQueueItemIds {
@@ -3988,6 +3994,26 @@ declare const AnnotationQueuePublicScope: {
3988
3994
  };
3989
3995
  type AnnotationQueuePublicScope = (typeof AnnotationQueuePublicScope)[keyof typeof AnnotationQueuePublicScope];
3990
3996
 
3997
+ /**
3998
+ * Annotation queue reference with ID and name
3999
+ */
4000
+ interface AnnotationQueueReference {
4001
+ /** Annotation queue ID */
4002
+ id: string;
4003
+ /** Annotation queue name */
4004
+ name: string;
4005
+ }
4006
+
4007
+ /**
4008
+ * Annotation queue reference with ID and name
4009
+ */
4010
+ interface AnnotationQueueReferencePublic {
4011
+ /** Annotation queue ID */
4012
+ id: string;
4013
+ /** Annotation queue name */
4014
+ name: string;
4015
+ }
4016
+
3991
4017
  interface AnnotationQueueReviewerPublic {
3992
4018
  username?: string;
3993
4019
  status?: number;
@@ -7910,6 +7936,8 @@ interface Trace$1 {
7910
7936
  /** List of unique provider names from all spans in this trace, sorted alphabetically */
7911
7937
  providers?: string[];
7912
7938
  experiment?: ExperimentItemReference;
7939
+ /** Annotation queues this trace is currently an item of */
7940
+ annotationQueues?: AnnotationQueueReference[];
7913
7941
  source?: TraceSource;
7914
7942
  environment?: string;
7915
7943
  }
@@ -8079,6 +8107,8 @@ interface TracePublic {
8079
8107
  /** List of unique provider names from all spans in this trace, sorted alphabetically */
8080
8108
  providers?: string[];
8081
8109
  experiment?: ExperimentItemReferencePublic;
8110
+ /** Annotation queues this trace is currently an item of */
8111
+ annotationQueues?: AnnotationQueueReferencePublic[];
8082
8112
  source?: TracePublicSource;
8083
8113
  environment?: string;
8084
8114
  }
@@ -8123,6 +8153,8 @@ interface TraceThread {
8123
8153
  usage?: Record<string, number>;
8124
8154
  comments?: Comment[];
8125
8155
  tags?: string[];
8156
+ /** Annotation queues this thread is currently an item of */
8157
+ annotationQueues?: AnnotationQueueReference[];
8126
8158
  lastUpdatedAt?: Date;
8127
8159
  lastUpdatedBy?: string;
8128
8160
  createdBy?: string;
@@ -14797,10 +14829,12 @@ type EvaluationScoreResult = {
14797
14829
  /** Optional reason for the score */
14798
14830
  reason?: string;
14799
14831
  /**
14800
- * Whether the scoring failed due to a task-level error rather than a metric
14801
- * failure. When `true`, `name` will equal {@link TASK_ERROR_SCORE_NAME},
14802
- * which is a reserved name injected by the engine — user-defined metrics
14803
- * should never produce a score with that name.
14832
+ * Whether the score could not be computed. Set when the task threw (then
14833
+ * `name` equals {@link TASK_ERROR_SCORE_NAME}, a reserved name user-defined
14834
+ * metrics should never produce) or when the metric itself failed (then
14835
+ * `name` is the metric's name and `reason` holds the error message).
14836
+ * Failed scores are excluded from averages. The ones the engine records for
14837
+ * a thrown task or metric are also not logged on the trace.
14804
14838
  */
14805
14839
  scoringFailed?: boolean;
14806
14840
  /** Optional category name for grouping scores */
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import {Ia}from'./chunk-6TZ4U2KZ.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-6TZ4U2KZ.js';Ia();
1
+ import {Ia}from'./chunk-YTUJEARH.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-YTUJEARH.js';Ia();
@@ -1 +1 @@
1
- import {Ca}from'./chunk-6TZ4U2KZ.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-6TZ4U2KZ.js';Ca();
1
+ import {Ca}from'./chunk-YTUJEARH.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-YTUJEARH.js';Ca();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opik",
3
3
  "description": "Opik TypeScript and JavaScript SDK",
4
- "version": "2.2.87",
4
+ "version": "2.2.89",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/comet-ml/opik.git",