opik 2.3.4 → 2.3.5

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
@@ -3279,19 +3279,6 @@ interface AnalyticsQueryRequest {
3279
3279
  query: string;
3280
3280
  }
3281
3281
 
3282
- /**
3283
- * @example
3284
- * {
3285
- * query: "query"
3286
- * }
3287
- */
3288
- interface ScopedAnalyticsQueryRequest {
3289
- /** Read-only ClickHouse SQL. Must return exactly one column named `result` produced via toJSONString(...) */
3290
- query: string;
3291
- /** Restrict query to this project. Omit to query the whole workspace. */
3292
- projectId?: string;
3293
- }
3294
-
3295
3282
  /**
3296
3283
  * @example
3297
3284
  * {
@@ -3315,6 +3302,28 @@ interface GetProjectTopicsRequest {
3315
3302
  projectId: string;
3316
3303
  }
3317
3304
 
3305
+ /**
3306
+ * @example
3307
+ * {
3308
+ * workspaceId: "workspace_id"
3309
+ * }
3310
+ */
3311
+ interface ResetProjectTopicsRequest {
3312
+ workspaceId: string;
3313
+ }
3314
+
3315
+ /**
3316
+ * @example
3317
+ * {
3318
+ * workspaceId: "workspace_id"
3319
+ * }
3320
+ */
3321
+ interface RunProjectTopicsRequest {
3322
+ workspaceId: string;
3323
+ night?: string;
3324
+ ignoreBackfill?: boolean;
3325
+ }
3326
+
3318
3327
  /**
3319
3328
  * @example
3320
3329
  * {
@@ -8132,6 +8141,13 @@ declare const RetentionRulePublicRetention: {
8132
8141
  };
8133
8142
  type RetentionRulePublicRetention = (typeof RetentionRulePublicRetention)[keyof typeof RetentionRulePublicRetention];
8134
8143
 
8144
+ interface ScopedAnalyticsQueryRequest {
8145
+ /** Read-only ClickHouse SQL. Must return exactly one column named `result` produced via toJSONString(...) */
8146
+ query: string;
8147
+ /** Restrict query to this project. Omit to query the whole workspace. */
8148
+ projectId?: string;
8149
+ }
8150
+
8135
8151
  interface ScoreCondition {
8136
8152
  scoreName: string;
8137
8153
  operator: ScoreConditionOperator;
@@ -10164,6 +10180,37 @@ declare class AlertsClient {
10164
10180
  private __testWebhook;
10165
10181
  }
10166
10182
 
10183
+ declare namespace AnalyticsQueriesClient {
10184
+ type Options = BaseClientOptions;
10185
+ interface RequestOptions extends BaseRequestOptions {
10186
+ }
10187
+ }
10188
+ /**
10189
+ * Free-form analytics SQL for Custom Charts
10190
+ */
10191
+ declare class AnalyticsQueriesClient {
10192
+ protected readonly _options: NormalizedClientOptions<AnalyticsQueriesClient.Options>;
10193
+ constructor(options?: AnalyticsQueriesClient.Options);
10194
+ /**
10195
+ * Runs read-only SQL bounded to the caller's workspace. Supply project_id to restrict traces, spans, feedback scores and trace threads to one project, or omit it to cover the whole workspace. Experiments, experiment items and dataset items always cover the whole workspace. Returns 501 when Custom Charts or its public endpoints are not enabled.
10196
+ *
10197
+ * @param {OpikApi.ScopedAnalyticsQueryRequest} request
10198
+ * @param {AnalyticsQueriesClient.RequestOptions} requestOptions - Request-specific configuration.
10199
+ *
10200
+ * @throws {@link OpikApi.BadRequestError}
10201
+ * @throws {@link OpikApi.UnprocessableEntityError}
10202
+ * @throws {@link OpikApi.TooManyRequestsError}
10203
+ * @throws {@link OpikApi.NotImplementedError}
10204
+ *
10205
+ * @example
10206
+ * await client.analyticsQueries.runAnalyticsQuery({
10207
+ * query: "query"
10208
+ * })
10209
+ */
10210
+ runAnalyticsQuery(request: ScopedAnalyticsQueryRequest, requestOptions?: AnalyticsQueriesClient.RequestOptions): HttpResponsePromise<AnalyticsQueryResponse>;
10211
+ private __runAnalyticsQuery;
10212
+ }
10213
+
10167
10214
  declare namespace AnnotationQueuesClient {
10168
10215
  type Options = BaseClientOptions;
10169
10216
  interface RequestOptions extends BaseRequestOptions {
@@ -14495,11 +14542,45 @@ declare namespace TopicsClient {
14495
14542
  }
14496
14543
  }
14497
14544
  /**
14498
- * Project topics and internal topics operations
14545
+ * Internal topics operations
14499
14546
  */
14500
14547
  declare class TopicsClient {
14501
14548
  protected readonly _options: NormalizedClientOptions<TopicsClient.Options>;
14502
14549
  constructor(options?: TopicsClient.Options);
14550
+ /**
14551
+ * Deletes the project's topics and clears the list on its topic_projects row, in one transaction, so its next discovery run, planned or by hand, builds a new list. The row's run and vectors backfill state stay. The workspace is opted in to topics at stage build or later, and the project has a topic_projects row and no run in flight.
14552
+ *
14553
+ * @param {string} projectId
14554
+ * @param {OpikApi.ResetProjectTopicsRequest} request
14555
+ * @param {TopicsClient.RequestOptions} requestOptions - Request-specific configuration.
14556
+ *
14557
+ * @throws {@link OpikApi.ConflictError}
14558
+ *
14559
+ * @example
14560
+ * await client.topics.resetProjectTopics("projectId", {
14561
+ * workspaceId: "workspace_id"
14562
+ * })
14563
+ */
14564
+ resetProjectTopics(projectId: string, request: ResetProjectTopicsRequest, requestOptions?: TopicsClient.RequestOptions): HttpResponsePromise<void>;
14565
+ private __resetProjectTopics;
14566
+ /**
14567
+ * Queues the project's discovery run and returns its run id; any pod runs it. The run's outcome is on the project's topic_projects row while it is the project's latest run, and in the run's logs. The window ends at the start of the night date (UTC; default today, at most tomorrow, at least the vectors backfill window ago). The workspace is opted in to topics at stage build or later, the window holds topics.run.minVectors vectors of the project, and the project has no list and no run in flight. The project's vectors backfill must have drained: ignore_backfill=true builds it from the vectors it has so far. A failed discovery run's retry wait and topics.runs.maxInFlight do not apply.
14568
+ *
14569
+ * @param {string} projectId
14570
+ * @param {OpikApi.RunProjectTopicsRequest} request
14571
+ * @param {TopicsClient.RequestOptions} requestOptions - Request-specific configuration.
14572
+ *
14573
+ * @throws {@link OpikApi.BadRequestError}
14574
+ * @throws {@link OpikApi.ConflictError}
14575
+ * @throws {@link OpikApi.ServiceUnavailableError}
14576
+ *
14577
+ * @example
14578
+ * await client.topics.runProjectTopics("projectId", {
14579
+ * workspaceId: "workspace_id"
14580
+ * })
14581
+ */
14582
+ runProjectTopics(projectId: string, request: RunProjectTopicsRequest, requestOptions?: TopicsClient.RequestOptions): HttpResponsePromise<void>;
14583
+ private __runProjectTopics;
14503
14584
  /**
14504
14585
  * The project's topics over the window, the last topics.run.windowDays UTC days (default 30), today included: per topic its count, share, rank and a daily series, plus Other's daily series. Counts can be up to 5 minutes old. status is disabled when the workspace is not opted in to topics, collecting while the project has no topics yet, too_large when a ClickHouse read hit a rows, bytes or memory guard (a retry answers the same, so do not retry), and ready otherwise. Fields of other states are omitted.
14505
14586
  *
@@ -15398,11 +15479,13 @@ declare class OpikApiClient {
15398
15479
  protected _agentInsightsEnrollment: AgentInsightsEnrollmentClient | undefined;
15399
15480
  protected _systemAnalyticsQueries: SystemAnalyticsQueriesClient | undefined;
15400
15481
  protected _dashboardSavedQueries: DashboardSavedQueriesClient | undefined;
15482
+ protected _topics: TopicsClient | undefined;
15401
15483
  protected _systemUsage: SystemUsageClient | undefined;
15402
15484
  protected _agentConfigs: AgentConfigsClient | undefined;
15403
15485
  protected _agentInsightsJobs: AgentInsightsJobsClient | undefined;
15404
15486
  protected _agentInsights: AgentInsightsClient | undefined;
15405
15487
  protected _alerts: AlertsClient | undefined;
15488
+ protected _analyticsQueries: AnalyticsQueriesClient | undefined;
15406
15489
  protected _annotationQueues: AnnotationQueuesClient | undefined;
15407
15490
  protected _assertionResults: AssertionResultsClient | undefined;
15408
15491
  protected _attachments: AttachmentsClient | undefined;
@@ -15434,7 +15517,6 @@ declare class OpikApiClient {
15434
15517
  protected _retentionRules: RetentionRulesClient | undefined;
15435
15518
  protected _serviceToggles: ServiceTogglesClient | undefined;
15436
15519
  protected _spans: SpansClient | undefined;
15437
- protected _topics: TopicsClient | undefined;
15438
15520
  protected _traces: TracesClient | undefined;
15439
15521
  protected _views: ViewsClient | undefined;
15440
15522
  protected _welcomeWizard: WelcomeWizardClient | undefined;
@@ -15446,11 +15528,13 @@ declare class OpikApiClient {
15446
15528
  get agentInsightsEnrollment(): AgentInsightsEnrollmentClient;
15447
15529
  get systemAnalyticsQueries(): SystemAnalyticsQueriesClient;
15448
15530
  get dashboardSavedQueries(): DashboardSavedQueriesClient;
15531
+ get topics(): TopicsClient;
15449
15532
  get systemUsage(): SystemUsageClient;
15450
15533
  get agentConfigs(): AgentConfigsClient;
15451
15534
  get agentInsightsJobs(): AgentInsightsJobsClient;
15452
15535
  get agentInsights(): AgentInsightsClient;
15453
15536
  get alerts(): AlertsClient;
15537
+ get analyticsQueries(): AnalyticsQueriesClient;
15454
15538
  get annotationQueues(): AnnotationQueuesClient;
15455
15539
  get assertionResults(): AssertionResultsClient;
15456
15540
  get attachments(): AttachmentsClient;
@@ -15482,7 +15566,6 @@ declare class OpikApiClient {
15482
15566
  get retentionRules(): RetentionRulesClient;
15483
15567
  get serviceToggles(): ServiceTogglesClient;
15484
15568
  get spans(): SpansClient;
15485
- get topics(): TopicsClient;
15486
15569
  get traces(): TracesClient;
15487
15570
  get views(): ViewsClient;
15488
15571
  get welcomeWizard(): WelcomeWizardClient;
@@ -18962,16 +19045,18 @@ declare const validationSchema$8: z.ZodObject<{
18962
19045
  }>;
18963
19046
  type Input$8 = z.infer<typeof validationSchema$8>;
18964
19047
  /**
18965
- * ExactMatch metric - checks if the actual output exactly matches the expected output.
18966
- * Simple metric for exact string matching.
19048
+ * Checks whether two values match. Arrays and plain objects are compared by
19049
+ * their own enumerable properties, including symbol keys.
18967
19050
  */
18968
19051
  declare class ExactMatch extends BaseMetric {
19052
+ private readonly caseSensitive;
18969
19053
  /**
18970
19054
  * Creates a new ExactMatch metric
18971
19055
  * @param name Optional name for the metric (defaults to "exact_match")
18972
19056
  * @param trackMetric Whether to track the metric
19057
+ * @param caseSensitive Whether strings, including nested values, are matched case-sensitively (defaults to true)
18973
19058
  */
18974
- constructor(name?: string, trackMetric?: boolean);
19059
+ constructor(name?: string, trackMetric?: boolean, caseSensitive?: boolean);
18975
19060
  validationSchema: z.ZodObject<{
18976
19061
  output: z.ZodUnknown;
18977
19062
  expected: z.ZodUnknown;
@@ -19028,6 +19113,7 @@ declare class Contains extends BaseMetric {
19028
19113
  * Calculates a score based on whether output contains substring
19029
19114
  * @param input Actual output to evaluate, must include `output` and `substring` properties
19030
19115
  * @returns Score result (1.0 if found, 0.0 if not found)
19116
+ * @throws {TypeError} If the substring is not a non-empty string
19031
19117
  */
19032
19118
  score(input: Input$7): Promise<EvaluationScoreResult>;
19033
19119
  }
package/dist/index.d.ts CHANGED
@@ -3279,19 +3279,6 @@ interface AnalyticsQueryRequest {
3279
3279
  query: string;
3280
3280
  }
3281
3281
 
3282
- /**
3283
- * @example
3284
- * {
3285
- * query: "query"
3286
- * }
3287
- */
3288
- interface ScopedAnalyticsQueryRequest {
3289
- /** Read-only ClickHouse SQL. Must return exactly one column named `result` produced via toJSONString(...) */
3290
- query: string;
3291
- /** Restrict query to this project. Omit to query the whole workspace. */
3292
- projectId?: string;
3293
- }
3294
-
3295
3282
  /**
3296
3283
  * @example
3297
3284
  * {
@@ -3315,6 +3302,28 @@ interface GetProjectTopicsRequest {
3315
3302
  projectId: string;
3316
3303
  }
3317
3304
 
3305
+ /**
3306
+ * @example
3307
+ * {
3308
+ * workspaceId: "workspace_id"
3309
+ * }
3310
+ */
3311
+ interface ResetProjectTopicsRequest {
3312
+ workspaceId: string;
3313
+ }
3314
+
3315
+ /**
3316
+ * @example
3317
+ * {
3318
+ * workspaceId: "workspace_id"
3319
+ * }
3320
+ */
3321
+ interface RunProjectTopicsRequest {
3322
+ workspaceId: string;
3323
+ night?: string;
3324
+ ignoreBackfill?: boolean;
3325
+ }
3326
+
3318
3327
  /**
3319
3328
  * @example
3320
3329
  * {
@@ -8132,6 +8141,13 @@ declare const RetentionRulePublicRetention: {
8132
8141
  };
8133
8142
  type RetentionRulePublicRetention = (typeof RetentionRulePublicRetention)[keyof typeof RetentionRulePublicRetention];
8134
8143
 
8144
+ interface ScopedAnalyticsQueryRequest {
8145
+ /** Read-only ClickHouse SQL. Must return exactly one column named `result` produced via toJSONString(...) */
8146
+ query: string;
8147
+ /** Restrict query to this project. Omit to query the whole workspace. */
8148
+ projectId?: string;
8149
+ }
8150
+
8135
8151
  interface ScoreCondition {
8136
8152
  scoreName: string;
8137
8153
  operator: ScoreConditionOperator;
@@ -10164,6 +10180,37 @@ declare class AlertsClient {
10164
10180
  private __testWebhook;
10165
10181
  }
10166
10182
 
10183
+ declare namespace AnalyticsQueriesClient {
10184
+ type Options = BaseClientOptions;
10185
+ interface RequestOptions extends BaseRequestOptions {
10186
+ }
10187
+ }
10188
+ /**
10189
+ * Free-form analytics SQL for Custom Charts
10190
+ */
10191
+ declare class AnalyticsQueriesClient {
10192
+ protected readonly _options: NormalizedClientOptions<AnalyticsQueriesClient.Options>;
10193
+ constructor(options?: AnalyticsQueriesClient.Options);
10194
+ /**
10195
+ * Runs read-only SQL bounded to the caller's workspace. Supply project_id to restrict traces, spans, feedback scores and trace threads to one project, or omit it to cover the whole workspace. Experiments, experiment items and dataset items always cover the whole workspace. Returns 501 when Custom Charts or its public endpoints are not enabled.
10196
+ *
10197
+ * @param {OpikApi.ScopedAnalyticsQueryRequest} request
10198
+ * @param {AnalyticsQueriesClient.RequestOptions} requestOptions - Request-specific configuration.
10199
+ *
10200
+ * @throws {@link OpikApi.BadRequestError}
10201
+ * @throws {@link OpikApi.UnprocessableEntityError}
10202
+ * @throws {@link OpikApi.TooManyRequestsError}
10203
+ * @throws {@link OpikApi.NotImplementedError}
10204
+ *
10205
+ * @example
10206
+ * await client.analyticsQueries.runAnalyticsQuery({
10207
+ * query: "query"
10208
+ * })
10209
+ */
10210
+ runAnalyticsQuery(request: ScopedAnalyticsQueryRequest, requestOptions?: AnalyticsQueriesClient.RequestOptions): HttpResponsePromise<AnalyticsQueryResponse>;
10211
+ private __runAnalyticsQuery;
10212
+ }
10213
+
10167
10214
  declare namespace AnnotationQueuesClient {
10168
10215
  type Options = BaseClientOptions;
10169
10216
  interface RequestOptions extends BaseRequestOptions {
@@ -14495,11 +14542,45 @@ declare namespace TopicsClient {
14495
14542
  }
14496
14543
  }
14497
14544
  /**
14498
- * Project topics and internal topics operations
14545
+ * Internal topics operations
14499
14546
  */
14500
14547
  declare class TopicsClient {
14501
14548
  protected readonly _options: NormalizedClientOptions<TopicsClient.Options>;
14502
14549
  constructor(options?: TopicsClient.Options);
14550
+ /**
14551
+ * Deletes the project's topics and clears the list on its topic_projects row, in one transaction, so its next discovery run, planned or by hand, builds a new list. The row's run and vectors backfill state stay. The workspace is opted in to topics at stage build or later, and the project has a topic_projects row and no run in flight.
14552
+ *
14553
+ * @param {string} projectId
14554
+ * @param {OpikApi.ResetProjectTopicsRequest} request
14555
+ * @param {TopicsClient.RequestOptions} requestOptions - Request-specific configuration.
14556
+ *
14557
+ * @throws {@link OpikApi.ConflictError}
14558
+ *
14559
+ * @example
14560
+ * await client.topics.resetProjectTopics("projectId", {
14561
+ * workspaceId: "workspace_id"
14562
+ * })
14563
+ */
14564
+ resetProjectTopics(projectId: string, request: ResetProjectTopicsRequest, requestOptions?: TopicsClient.RequestOptions): HttpResponsePromise<void>;
14565
+ private __resetProjectTopics;
14566
+ /**
14567
+ * Queues the project's discovery run and returns its run id; any pod runs it. The run's outcome is on the project's topic_projects row while it is the project's latest run, and in the run's logs. The window ends at the start of the night date (UTC; default today, at most tomorrow, at least the vectors backfill window ago). The workspace is opted in to topics at stage build or later, the window holds topics.run.minVectors vectors of the project, and the project has no list and no run in flight. The project's vectors backfill must have drained: ignore_backfill=true builds it from the vectors it has so far. A failed discovery run's retry wait and topics.runs.maxInFlight do not apply.
14568
+ *
14569
+ * @param {string} projectId
14570
+ * @param {OpikApi.RunProjectTopicsRequest} request
14571
+ * @param {TopicsClient.RequestOptions} requestOptions - Request-specific configuration.
14572
+ *
14573
+ * @throws {@link OpikApi.BadRequestError}
14574
+ * @throws {@link OpikApi.ConflictError}
14575
+ * @throws {@link OpikApi.ServiceUnavailableError}
14576
+ *
14577
+ * @example
14578
+ * await client.topics.runProjectTopics("projectId", {
14579
+ * workspaceId: "workspace_id"
14580
+ * })
14581
+ */
14582
+ runProjectTopics(projectId: string, request: RunProjectTopicsRequest, requestOptions?: TopicsClient.RequestOptions): HttpResponsePromise<void>;
14583
+ private __runProjectTopics;
14503
14584
  /**
14504
14585
  * The project's topics over the window, the last topics.run.windowDays UTC days (default 30), today included: per topic its count, share, rank and a daily series, plus Other's daily series. Counts can be up to 5 minutes old. status is disabled when the workspace is not opted in to topics, collecting while the project has no topics yet, too_large when a ClickHouse read hit a rows, bytes or memory guard (a retry answers the same, so do not retry), and ready otherwise. Fields of other states are omitted.
14505
14586
  *
@@ -15398,11 +15479,13 @@ declare class OpikApiClient {
15398
15479
  protected _agentInsightsEnrollment: AgentInsightsEnrollmentClient | undefined;
15399
15480
  protected _systemAnalyticsQueries: SystemAnalyticsQueriesClient | undefined;
15400
15481
  protected _dashboardSavedQueries: DashboardSavedQueriesClient | undefined;
15482
+ protected _topics: TopicsClient | undefined;
15401
15483
  protected _systemUsage: SystemUsageClient | undefined;
15402
15484
  protected _agentConfigs: AgentConfigsClient | undefined;
15403
15485
  protected _agentInsightsJobs: AgentInsightsJobsClient | undefined;
15404
15486
  protected _agentInsights: AgentInsightsClient | undefined;
15405
15487
  protected _alerts: AlertsClient | undefined;
15488
+ protected _analyticsQueries: AnalyticsQueriesClient | undefined;
15406
15489
  protected _annotationQueues: AnnotationQueuesClient | undefined;
15407
15490
  protected _assertionResults: AssertionResultsClient | undefined;
15408
15491
  protected _attachments: AttachmentsClient | undefined;
@@ -15434,7 +15517,6 @@ declare class OpikApiClient {
15434
15517
  protected _retentionRules: RetentionRulesClient | undefined;
15435
15518
  protected _serviceToggles: ServiceTogglesClient | undefined;
15436
15519
  protected _spans: SpansClient | undefined;
15437
- protected _topics: TopicsClient | undefined;
15438
15520
  protected _traces: TracesClient | undefined;
15439
15521
  protected _views: ViewsClient | undefined;
15440
15522
  protected _welcomeWizard: WelcomeWizardClient | undefined;
@@ -15446,11 +15528,13 @@ declare class OpikApiClient {
15446
15528
  get agentInsightsEnrollment(): AgentInsightsEnrollmentClient;
15447
15529
  get systemAnalyticsQueries(): SystemAnalyticsQueriesClient;
15448
15530
  get dashboardSavedQueries(): DashboardSavedQueriesClient;
15531
+ get topics(): TopicsClient;
15449
15532
  get systemUsage(): SystemUsageClient;
15450
15533
  get agentConfigs(): AgentConfigsClient;
15451
15534
  get agentInsightsJobs(): AgentInsightsJobsClient;
15452
15535
  get agentInsights(): AgentInsightsClient;
15453
15536
  get alerts(): AlertsClient;
15537
+ get analyticsQueries(): AnalyticsQueriesClient;
15454
15538
  get annotationQueues(): AnnotationQueuesClient;
15455
15539
  get assertionResults(): AssertionResultsClient;
15456
15540
  get attachments(): AttachmentsClient;
@@ -15482,7 +15566,6 @@ declare class OpikApiClient {
15482
15566
  get retentionRules(): RetentionRulesClient;
15483
15567
  get serviceToggles(): ServiceTogglesClient;
15484
15568
  get spans(): SpansClient;
15485
- get topics(): TopicsClient;
15486
15569
  get traces(): TracesClient;
15487
15570
  get views(): ViewsClient;
15488
15571
  get welcomeWizard(): WelcomeWizardClient;
@@ -18962,16 +19045,18 @@ declare const validationSchema$8: z.ZodObject<{
18962
19045
  }>;
18963
19046
  type Input$8 = z.infer<typeof validationSchema$8>;
18964
19047
  /**
18965
- * ExactMatch metric - checks if the actual output exactly matches the expected output.
18966
- * Simple metric for exact string matching.
19048
+ * Checks whether two values match. Arrays and plain objects are compared by
19049
+ * their own enumerable properties, including symbol keys.
18967
19050
  */
18968
19051
  declare class ExactMatch extends BaseMetric {
19052
+ private readonly caseSensitive;
18969
19053
  /**
18970
19054
  * Creates a new ExactMatch metric
18971
19055
  * @param name Optional name for the metric (defaults to "exact_match")
18972
19056
  * @param trackMetric Whether to track the metric
19057
+ * @param caseSensitive Whether strings, including nested values, are matched case-sensitively (defaults to true)
18973
19058
  */
18974
- constructor(name?: string, trackMetric?: boolean);
19059
+ constructor(name?: string, trackMetric?: boolean, caseSensitive?: boolean);
18975
19060
  validationSchema: z.ZodObject<{
18976
19061
  output: z.ZodUnknown;
18977
19062
  expected: z.ZodUnknown;
@@ -19028,6 +19113,7 @@ declare class Contains extends BaseMetric {
19028
19113
  * Calculates a score based on whether output contains substring
19029
19114
  * @param input Actual output to evaluate, must include `output` and `substring` properties
19030
19115
  * @returns Score result (1.0 if found, 0.0 if not found)
19116
+ * @throws {TypeError} If the substring is not a non-empty string
19031
19117
  */
19032
19118
  score(input: Input$7): Promise<EvaluationScoreResult>;
19033
19119
  }
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import {Ia}from'./chunk-MSGQKSG5.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-MSGQKSG5.js';Ia();
1
+ import {Ia}from'./chunk-WVAVDULW.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-WVAVDULW.js';Ia();
@@ -1 +1 @@
1
- import {Ca}from'./chunk-MSGQKSG5.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-MSGQKSG5.js';Ca();
1
+ import {Ca}from'./chunk-WVAVDULW.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-WVAVDULW.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.3.4",
4
+ "version": "2.3.5",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/comet-ml/opik.git",