Skip to content

Commit 9ca34f2

Browse files
feat(api): api update
1 parent e8aba5e commit 9ca34f2

File tree

7 files changed

+514
-46
lines changed

7 files changed

+514
-46
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
configured_endpoints: 17
2-
openapi_spec_hash: 8827ead72aa0c635ccafac5e008fe247
1+
configured_endpoints: 18
2+
openapi_spec_hash: 4f09f95fd31c148d1be80b7e643346ce
33
config_hash: 30422a4611d93ca69e4f1aff60b9ddb5

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ Methods:
3939
Response Types:
4040

4141
- <a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestNewResponse">ProjectTestNewResponse</a>
42+
- <a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestUpdateResponse">ProjectTestUpdateResponse</a>
4243
- <a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestListResponse">ProjectTestListResponse</a>
4344

4445
Methods:
4546

4647
- <code title="post /projects/{projectId}/tests">client.Projects.Tests.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, projectID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestNewParams">ProjectTestNewParams</a>) (<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestNewResponse">ProjectTestNewResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
48+
- <code title="put /projects/{projectId}/tests">client.Projects.Tests.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, projectID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestUpdateParams">ProjectTestUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestUpdateResponse">ProjectTestUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
4749
- <code title="get /projects/{projectId}/tests">client.Projects.Tests.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, projectID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestListParams">ProjectTestListParams</a>) (<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go">openlayer</a>.<a href="https://pkg.go.dev/github.com/openlayer-ai/openlayer-go#ProjectTestListResponse">ProjectTestListResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
4850

4951
# Commits

