opik 2.3.2 → 2.3.4
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-MSGQKSG5.js +404 -0
- package/dist/cli.js +1 -1
- package/dist/index.cjs +36 -36
- package/dist/index.d.cts +466 -0
- package/dist/index.d.ts +466 -0
- package/dist/index.js +1 -1
- package/dist/{suite-26YW354V.js → suite-E54KFPYW.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-EWN3R4VA.js +0 -404
package/dist/index.d.cts
CHANGED
|
@@ -1704,6 +1704,102 @@ declare const FindFeedbackDefinitionsRequestType: {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
type FindFeedbackDefinitionsRequestType = (typeof FindFeedbackDefinitionsRequestType)[keyof typeof FindFeedbackDefinitionsRequestType];
|
|
1706
1706
|
|
|
1707
|
+
/**
|
|
1708
|
+
* @example
|
|
1709
|
+
* {}
|
|
1710
|
+
*/
|
|
1711
|
+
type CancelGuardrailTrainingRunRequest = {};
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* @example
|
|
1715
|
+
* {
|
|
1716
|
+
* name: "name",
|
|
1717
|
+
* description: "description",
|
|
1718
|
+
* file: {
|
|
1719
|
+
* "key": "value"
|
|
1720
|
+
* }
|
|
1721
|
+
* }
|
|
1722
|
+
*/
|
|
1723
|
+
interface CreateGuardrailModelRequest {
|
|
1724
|
+
name: string;
|
|
1725
|
+
description: string;
|
|
1726
|
+
/** JSON Lines in UTF-8, one {"text": "...", "label": "yes" | "no"} object per line, yes meaning the text violates. The deployment sets the limits; by default 20 to 50,000 rows, at least 5 per label, up to 12,000 characters each, 50 MB */
|
|
1727
|
+
file: Record<string, unknown>;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* @example
|
|
1732
|
+
* {}
|
|
1733
|
+
*/
|
|
1734
|
+
type DeleteGuardrailModelRequest = {};
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* @example
|
|
1738
|
+
* {}
|
|
1739
|
+
*/
|
|
1740
|
+
interface FindGuardrailModelsRequest {
|
|
1741
|
+
page?: number;
|
|
1742
|
+
size?: number;
|
|
1743
|
+
name?: string;
|
|
1744
|
+
usableOnly?: boolean;
|
|
1745
|
+
latestRunStatus?: FindGuardrailModelsRequestLatestRunStatus;
|
|
1746
|
+
sorting?: string;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* @example
|
|
1751
|
+
* {}
|
|
1752
|
+
*/
|
|
1753
|
+
interface FindGuardrailTrainingRunsRequest {
|
|
1754
|
+
page?: number;
|
|
1755
|
+
size?: number;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* @example
|
|
1760
|
+
* {}
|
|
1761
|
+
*/
|
|
1762
|
+
type GetGuardrailModelByIdRequest = {};
|
|
1763
|
+
|
|
1764
|
+
/**
|
|
1765
|
+
* @example
|
|
1766
|
+
* {}
|
|
1767
|
+
*/
|
|
1768
|
+
type GetGuardrailTrainingRunByIdRequest = {};
|
|
1769
|
+
|
|
1770
|
+
/**
|
|
1771
|
+
* @example
|
|
1772
|
+
* {
|
|
1773
|
+
* description: "description"
|
|
1774
|
+
* }
|
|
1775
|
+
*/
|
|
1776
|
+
interface GuardrailModelUpdate {
|
|
1777
|
+
description: string;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* @example
|
|
1782
|
+
* {
|
|
1783
|
+
* file: {
|
|
1784
|
+
* "key": "value"
|
|
1785
|
+
* }
|
|
1786
|
+
* }
|
|
1787
|
+
*/
|
|
1788
|
+
interface RetrainGuardrailModelRequest {
|
|
1789
|
+
/** JSON Lines in UTF-8, one {"text": "...", "label": "yes" | "no"} object per line, yes meaning the text violates. The deployment sets the limits; by default 20 to 50,000 rows, at least 5 per label, up to 12,000 characters each, 50 MB */
|
|
1790
|
+
file: Record<string, unknown>;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
/** Filter models by their latest run's status */
|
|
1794
|
+
declare const FindGuardrailModelsRequestLatestRunStatus: {
|
|
1795
|
+
readonly Queued: "queued";
|
|
1796
|
+
readonly Running: "running";
|
|
1797
|
+
readonly Completed: "completed";
|
|
1798
|
+
readonly Failed: "failed";
|
|
1799
|
+
readonly Cancelled: "cancelled";
|
|
1800
|
+
};
|
|
1801
|
+
type FindGuardrailModelsRequestLatestRunStatus = (typeof FindGuardrailModelsRequestLatestRunStatus)[keyof typeof FindGuardrailModelsRequestLatestRunStatus];
|
|
1802
|
+
|
|
1707
1803
|
/**
|
|
1708
1804
|
* @example
|
|
1709
1805
|
* {}
|
|
@@ -3209,6 +3305,16 @@ interface UsageProjectsRequest {
|
|
|
3209
3305
|
limit?: number;
|
|
3210
3306
|
}
|
|
3211
3307
|
|
|
3308
|
+
/**
|
|
3309
|
+
* @example
|
|
3310
|
+
* {
|
|
3311
|
+
* projectId: "project_id"
|
|
3312
|
+
* }
|
|
3313
|
+
*/
|
|
3314
|
+
interface GetProjectTopicsRequest {
|
|
3315
|
+
projectId: string;
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3212
3318
|
/**
|
|
3213
3319
|
* @example
|
|
3214
3320
|
* {
|
|
@@ -4500,6 +4606,21 @@ interface AttachmentPage {
|
|
|
4500
4606
|
sortableBy?: string[];
|
|
4501
4607
|
}
|
|
4502
4608
|
|
|
4609
|
+
/**
|
|
4610
|
+
* collecting only: the project's newest run when it is running or failed; omitted when it saved or there is none. The runbook's 'Reading topics' section tells the collecting cases apart
|
|
4611
|
+
*/
|
|
4612
|
+
interface Attempt {
|
|
4613
|
+
/** running: the run started and has not ended. failed: it ended without saving */
|
|
4614
|
+
status?: AttemptStatus;
|
|
4615
|
+
}
|
|
4616
|
+
|
|
4617
|
+
/** running: the run started and has not ended. failed: it ended without saving */
|
|
4618
|
+
declare const AttemptStatus: {
|
|
4619
|
+
readonly Running: "running";
|
|
4620
|
+
readonly Failed: "failed";
|
|
4621
|
+
};
|
|
4622
|
+
type AttemptStatus = (typeof AttemptStatus)[keyof typeof AttemptStatus];
|
|
4623
|
+
|
|
4503
4624
|
interface AudioUrl {
|
|
4504
4625
|
url: string;
|
|
4505
4626
|
}
|
|
@@ -5732,6 +5853,16 @@ interface DatasetVersionSummaryPublic {
|
|
|
5732
5853
|
tags?: string[];
|
|
5733
5854
|
}
|
|
5734
5855
|
|
|
5856
|
+
/**
|
|
5857
|
+
* One entry per day of the window, oldest first, today last
|
|
5858
|
+
*/
|
|
5859
|
+
interface DayCount {
|
|
5860
|
+
/** A UTC date */
|
|
5861
|
+
day?: string;
|
|
5862
|
+
/** Traces created on the day */
|
|
5863
|
+
count?: number;
|
|
5864
|
+
}
|
|
5865
|
+
|
|
5735
5866
|
interface DeleteFeedbackScore {
|
|
5736
5867
|
name: string;
|
|
5737
5868
|
author?: string;
|
|
@@ -6498,6 +6629,28 @@ interface GroupDetails {
|
|
|
6498
6629
|
groupsDetails?: GroupDetail[];
|
|
6499
6630
|
}
|
|
6500
6631
|
|
|
6632
|
+
interface GuardrailModel {
|
|
6633
|
+
id?: string;
|
|
6634
|
+
/** Unique in the workspace, ignoring case; never changes */
|
|
6635
|
+
name: string;
|
|
6636
|
+
/** What the model flags: the question its adapter is trained and served on */
|
|
6637
|
+
description: string;
|
|
6638
|
+
servingRun?: GuardrailTrainingRun;
|
|
6639
|
+
latestRun?: GuardrailTrainingRun;
|
|
6640
|
+
createdAt?: Date;
|
|
6641
|
+
createdBy?: string;
|
|
6642
|
+
lastUpdatedAt?: Date;
|
|
6643
|
+
lastUpdatedBy?: string;
|
|
6644
|
+
}
|
|
6645
|
+
|
|
6646
|
+
interface GuardrailModelPage {
|
|
6647
|
+
content?: GuardrailModel[];
|
|
6648
|
+
page?: number;
|
|
6649
|
+
size?: number;
|
|
6650
|
+
total?: number;
|
|
6651
|
+
sortableBy?: string[];
|
|
6652
|
+
}
|
|
6653
|
+
|
|
6501
6654
|
interface GuardrailPolicyPagePublic {
|
|
6502
6655
|
content?: GuardrailPolicyPublic[];
|
|
6503
6656
|
page?: number;
|
|
@@ -6597,6 +6750,38 @@ interface GuardrailsValidationResponse {
|
|
|
6597
6750
|
validations: ValidationResult[];
|
|
6598
6751
|
}
|
|
6599
6752
|
|
|
6753
|
+
interface GuardrailTrainingRun {
|
|
6754
|
+
id?: string;
|
|
6755
|
+
modelId?: string;
|
|
6756
|
+
status?: GuardrailTrainingRunStatus;
|
|
6757
|
+
/** Why the run ended failed or cancelled; null otherwise */
|
|
6758
|
+
statusMessage?: string;
|
|
6759
|
+
/** Which attempt of one training the run is, 1 for the first */
|
|
6760
|
+
attempt?: number;
|
|
6761
|
+
/** When the run reached completed, failed or cancelled; null while it is in flight */
|
|
6762
|
+
finishedAt?: Date;
|
|
6763
|
+
createdAt?: Date;
|
|
6764
|
+
createdBy?: string;
|
|
6765
|
+
lastUpdatedAt?: Date;
|
|
6766
|
+
lastUpdatedBy?: string;
|
|
6767
|
+
}
|
|
6768
|
+
|
|
6769
|
+
interface GuardrailTrainingRunPage {
|
|
6770
|
+
content?: GuardrailTrainingRun[];
|
|
6771
|
+
page?: number;
|
|
6772
|
+
size?: number;
|
|
6773
|
+
total?: number;
|
|
6774
|
+
}
|
|
6775
|
+
|
|
6776
|
+
declare const GuardrailTrainingRunStatus: {
|
|
6777
|
+
readonly Queued: "queued";
|
|
6778
|
+
readonly Running: "running";
|
|
6779
|
+
readonly Completed: "completed";
|
|
6780
|
+
readonly Failed: "failed";
|
|
6781
|
+
readonly Cancelled: "cancelled";
|
|
6782
|
+
};
|
|
6783
|
+
type GuardrailTrainingRunStatus = (typeof GuardrailTrainingRunStatus)[keyof typeof GuardrailTrainingRunStatus];
|
|
6784
|
+
|
|
6600
6785
|
interface GuardrailWrite {
|
|
6601
6786
|
entityId: string;
|
|
6602
6787
|
secondaryId: string;
|
|
@@ -7243,6 +7428,14 @@ declare const OptimizationWriteStatus: {
|
|
|
7243
7428
|
};
|
|
7244
7429
|
type OptimizationWriteStatus = (typeof OptimizationWriteStatus)[keyof typeof OptimizationWriteStatus];
|
|
7245
7430
|
|
|
7431
|
+
/**
|
|
7432
|
+
* ready only: the traces per day with no topic, or with a topic that is no longer live. Add it to the topics' series for the project's total per day
|
|
7433
|
+
*/
|
|
7434
|
+
interface OtherStats {
|
|
7435
|
+
/** One entry per day of the window, oldest first, today last */
|
|
7436
|
+
series?: DayCount[];
|
|
7437
|
+
}
|
|
7438
|
+
|
|
7246
7439
|
interface PageColumns {
|
|
7247
7440
|
columns?: Column[];
|
|
7248
7441
|
}
|
|
@@ -7425,6 +7618,38 @@ interface ProjectStatsSummaryItem {
|
|
|
7425
7618
|
errorCount?: ErrorCountWithDeviation;
|
|
7426
7619
|
}
|
|
7427
7620
|
|
|
7621
|
+
interface ProjectTopics {
|
|
7622
|
+
/** disabled: the workspace is not opted in to topics. collecting: the project has no topics yet. ready: topics with counts. too_large: the project has too many traces in the window to count; a retry answers the same */
|
|
7623
|
+
status?: ProjectTopicsStatus;
|
|
7624
|
+
/** The UTC date of the request, the window's last day */
|
|
7625
|
+
today?: string;
|
|
7626
|
+
/** The window's first UTC day, inclusive */
|
|
7627
|
+
windowFrom?: string;
|
|
7628
|
+
/** When the project's last saved run (a discovery run or a nightly update) finished; omitted before the first one */
|
|
7629
|
+
lastRunAt?: Date;
|
|
7630
|
+
attempt?: Attempt;
|
|
7631
|
+
/** collecting only: traces with a vector in the window */
|
|
7632
|
+
vectorsInWindow?: number;
|
|
7633
|
+
/** collecting only: traces with a vector the discovery run needs */
|
|
7634
|
+
minVectors?: number;
|
|
7635
|
+
/** ready only: traces with a topic in the window, Other included */
|
|
7636
|
+
totalTraces?: number;
|
|
7637
|
+
/** ready only: the first day in the window with a labelled trace; earlier days are 0 because nothing was labelled. Omitted when the window has none */
|
|
7638
|
+
labelledFrom?: string;
|
|
7639
|
+
/** The live topics in rank order; empty unless ready */
|
|
7640
|
+
topics?: TopicStats[];
|
|
7641
|
+
other?: OtherStats;
|
|
7642
|
+
}
|
|
7643
|
+
|
|
7644
|
+
/** disabled: the workspace is not opted in to topics. collecting: the project has no topics yet. ready: topics with counts. too_large: the project has too many traces in the window to count; a retry answers the same */
|
|
7645
|
+
declare const ProjectTopicsStatus: {
|
|
7646
|
+
readonly Disabled: "disabled";
|
|
7647
|
+
readonly Collecting: "collecting";
|
|
7648
|
+
readonly Ready: "ready";
|
|
7649
|
+
readonly TooLarge: "too_large";
|
|
7650
|
+
};
|
|
7651
|
+
type ProjectTopicsStatus = (typeof ProjectTopicsStatus)[keyof typeof ProjectTopicsStatus];
|
|
7652
|
+
|
|
7428
7653
|
interface PromptCacheOptions {
|
|
7429
7654
|
mode?: string;
|
|
7430
7655
|
ttl?: string;
|
|
@@ -7963,6 +8188,7 @@ interface ServiceTogglesConfig {
|
|
|
7963
8188
|
spanUserDefinedMetricPythonEnabled: boolean;
|
|
7964
8189
|
guardrailsEnabled: boolean;
|
|
7965
8190
|
guardrailsValidationsEnabled: boolean;
|
|
8191
|
+
guardrailsTrainingEnabled: boolean;
|
|
7966
8192
|
opikAiEnabled: boolean;
|
|
7967
8193
|
alertsEnabled: boolean;
|
|
7968
8194
|
welcomeWizardEnabled: boolean;
|
|
@@ -7988,6 +8214,7 @@ interface ServiceTogglesConfig {
|
|
|
7988
8214
|
eventBridgeAlertsEnabled: boolean;
|
|
7989
8215
|
defaultPageSize?: number;
|
|
7990
8216
|
customChartsEnabledForWorkspace?: boolean;
|
|
8217
|
+
topicsEnabled?: boolean;
|
|
7991
8218
|
}
|
|
7992
8219
|
|
|
7993
8220
|
interface Span$1 {
|
|
@@ -8470,6 +8697,30 @@ declare const ToolType: {
|
|
|
8470
8697
|
};
|
|
8471
8698
|
type ToolType = (typeof ToolType)[keyof typeof ToolType];
|
|
8472
8699
|
|
|
8700
|
+
/**
|
|
8701
|
+
* The live topics in rank order; empty unless ready
|
|
8702
|
+
*/
|
|
8703
|
+
interface TopicStats {
|
|
8704
|
+
/** The topic id, the value the traces filter uses */
|
|
8705
|
+
id?: string;
|
|
8706
|
+
/** The topic's name */
|
|
8707
|
+
name?: string;
|
|
8708
|
+
/** What the topic's traces are about */
|
|
8709
|
+
definition?: string;
|
|
8710
|
+
/** The UTC date the topic was made: for a discovery run's topics, the day the run started */
|
|
8711
|
+
born?: string;
|
|
8712
|
+
/** Born after the project's discovery run, in the last 7 days */
|
|
8713
|
+
isNew?: boolean;
|
|
8714
|
+
/** Traces of the topic in the window */
|
|
8715
|
+
count?: number;
|
|
8716
|
+
/** count / total_traces, from 0 to 1, not rounded */
|
|
8717
|
+
share?: number;
|
|
8718
|
+
/** 1-based: topics by count, most first, then the earlier born, then the id */
|
|
8719
|
+
rank?: number;
|
|
8720
|
+
/** One entry per day of the window, oldest first, today last */
|
|
8721
|
+
series?: DayCount[];
|
|
8722
|
+
}
|
|
8723
|
+
|
|
8473
8724
|
interface Trace$1 {
|
|
8474
8725
|
id?: string;
|
|
8475
8726
|
/** If null, the default project is used */
|
|
@@ -11599,6 +11850,183 @@ declare class FeedbackDefinitionsClient {
|
|
|
11599
11850
|
private __deleteFeedbackDefinitionsBatch;
|
|
11600
11851
|
}
|
|
11601
11852
|
|
|
11853
|
+
declare namespace GuardrailModelsClient {
|
|
11854
|
+
type Options = BaseClientOptions;
|
|
11855
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
11856
|
+
}
|
|
11857
|
+
}
|
|
11858
|
+
/**
|
|
11859
|
+
* Guardrail models a workspace trains on its own labelled data
|
|
11860
|
+
*/
|
|
11861
|
+
declare class GuardrailModelsClient {
|
|
11862
|
+
protected readonly _options: NormalizedClientOptions<GuardrailModelsClient.Options>;
|
|
11863
|
+
constructor(options?: GuardrailModelsClient.Options);
|
|
11864
|
+
/**
|
|
11865
|
+
* Cancel a training run that is queued or running. Cancelling a cancelled run again changes nothing and answers 204 too
|
|
11866
|
+
*
|
|
11867
|
+
* @param {string} id
|
|
11868
|
+
* @param {string} runId
|
|
11869
|
+
* @param {OpikApi.CancelGuardrailTrainingRunRequest} request
|
|
11870
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11871
|
+
*
|
|
11872
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
11873
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
11874
|
+
* @throws {@link OpikApi.ConflictError}
|
|
11875
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
11876
|
+
*
|
|
11877
|
+
* @example
|
|
11878
|
+
* await client.guardrailModels.cancelGuardrailTrainingRun("id", "runId")
|
|
11879
|
+
*/
|
|
11880
|
+
cancelGuardrailTrainingRun(id: string, runId: string, request?: CancelGuardrailTrainingRunRequest, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<void>;
|
|
11881
|
+
private __cancelGuardrailTrainingRun;
|
|
11882
|
+
/**
|
|
11883
|
+
* Find the workspace's guardrail models, each with its serving run and its latest run
|
|
11884
|
+
*
|
|
11885
|
+
* @param {OpikApi.FindGuardrailModelsRequest} request
|
|
11886
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11887
|
+
*
|
|
11888
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
11889
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
11890
|
+
*
|
|
11891
|
+
* @example
|
|
11892
|
+
* await client.guardrailModels.findGuardrailModels()
|
|
11893
|
+
*/
|
|
11894
|
+
findGuardrailModels(request?: FindGuardrailModelsRequest, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<GuardrailModelPage>;
|
|
11895
|
+
private __findGuardrailModels;
|
|
11896
|
+
/**
|
|
11897
|
+
* Create a guardrail model and start its first training run from a labelled JSONL file
|
|
11898
|
+
*
|
|
11899
|
+
* @param {OpikApi.CreateGuardrailModelRequest} request
|
|
11900
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11901
|
+
*
|
|
11902
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
11903
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
11904
|
+
* @throws {@link OpikApi.ConflictError}
|
|
11905
|
+
* @throws {@link OpikApi.TooManyRequestsError}
|
|
11906
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
11907
|
+
*
|
|
11908
|
+
* @example
|
|
11909
|
+
* import { createReadStream } from "fs";
|
|
11910
|
+
* await client.guardrailModels.createGuardrailModel({
|
|
11911
|
+
* name: "name",
|
|
11912
|
+
* description: "description",
|
|
11913
|
+
* file: {
|
|
11914
|
+
* "key": "value"
|
|
11915
|
+
* }
|
|
11916
|
+
* })
|
|
11917
|
+
*/
|
|
11918
|
+
createGuardrailModel(request: CreateGuardrailModelRequest, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<void>;
|
|
11919
|
+
private __createGuardrailModel;
|
|
11920
|
+
/**
|
|
11921
|
+
* Get a guardrail model with its serving run and its latest run
|
|
11922
|
+
*
|
|
11923
|
+
* @param {string} id
|
|
11924
|
+
* @param {OpikApi.GetGuardrailModelByIdRequest} request
|
|
11925
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11926
|
+
*
|
|
11927
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
11928
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
11929
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
11930
|
+
*
|
|
11931
|
+
* @example
|
|
11932
|
+
* await client.guardrailModels.getGuardrailModelById("id")
|
|
11933
|
+
*/
|
|
11934
|
+
getGuardrailModelById(id: string, request?: GetGuardrailModelByIdRequest, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<GuardrailModel>;
|
|
11935
|
+
private __getGuardrailModelById;
|
|
11936
|
+
/**
|
|
11937
|
+
* Delete a guardrail model and its runs
|
|
11938
|
+
*
|
|
11939
|
+
* @param {string} id
|
|
11940
|
+
* @param {OpikApi.DeleteGuardrailModelRequest} request
|
|
11941
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11942
|
+
*
|
|
11943
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
11944
|
+
* @throws {@link OpikApi.ConflictError}
|
|
11945
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
11946
|
+
*
|
|
11947
|
+
* @example
|
|
11948
|
+
* await client.guardrailModels.deleteGuardrailModel("id")
|
|
11949
|
+
*/
|
|
11950
|
+
deleteGuardrailModel(id: string, request?: DeleteGuardrailModelRequest, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<void>;
|
|
11951
|
+
private __deleteGuardrailModel;
|
|
11952
|
+
/**
|
|
11953
|
+
* Update a guardrail model's description; its name never changes
|
|
11954
|
+
*
|
|
11955
|
+
* @param {string} id
|
|
11956
|
+
* @param {OpikApi.GuardrailModelUpdate} request
|
|
11957
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11958
|
+
*
|
|
11959
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
11960
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
11961
|
+
* @throws {@link OpikApi.UnprocessableEntityError}
|
|
11962
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
11963
|
+
*
|
|
11964
|
+
* @example
|
|
11965
|
+
* await client.guardrailModels.updateGuardrailModel("id", {
|
|
11966
|
+
* description: "description"
|
|
11967
|
+
* })
|
|
11968
|
+
*/
|
|
11969
|
+
updateGuardrailModel(id: string, request: GuardrailModelUpdate, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<void>;
|
|
11970
|
+
private __updateGuardrailModel;
|
|
11971
|
+
/**
|
|
11972
|
+
* Find a guardrail model's training runs, newest first
|
|
11973
|
+
*
|
|
11974
|
+
* @param {string} id
|
|
11975
|
+
* @param {OpikApi.FindGuardrailTrainingRunsRequest} request
|
|
11976
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11977
|
+
*
|
|
11978
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
11979
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
11980
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
11981
|
+
*
|
|
11982
|
+
* @example
|
|
11983
|
+
* await client.guardrailModels.findGuardrailTrainingRuns("id")
|
|
11984
|
+
*/
|
|
11985
|
+
findGuardrailTrainingRuns(id: string, request?: FindGuardrailTrainingRunsRequest, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<GuardrailTrainingRunPage>;
|
|
11986
|
+
private __findGuardrailTrainingRuns;
|
|
11987
|
+
/**
|
|
11988
|
+
* Start a new training of the model from a labelled JSONL file; the serving run keeps serving until the new one completes
|
|
11989
|
+
*
|
|
11990
|
+
* @param {string} id
|
|
11991
|
+
* @param {OpikApi.RetrainGuardrailModelRequest} request
|
|
11992
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11993
|
+
*
|
|
11994
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
11995
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
11996
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
11997
|
+
* @throws {@link OpikApi.ConflictError}
|
|
11998
|
+
* @throws {@link OpikApi.TooManyRequestsError}
|
|
11999
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
12000
|
+
*
|
|
12001
|
+
* @example
|
|
12002
|
+
* import { createReadStream } from "fs";
|
|
12003
|
+
* await client.guardrailModels.retrainGuardrailModel("id", {
|
|
12004
|
+
* file: {
|
|
12005
|
+
* "key": "value"
|
|
12006
|
+
* }
|
|
12007
|
+
* })
|
|
12008
|
+
*/
|
|
12009
|
+
retrainGuardrailModel(id: string, request: RetrainGuardrailModelRequest, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<void>;
|
|
12010
|
+
private __retrainGuardrailModel;
|
|
12011
|
+
/**
|
|
12012
|
+
* Get one training run of a guardrail model
|
|
12013
|
+
*
|
|
12014
|
+
* @param {string} id
|
|
12015
|
+
* @param {string} runId
|
|
12016
|
+
* @param {OpikApi.GetGuardrailTrainingRunByIdRequest} request
|
|
12017
|
+
* @param {GuardrailModelsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
12018
|
+
*
|
|
12019
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
12020
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
12021
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
12022
|
+
*
|
|
12023
|
+
* @example
|
|
12024
|
+
* await client.guardrailModels.getGuardrailTrainingRunById("id", "runId")
|
|
12025
|
+
*/
|
|
12026
|
+
getGuardrailTrainingRunById(id: string, runId: string, request?: GetGuardrailTrainingRunByIdRequest, requestOptions?: GuardrailModelsClient.RequestOptions): HttpResponsePromise<GuardrailTrainingRun>;
|
|
12027
|
+
private __getGuardrailTrainingRunById;
|
|
12028
|
+
}
|
|
12029
|
+
|
|
11602
12030
|
declare namespace GuardrailPoliciesClient {
|
|
11603
12031
|
type Options = BaseClientOptions;
|
|
11604
12032
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -14061,6 +14489,40 @@ declare class SystemUsageClient {
|
|
|
14061
14489
|
private __getTracesCountForWorkspaces;
|
|
14062
14490
|
}
|
|
14063
14491
|
|
|
14492
|
+
declare namespace TopicsClient {
|
|
14493
|
+
type Options = BaseClientOptions;
|
|
14494
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
14495
|
+
}
|
|
14496
|
+
}
|
|
14497
|
+
/**
|
|
14498
|
+
* Project topics and internal topics operations
|
|
14499
|
+
*/
|
|
14500
|
+
declare class TopicsClient {
|
|
14501
|
+
protected readonly _options: NormalizedClientOptions<TopicsClient.Options>;
|
|
14502
|
+
constructor(options?: TopicsClient.Options);
|
|
14503
|
+
/**
|
|
14504
|
+
* 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
|
+
*
|
|
14506
|
+
* @param {OpikApi.GetProjectTopicsRequest} request
|
|
14507
|
+
* @param {TopicsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
14508
|
+
*
|
|
14509
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
14510
|
+
* @throws {@link OpikApi.UnauthorizedError}
|
|
14511
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
14512
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
14513
|
+
* @throws {@link OpikApi.TooManyRequestsError}
|
|
14514
|
+
* @throws {@link OpikApi.NotImplementedError}
|
|
14515
|
+
* @throws {@link OpikApi.ServiceUnavailableError}
|
|
14516
|
+
*
|
|
14517
|
+
* @example
|
|
14518
|
+
* await client.topics.getProjectTopics({
|
|
14519
|
+
* projectId: "project_id"
|
|
14520
|
+
* })
|
|
14521
|
+
*/
|
|
14522
|
+
getProjectTopics(request: GetProjectTopicsRequest, requestOptions?: TopicsClient.RequestOptions): HttpResponsePromise<ProjectTopics>;
|
|
14523
|
+
private __getProjectTopics;
|
|
14524
|
+
}
|
|
14525
|
+
|
|
14064
14526
|
declare namespace TracesClient {
|
|
14065
14527
|
type Options = BaseClientOptions;
|
|
14066
14528
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -14952,6 +15414,7 @@ declare class OpikApiClient {
|
|
|
14952
15414
|
protected _environments: EnvironmentsClient | undefined;
|
|
14953
15415
|
protected _experiments: ExperimentsClient | undefined;
|
|
14954
15416
|
protected _feedbackDefinitions: FeedbackDefinitionsClient | undefined;
|
|
15417
|
+
protected _guardrailModels: GuardrailModelsClient | undefined;
|
|
14955
15418
|
protected _guardrailPolicies: GuardrailPoliciesClient | undefined;
|
|
14956
15419
|
protected _guardrails: GuardrailsClient | undefined;
|
|
14957
15420
|
protected _insightsViews: InsightsViewsClient | undefined;
|
|
@@ -14971,6 +15434,7 @@ declare class OpikApiClient {
|
|
|
14971
15434
|
protected _retentionRules: RetentionRulesClient | undefined;
|
|
14972
15435
|
protected _serviceToggles: ServiceTogglesClient | undefined;
|
|
14973
15436
|
protected _spans: SpansClient | undefined;
|
|
15437
|
+
protected _topics: TopicsClient | undefined;
|
|
14974
15438
|
protected _traces: TracesClient | undefined;
|
|
14975
15439
|
protected _views: ViewsClient | undefined;
|
|
14976
15440
|
protected _welcomeWizard: WelcomeWizardClient | undefined;
|
|
@@ -14998,6 +15462,7 @@ declare class OpikApiClient {
|
|
|
14998
15462
|
get environments(): EnvironmentsClient;
|
|
14999
15463
|
get experiments(): ExperimentsClient;
|
|
15000
15464
|
get feedbackDefinitions(): FeedbackDefinitionsClient;
|
|
15465
|
+
get guardrailModels(): GuardrailModelsClient;
|
|
15001
15466
|
get guardrailPolicies(): GuardrailPoliciesClient;
|
|
15002
15467
|
get guardrails(): GuardrailsClient;
|
|
15003
15468
|
get insightsViews(): InsightsViewsClient;
|
|
@@ -15017,6 +15482,7 @@ declare class OpikApiClient {
|
|
|
15017
15482
|
get retentionRules(): RetentionRulesClient;
|
|
15018
15483
|
get serviceToggles(): ServiceTogglesClient;
|
|
15019
15484
|
get spans(): SpansClient;
|
|
15485
|
+
get topics(): TopicsClient;
|
|
15020
15486
|
get traces(): TracesClient;
|
|
15021
15487
|
get views(): ViewsClient;
|
|
15022
15488
|
get welcomeWizard(): WelcomeWizardClient;
|