committestresult.go

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,10 @@ func (r CommitTestResultListResponseItemsGoalSubtype) IsKnown() bool {
284284

285285
type CommitTestResultListResponseItemsGoalThreshold struct {
286286
// The insight name to be evaluated.
287-
InsightName string `json:"insightName"`
288-
// The insight parameters. Required only for some test subtypes.
287+
InsightName CommitTestResultListResponseItemsGoalThresholdsInsightName `json:"insightName"`
288+
// The insight parameters. Required only for some test subtypes. For example, for
289+
// tests that require a column name, the insight parameters will be [{'name':
290+
// 'column_name', 'value': 'Age'}]
289291
InsightParameters []CommitTestResultListResponseItemsGoalThresholdsInsightParameter `json:"insightParameters,nullable"`
290292
// The measurement to be evaluated.
291293
Measurement string `json:"measurement"`
@@ -319,6 +321,54 @@ func (r commitTestResultListResponseItemsGoalThresholdJSON) RawJSON() string {
319321
return r.raw
320322
}
321323

324+
// The insight name to be evaluated.
325+
type CommitTestResultListResponseItemsGoalThresholdsInsightName string
326+
327+
const (
328+
CommitTestResultListResponseItemsGoalThresholdsInsightNameCharacterLength CommitTestResultListResponseItemsGoalThresholdsInsightName = "characterLength"
329+
CommitTestResultListResponseItemsGoalThresholdsInsightNameClassImbalance CommitTestResultListResponseItemsGoalThresholdsInsightName = "classImbalance"
330+
CommitTestResultListResponseItemsGoalThresholdsInsightNameExpectColumnAToBeInColumnB CommitTestResultListResponseItemsGoalThresholdsInsightName = "expectColumnAToBeInColumnB"
331+
CommitTestResultListResponseItemsGoalThresholdsInsightNameColumnAverage CommitTestResultListResponseItemsGoalThresholdsInsightName = "columnAverage"
332+
CommitTestResultListResponseItemsGoalThresholdsInsightNameColumnDrift CommitTestResultListResponseItemsGoalThresholdsInsightName = "columnDrift"
333+
CommitTestResultListResponseItemsGoalThresholdsInsightNameColumnValuesMatch CommitTestResultListResponseItemsGoalThresholdsInsightName = "columnValuesMatch"
334+
CommitTestResultListResponseItemsGoalThresholdsInsightNameConfidenceDistribution CommitTestResultListResponseItemsGoalThresholdsInsightName = "confidenceDistribution"
335+
CommitTestResultListResponseItemsGoalThresholdsInsightNameConflictingLabelRowCount CommitTestResultListResponseItemsGoalThresholdsInsightName = "conflictingLabelRowCount"
336+
CommitTestResultListResponseItemsGoalThresholdsInsightNameContainsPii CommitTestResultListResponseItemsGoalThresholdsInsightName = "containsPii"
337+
CommitTestResultListResponseItemsGoalThresholdsInsightNameContainsValidURL CommitTestResultListResponseItemsGoalThresholdsInsightName = "containsValidUrl"
338+
CommitTestResultListResponseItemsGoalThresholdsInsightNameCorrelatedFeatures CommitTestResultListResponseItemsGoalThresholdsInsightName = "correlatedFeatures"
339+
CommitTestResultListResponseItemsGoalThresholdsInsightNameCustomMetric CommitTestResultListResponseItemsGoalThresholdsInsightName = "customMetric"
340+
CommitTestResultListResponseItemsGoalThresholdsInsightNameDuplicateRowCount CommitTestResultListResponseItemsGoalThresholdsInsightName = "duplicateRowCount"
341+
CommitTestResultListResponseItemsGoalThresholdsInsightNameEmptyFeatures CommitTestResultListResponseItemsGoalThresholdsInsightName = "emptyFeatures"
342+
CommitTestResultListResponseItemsGoalThresholdsInsightNameFeatureDrift CommitTestResultListResponseItemsGoalThresholdsInsightName = "featureDrift"
343+
CommitTestResultListResponseItemsGoalThresholdsInsightNameFeatureProfile CommitTestResultListResponseItemsGoalThresholdsInsightName = "featureProfile"
344+
CommitTestResultListResponseItemsGoalThresholdsInsightNameGreatExpectations CommitTestResultListResponseItemsGoalThresholdsInsightName = "greatExpectations"
345+
CommitTestResultListResponseItemsGoalThresholdsInsightNameGroupByColumnStatsCheck CommitTestResultListResponseItemsGoalThresholdsInsightName = "groupByColumnStatsCheck"
346+
CommitTestResultListResponseItemsGoalThresholdsInsightNameIllFormedRowCount CommitTestResultListResponseItemsGoalThresholdsInsightName = "illFormedRowCount"
347+
CommitTestResultListResponseItemsGoalThresholdsInsightNameIsCode CommitTestResultListResponseItemsGoalThresholdsInsightName = "isCode"
348+
CommitTestResultListResponseItemsGoalThresholdsInsightNameIsJson CommitTestResultListResponseItemsGoalThresholdsInsightName = "isJson"
349+
CommitTestResultListResponseItemsGoalThresholdsInsightNameLlmRubricV2 CommitTestResultListResponseItemsGoalThresholdsInsightName = "llmRubricV2"
350+
CommitTestResultListResponseItemsGoalThresholdsInsightNameLabelDrift CommitTestResultListResponseItemsGoalThresholdsInsightName = "labelDrift"
351+
CommitTestResultListResponseItemsGoalThresholdsInsightNameMetrics CommitTestResultListResponseItemsGoalThresholdsInsightName = "metrics"
352+
CommitTestResultListResponseItemsGoalThresholdsInsightNameNewCategories CommitTestResultListResponseItemsGoalThresholdsInsightName = "newCategories"
353+
CommitTestResultListResponseItemsGoalThresholdsInsightNameNewLabels CommitTestResultListResponseItemsGoalThresholdsInsightName = "newLabels"
354+
CommitTestResultListResponseItemsGoalThresholdsInsightNameNullRowCount CommitTestResultListResponseItemsGoalThresholdsInsightName = "nullRowCount"
355+
CommitTestResultListResponseItemsGoalThresholdsInsightNamePpScore CommitTestResultListResponseItemsGoalThresholdsInsightName = "ppScore"
356+
CommitTestResultListResponseItemsGoalThresholdsInsightNameQuasiConstantFeatures CommitTestResultListResponseItemsGoalThresholdsInsightName = "quasiConstantFeatures"
357+
CommitTestResultListResponseItemsGoalThresholdsInsightNameSentenceLength CommitTestResultListResponseItemsGoalThresholdsInsightName = "sentenceLength"
358+
CommitTestResultListResponseItemsGoalThresholdsInsightNameSizeRatio CommitTestResultListResponseItemsGoalThresholdsInsightName = "sizeRatio"
359+
CommitTestResultListResponseItemsGoalThresholdsInsightNameSpecialCharacters CommitTestResultListResponseItemsGoalThresholdsInsightName = "specialCharacters"
360+
CommitTestResultListResponseItemsGoalThresholdsInsightNameStringValidation CommitTestResultListResponseItemsGoalThresholdsInsightName = "stringValidation"
361+
CommitTestResultListResponseItemsGoalThresholdsInsightNameTrainValLeakageRowCount CommitTestResultListResponseItemsGoalThresholdsInsightName = "trainValLeakageRowCount"
362+
)
363+
364+
func (r CommitTestResultListResponseItemsGoalThresholdsInsightName) IsKnown() bool {
365+
switch r {
366+
case CommitTestResultListResponseItemsGoalThresholdsInsightNameCharacterLength, CommitTestResultListResponseItemsGoalThresholdsInsightNameClassImbalance, CommitTestResultListResponseItemsGoalThresholdsInsightNameExpectColumnAToBeInColumnB, CommitTestResultListResponseItemsGoalThresholdsInsightNameColumnAverage, CommitTestResultListResponseItemsGoalThresholdsInsightNameColumnDrift, CommitTestResultListResponseItemsGoalThresholdsInsightNameColumnValuesMatch, CommitTestResultListResponseItemsGoalThresholdsInsightNameConfidenceDistribution, CommitTestResultListResponseItemsGoalThresholdsInsightNameConflictingLabelRowCount, CommitTestResultListResponseItemsGoalThresholdsInsightNameContainsPii, CommitTestResultListResponseItemsGoalThresholdsInsightNameContainsValidURL, CommitTestResultListResponseItemsGoalThresholdsInsightNameCorrelatedFeatures, CommitTestResultListResponseItemsGoalThresholdsInsightNameCustomMetric, CommitTestResultListResponseItemsGoalThresholdsInsightNameDuplicateRowCount, CommitTestResultListResponseItemsGoalThresholdsInsightNameEmptyFeatures, CommitTestResultListResponseItemsGoalThresholdsInsightNameFeatureDrift, CommitTestResultListResponseItemsGoalThresholdsInsightNameFeatureProfile, CommitTestResultListResponseItemsGoalThresholdsInsightNameGreatExpectations, CommitTestResultListResponseItemsGoalThresholdsInsightNameGroupByColumnStatsCheck, CommitTestResultListResponseItemsGoalThresholdsInsightNameIllFormedRowCount, CommitTestResultListResponseItemsGoalThresholdsInsightNameIsCode, CommitTestResultListResponseItemsGoalThresholdsInsightNameIsJson, CommitTestResultListResponseItemsGoalThresholdsInsightNameLlmRubricV2, CommitTestResultListResponseItemsGoalThresholdsInsightNameLabelDrift, CommitTestResultListResponseItemsGoalThresholdsInsightNameMetrics, CommitTestResultListResponseItemsGoalThresholdsInsightNameNewCategories, CommitTestResultListResponseItemsGoalThresholdsInsightNameNewLabels, CommitTestResultListResponseItemsGoalThresholdsInsightNameNullRowCount, CommitTestResultListResponseItemsGoalThresholdsInsightNamePpScore, CommitTestResultListResponseItemsGoalThresholdsInsightNameQuasiConstantFeatures, CommitTestResultListResponseItemsGoalThresholdsInsightNameSentenceLength, CommitTestResultListResponseItemsGoalThresholdsInsightNameSizeRatio, CommitTestResultListResponseItemsGoalThresholdsInsightNameSpecialCharacters, CommitTestResultListResponseItemsGoalThresholdsInsightNameStringValidation, CommitTestResultListResponseItemsGoalThresholdsInsightNameTrainValLeakageRowCount:
367+
return true
368+
}
369+
return false
370+
}
371+
322372
type CommitTestResultListResponseItemsGoalThresholdsInsightParameter struct {
323373
// The name of the insight filter.
324374
Name string `json:"name,required"`

0 commit comments

Comments
 (0)