diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 46b9b6b..3b005e5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.9" + ".": "0.1.0-alpha.10" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index dba06c6..b65d6ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 0.1.0-alpha.10 (2024-12-13) + +Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/openlayer-ai/openlayer-java/compare/v0.1.0-alpha.9...v0.1.0-alpha.10) + +### Chores + +* **internal:** codegen related update ([#66](https://github.com/openlayer-ai/openlayer-java/issues/66)) ([0a31936](https://github.com/openlayer-ai/openlayer-java/commit/0a319360b98f225d92d3fc31ad49db5eed2b88e7)) +* **internal:** remove unused imports ([#65](https://github.com/openlayer-ai/openlayer-java/issues/65)) ([cfb5af8](https://github.com/openlayer-ai/openlayer-java/commit/cfb5af80bc1435706e38760b5448dd079036edf7)) +* update example values in tests and docs ([#61](https://github.com/openlayer-ai/openlayer-java/issues/61)) ([4737582](https://github.com/openlayer-ai/openlayer-java/commit/4737582a254bb1ae0d9905394c3cb550552b3286)) + + +### Styles + +* **internal:** make enum value definitions less verbose ([#63](https://github.com/openlayer-ai/openlayer-java/issues/63)) ([445cf02](https://github.com/openlayer-ai/openlayer-java/commit/445cf0268a084c9d27f47004fc22a8d6fcfa34e9)) +* **internal:** move enum identity methods to bottom of class ([#64](https://github.com/openlayer-ai/openlayer-java/issues/64)) ([1be25e8](https://github.com/openlayer-ai/openlayer-java/commit/1be25e83f73636cca43eb945223b78ff2eb94849)) + ## 0.1.0-alpha.9 (2024-12-11) Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/openlayer-ai/openlayer-java/compare/v0.1.0-alpha.8...v0.1.0-alpha.9) diff --git a/README.md b/README.md index d1c0f19..600fab6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.openlayer.api/openlayer-java)](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.1.0-alpha.9) +[![Maven Central](https://img.shields.io/maven-central/v/com.openlayer.api/openlayer-java)](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.1.0-alpha.10) @@ -27,7 +27,7 @@ The REST API documentation can be foundĀ on [openlayer.com](https://openlayer.co ```kotlin -implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.9") +implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.10") ``` #### Maven @@ -36,7 +36,7 @@ implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.9") com.openlayer.api openlayer-java - 0.1.0-alpha.9 + 0.1.0-alpha.10 ``` @@ -79,13 +79,19 @@ import java.util.List; InferencePipelineDataStreamParams params = InferencePipelineDataStreamParams.builder() .inferencePipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .config(InferencePipelineDataStreamParams.Config.ofLlmData(InferencePipelineDataStreamParams.Config.LlmData.builder() - .outputColumnName("output") - .costColumnName("cost") .inputVariableNames(List.of("user_query")) + .outputColumnName("output") .numOfTokenColumnName("tokens") + .costColumnName("cost") .timestampColumnName("timestamp") .build())) - .row(List.of(InferencePipelineDataStreamParams.Row.builder().build())) + .row(List.of(InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("what is the meaning of life?")) + .putAdditionalProperty("output", JsonValue.from("42")) + .putAdditionalProperty("tokens", JsonValue.from(7)) + .putAdditionalProperty("cost", JsonValue.from(0.02)) + .putAdditionalProperty("timestamp", JsonValue.from(1610000000)) + .build())) .build(); InferencePipelineDataStreamResponse response = client.inferencePipelines().data().stream(params); ``` diff --git a/build.gradle.kts b/build.gradle.kts index e9d7c64..f485855 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { allprojects { group = "com.openlayer.api" - version = "0.1.0-alpha.9" // x-release-please-version + version = "0.1.0-alpha.10" // x-release-please-version } diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt index f9c3b57..b7d18d4 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt @@ -2,8 +2,10 @@ package com.openlayer.api.client -import com.openlayer.api.models.* -import com.openlayer.api.services.blocking.* +import com.openlayer.api.services.blocking.CommitService +import com.openlayer.api.services.blocking.InferencePipelineService +import com.openlayer.api.services.blocking.ProjectService +import com.openlayer.api.services.blocking.StorageService interface OpenlayerClient { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt index 620db2d..d9a6d7a 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt @@ -2,8 +2,10 @@ package com.openlayer.api.client -import com.openlayer.api.models.* -import com.openlayer.api.services.async.* +import com.openlayer.api.services.async.CommitServiceAsync +import com.openlayer.api.services.async.InferencePipelineServiceAsync +import com.openlayer.api.services.async.ProjectServiceAsync +import com.openlayer.api.services.async.StorageServiceAsync interface OpenlayerClientAsync { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt index 869906f..9335e18 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt @@ -4,8 +4,14 @@ package com.openlayer.api.client import com.openlayer.api.core.ClientOptions import com.openlayer.api.core.getPackageVersion -import com.openlayer.api.models.* -import com.openlayer.api.services.async.* +import com.openlayer.api.services.async.CommitServiceAsync +import com.openlayer.api.services.async.CommitServiceAsyncImpl +import com.openlayer.api.services.async.InferencePipelineServiceAsync +import com.openlayer.api.services.async.InferencePipelineServiceAsyncImpl +import com.openlayer.api.services.async.ProjectServiceAsync +import com.openlayer.api.services.async.ProjectServiceAsyncImpl +import com.openlayer.api.services.async.StorageServiceAsync +import com.openlayer.api.services.async.StorageServiceAsyncImpl class OpenlayerClientAsyncImpl constructor( diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt index 47335ac..4577ea4 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt @@ -4,8 +4,14 @@ package com.openlayer.api.client import com.openlayer.api.core.ClientOptions import com.openlayer.api.core.getPackageVersion -import com.openlayer.api.models.* -import com.openlayer.api.services.blocking.* +import com.openlayer.api.services.blocking.CommitService +import com.openlayer.api.services.blocking.CommitServiceImpl +import com.openlayer.api.services.blocking.InferencePipelineService +import com.openlayer.api.services.blocking.InferencePipelineServiceImpl +import com.openlayer.api.services.blocking.ProjectService +import com.openlayer.api.services.blocking.ProjectServiceImpl +import com.openlayer.api.services.blocking.StorageService +import com.openlayer.api.services.blocking.StorageServiceImpl class OpenlayerClientImpl constructor( diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt index 8a59633..483a9ee 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt @@ -5,12 +5,10 @@ package com.openlayer.api.models import com.fasterxml.jackson.annotation.JsonCreator import com.openlayer.api.core.Enum import com.openlayer.api.core.JsonField -import com.openlayer.api.core.JsonValue import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.errors.OpenlayerInvalidDataException -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional @@ -240,29 +238,17 @@ constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PASSING = Status(JsonField.of("passing")) + @JvmField val PASSING = of("passing") - @JvmField val FAILING = Status(JsonField.of("failing")) + @JvmField val FAILING = of("failing") - @JvmField val SKIPPED = Status(JsonField.of("skipped")) + @JvmField val SKIPPED = of("skipped") - @JvmField val ERROR = Status(JsonField.of("error")) + @JvmField val ERROR = of("error") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -305,39 +291,39 @@ constructor( } fun asString(): String = _value().asStringOrThrow() - } - - class Type - @JsonCreator - private constructor( - private val value: JsonField, - ) : Enum { - - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value override fun equals(other: Any?): Boolean { if (this === other) { return true } - return /* spotless:off */ other is Type && value == other.value /* spotless:on */ + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() override fun toString() = value.toString() + } + + class Type + @JsonCreator + private constructor( + private val value: JsonField, + ) : Enum { + + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value companion object { - @JvmField val INTEGRITY = Type(JsonField.of("integrity")) + @JvmField val INTEGRITY = of("integrity") - @JvmField val CONSISTENCY = Type(JsonField.of("consistency")) + @JvmField val CONSISTENCY = of("consistency") - @JvmField val PERFORMANCE = Type(JsonField.of("performance")) + @JvmField val PERFORMANCE = of("performance") - @JvmField val FAIRNESS = Type(JsonField.of("fairness")) + @JvmField val FAIRNESS = of("fairness") - @JvmField val ROBUSTNESS = Type(JsonField.of("robustness")) + @JvmField val ROBUSTNESS = of("robustness") @JvmStatic fun of(value: String) = Type(JsonField.of(value)) } @@ -380,6 +366,18 @@ constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt index f56cb31..3587359 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt @@ -391,29 +391,17 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PASSING = Status(JsonField.of("passing")) + @JvmField val PASSING = of("passing") - @JvmField val FAILING = Status(JsonField.of("failing")) + @JvmField val FAILING = of("failing") - @JvmField val SKIPPED = Status(JsonField.of("skipped")) + @JvmField val SKIPPED = of("skipped") - @JvmField val ERROR = Status(JsonField.of("error")) + @JvmField val ERROR = of("error") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -456,6 +444,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } @JsonDeserialize(builder = Goal.Builder::class) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt index e1420c4..a24bf98 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParams.kt @@ -24,7 +24,6 @@ import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.core.toImmutable import com.openlayer.api.errors.OpenlayerInvalidDataException -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamResponse.kt index df9b175..4f6cbe7 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDataStreamResponse.kt @@ -94,21 +94,9 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Success && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val TRUE = Success(JsonField.of(true)) + @JvmField val TRUE = of(true) @JvmStatic fun of(value: Boolean) = Success(JsonField.of(value)) } @@ -135,6 +123,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Success && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDeleteParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDeleteParams.kt index 0e5e34d..8046a96 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDeleteParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineDeleteParams.kt @@ -7,7 +7,6 @@ import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.core.toImmutable -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParams.kt index cdd340d..2dfa188 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParams.kt @@ -5,7 +5,6 @@ package com.openlayer.api.models import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import java.util.Objects class InferencePipelineRetrieveParams diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveResponse.kt index be0f1d5..bfd6a1e 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveResponse.kt @@ -478,31 +478,19 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val QUEUED = Status(JsonField.of("queued")) + @JvmField val QUEUED = of("queued") - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PAUSED = Status(JsonField.of("paused")) + @JvmField val PAUSED = of("paused") - @JvmField val FAILED = Status(JsonField.of("failed")) + @JvmField val FAILED = of("failed") - @JvmField val COMPLETED = Status(JsonField.of("completed")) + @JvmField val COMPLETED = of("completed") - @JvmField val UNKNOWN = Status(JsonField.of("unknown")) + @JvmField val UNKNOWN = of("unknown") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -549,6 +537,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParams.kt index b8124f7..763d801 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParams.kt @@ -12,7 +12,6 @@ import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.core.toImmutable -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateResponse.kt index f1558f5..48e69d5 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateResponse.kt @@ -93,21 +93,9 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Success && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val TRUE = Success(JsonField.of(true)) + @JvmField val TRUE = of(true) @JvmStatic fun of(value: Boolean) = Success(JsonField.of(value)) } @@ -134,6 +122,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Success && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParams.kt index cacc236..4a8df2d 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParams.kt @@ -5,12 +5,10 @@ package com.openlayer.api.models import com.fasterxml.jackson.annotation.JsonCreator import com.openlayer.api.core.Enum import com.openlayer.api.core.JsonField -import com.openlayer.api.core.JsonValue import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.errors.OpenlayerInvalidDataException -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional @@ -233,29 +231,17 @@ constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PASSING = Status(JsonField.of("passing")) + @JvmField val PASSING = of("passing") - @JvmField val FAILING = Status(JsonField.of("failing")) + @JvmField val FAILING = of("failing") - @JvmField val SKIPPED = Status(JsonField.of("skipped")) + @JvmField val SKIPPED = of("skipped") - @JvmField val ERROR = Status(JsonField.of("error")) + @JvmField val ERROR = of("error") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -298,39 +284,39 @@ constructor( } fun asString(): String = _value().asStringOrThrow() - } - - class Type - @JsonCreator - private constructor( - private val value: JsonField, - ) : Enum { - - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value override fun equals(other: Any?): Boolean { if (this === other) { return true } - return /* spotless:off */ other is Type && value == other.value /* spotless:on */ + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() override fun toString() = value.toString() + } + + class Type + @JsonCreator + private constructor( + private val value: JsonField, + ) : Enum { + + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value companion object { - @JvmField val INTEGRITY = Type(JsonField.of("integrity")) + @JvmField val INTEGRITY = of("integrity") - @JvmField val CONSISTENCY = Type(JsonField.of("consistency")) + @JvmField val CONSISTENCY = of("consistency") - @JvmField val PERFORMANCE = Type(JsonField.of("performance")) + @JvmField val PERFORMANCE = of("performance") - @JvmField val FAIRNESS = Type(JsonField.of("fairness")) + @JvmField val FAIRNESS = of("fairness") - @JvmField val ROBUSTNESS = Type(JsonField.of("robustness")) + @JvmField val ROBUSTNESS = of("robustness") @JvmStatic fun of(value: String) = Type(JsonField.of(value)) } @@ -373,6 +359,18 @@ constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponse.kt index 3064e4f..eea537a 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponse.kt @@ -393,29 +393,17 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PASSING = Status(JsonField.of("passing")) + @JvmField val PASSING = of("passing") - @JvmField val FAILING = Status(JsonField.of("failing")) + @JvmField val FAILING = of("failing") - @JvmField val SKIPPED = Status(JsonField.of("skipped")) + @JvmField val SKIPPED = of("skipped") - @JvmField val ERROR = Status(JsonField.of("error")) + @JvmField val ERROR = of("error") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -458,6 +446,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } @JsonDeserialize(builder = Goal.Builder::class) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateParams.kt index 35d2a56..14da868 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateParams.kt @@ -12,7 +12,6 @@ import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.core.toImmutable -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateResponse.kt index f026d6f..3c952f1 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateResponse.kt @@ -477,31 +477,19 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val QUEUED = Status(JsonField.of("queued")) + @JvmField val QUEUED = of("queued") - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PAUSED = Status(JsonField.of("paused")) + @JvmField val PAUSED = of("paused") - @JvmField val FAILED = Status(JsonField.of("failed")) + @JvmField val FAILED = of("failed") - @JvmField val COMPLETED = Status(JsonField.of("completed")) + @JvmField val COMPLETED = of("completed") - @JvmField val UNKNOWN = Status(JsonField.of("unknown")) + @JvmField val UNKNOWN = of("unknown") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -548,6 +536,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitCreateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitCreateParams.kt index 7b7c170..ebdccfc 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitCreateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitCreateParams.kt @@ -16,7 +16,6 @@ import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.core.toImmutable import com.openlayer.api.errors.OpenlayerInvalidDataException -import com.openlayer.api.models.* import java.time.OffsetDateTime import java.util.Objects import java.util.Optional @@ -571,31 +570,19 @@ constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val QUEUED = Status(JsonField.of("queued")) + @JvmField val QUEUED = of("queued") - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PAUSED = Status(JsonField.of("paused")) + @JvmField val PAUSED = of("paused") - @JvmField val FAILED = Status(JsonField.of("failed")) + @JvmField val FAILED = of("failed") - @JvmField val COMPLETED = Status(JsonField.of("completed")) + @JvmField val COMPLETED = of("completed") - @JvmField val UNKNOWN = Status(JsonField.of("unknown")) + @JvmField val UNKNOWN = of("unknown") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -642,6 +629,18 @@ constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } @JsonDeserialize(builder = Links.Builder::class) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitCreateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitCreateResponse.kt index e30f951..70d132a 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitCreateResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitCreateResponse.kt @@ -767,31 +767,19 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val QUEUED = Status(JsonField.of("queued")) + @JvmField val QUEUED = of("queued") - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PAUSED = Status(JsonField.of("paused")) + @JvmField val PAUSED = of("paused") - @JvmField val FAILED = Status(JsonField.of("failed")) + @JvmField val FAILED = of("failed") - @JvmField val COMPLETED = Status(JsonField.of("completed")) + @JvmField val COMPLETED = of("completed") - @JvmField val UNKNOWN = Status(JsonField.of("unknown")) + @JvmField val UNKNOWN = of("unknown") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -838,6 +826,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } @JsonDeserialize(builder = Links.Builder::class) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListParams.kt index 10190f7..ac2859d 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListParams.kt @@ -5,7 +5,6 @@ package com.openlayer.api.models import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListResponse.kt index 86cc5fc..757b7f1 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListResponse.kt @@ -847,31 +847,19 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val QUEUED = Status(JsonField.of("queued")) + @JvmField val QUEUED = of("queued") - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PAUSED = Status(JsonField.of("paused")) + @JvmField val PAUSED = of("paused") - @JvmField val FAILED = Status(JsonField.of("failed")) + @JvmField val FAILED = of("failed") - @JvmField val COMPLETED = Status(JsonField.of("completed")) + @JvmField val COMPLETED = of("completed") - @JvmField val UNKNOWN = Status(JsonField.of("unknown")) + @JvmField val UNKNOWN = of("unknown") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -918,6 +906,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } @JsonDeserialize(builder = Links.Builder::class) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCreateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCreateParams.kt index 0d2032b..d4130bd 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCreateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCreateParams.kt @@ -16,7 +16,6 @@ import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.core.toImmutable import com.openlayer.api.errors.OpenlayerInvalidDataException -import com.openlayer.api.models.* import java.time.OffsetDateTime import java.util.Objects import java.util.Optional @@ -402,25 +401,13 @@ constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Source && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val WEB = Source(JsonField.of("web")) + @JvmField val WEB = of("web") - @JvmField val API = Source(JsonField.of("api")) + @JvmField val API = of("api") - @JvmField val NULL = Source(JsonField.of("null")) + @JvmField val NULL = of("null") @JvmStatic fun of(value: String) = Source(JsonField.of(value)) } @@ -455,37 +442,37 @@ constructor( } fun asString(): String = _value().asStringOrThrow() - } - - class TaskType - @JsonCreator - private constructor( - private val value: JsonField, - ) : Enum { - - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value override fun equals(other: Any?): Boolean { if (this === other) { return true } - return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */ + return /* spotless:off */ other is Source && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() override fun toString() = value.toString() + } + + class TaskType + @JsonCreator + private constructor( + private val value: JsonField, + ) : Enum { + + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value companion object { - @JvmField val LLM_BASE = TaskType(JsonField.of("llm-base")) + @JvmField val LLM_BASE = of("llm-base") - @JvmField val TABULAR_CLASSIFICATION = TaskType(JsonField.of("tabular-classification")) + @JvmField val TABULAR_CLASSIFICATION = of("tabular-classification") - @JvmField val TABULAR_REGRESSION = TaskType(JsonField.of("tabular-regression")) + @JvmField val TABULAR_REGRESSION = of("tabular-regression") - @JvmField val TEXT_CLASSIFICATION = TaskType(JsonField.of("text-classification")) + @JvmField val TEXT_CLASSIFICATION = of("text-classification") @JvmStatic fun of(value: String) = TaskType(JsonField.of(value)) } @@ -524,6 +511,18 @@ constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } @JsonDeserialize(builder = GitRepo.Builder::class) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCreateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCreateResponse.kt index 97a47a2..284779d 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCreateResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCreateResponse.kt @@ -486,25 +486,13 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Source && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val WEB = Source(JsonField.of("web")) + @JvmField val WEB = of("web") - @JvmField val API = Source(JsonField.of("api")) + @JvmField val API = of("api") - @JvmField val NULL = Source(JsonField.of("null")) + @JvmField val NULL = of("null") @JvmStatic fun of(value: String) = Source(JsonField.of(value)) } @@ -539,37 +527,37 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() - } - - class TaskType - @JsonCreator - private constructor( - private val value: JsonField, - ) : Enum { - - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value override fun equals(other: Any?): Boolean { if (this === other) { return true } - return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */ + return /* spotless:off */ other is Source && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() override fun toString() = value.toString() + } + + class TaskType + @JsonCreator + private constructor( + private val value: JsonField, + ) : Enum { + + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value companion object { - @JvmField val LLM_BASE = TaskType(JsonField.of("llm-base")) + @JvmField val LLM_BASE = of("llm-base") - @JvmField val TABULAR_CLASSIFICATION = TaskType(JsonField.of("tabular-classification")) + @JvmField val TABULAR_CLASSIFICATION = of("tabular-classification") - @JvmField val TABULAR_REGRESSION = TaskType(JsonField.of("tabular-regression")) + @JvmField val TABULAR_REGRESSION = of("tabular-regression") - @JvmField val TEXT_CLASSIFICATION = TaskType(JsonField.of("text-classification")) + @JvmField val TEXT_CLASSIFICATION = of("text-classification") @JvmStatic fun of(value: String) = TaskType(JsonField.of(value)) } @@ -608,6 +596,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } @JsonDeserialize(builder = GitRepo.Builder::class) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateParams.kt index 2232cd1..90e35ca 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateParams.kt @@ -16,7 +16,6 @@ import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.core.toImmutable import com.openlayer.api.errors.OpenlayerInvalidDataException -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional @@ -400,31 +399,19 @@ constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val QUEUED = Status(JsonField.of("queued")) + @JvmField val QUEUED = of("queued") - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PAUSED = Status(JsonField.of("paused")) + @JvmField val PAUSED = of("paused") - @JvmField val FAILED = Status(JsonField.of("failed")) + @JvmField val FAILED = of("failed") - @JvmField val COMPLETED = Status(JsonField.of("completed")) + @JvmField val COMPLETED = of("completed") - @JvmField val UNKNOWN = Status(JsonField.of("unknown")) + @JvmField val UNKNOWN = of("unknown") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -471,6 +458,18 @@ constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateResponse.kt index 0ff2530..e7d3a0e 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateResponse.kt @@ -479,31 +479,19 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val QUEUED = Status(JsonField.of("queued")) + @JvmField val QUEUED = of("queued") - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PAUSED = Status(JsonField.of("paused")) + @JvmField val PAUSED = of("paused") - @JvmField val FAILED = Status(JsonField.of("failed")) + @JvmField val FAILED = of("failed") - @JvmField val COMPLETED = Status(JsonField.of("completed")) + @JvmField val COMPLETED = of("completed") - @JvmField val UNKNOWN = Status(JsonField.of("unknown")) + @JvmField val UNKNOWN = of("unknown") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -550,6 +538,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParams.kt index a4baf79..6aa853f 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParams.kt @@ -5,7 +5,6 @@ package com.openlayer.api.models import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponse.kt index daac734..4cb5983 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponse.kt @@ -555,31 +555,19 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Status && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val QUEUED = Status(JsonField.of("queued")) + @JvmField val QUEUED = of("queued") - @JvmField val RUNNING = Status(JsonField.of("running")) + @JvmField val RUNNING = of("running") - @JvmField val PAUSED = Status(JsonField.of("paused")) + @JvmField val PAUSED = of("paused") - @JvmField val FAILED = Status(JsonField.of("failed")) + @JvmField val FAILED = of("failed") - @JvmField val COMPLETED = Status(JsonField.of("completed")) + @JvmField val COMPLETED = of("completed") - @JvmField val UNKNOWN = Status(JsonField.of("unknown")) + @JvmField val UNKNOWN = of("unknown") @JvmStatic fun of(value: String) = Status(JsonField.of(value)) } @@ -626,6 +614,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListParams.kt index d5aeedf..c4959e4 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListParams.kt @@ -5,12 +5,10 @@ package com.openlayer.api.models import com.fasterxml.jackson.annotation.JsonCreator import com.openlayer.api.core.Enum import com.openlayer.api.core.JsonField -import com.openlayer.api.core.JsonValue import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.errors.OpenlayerInvalidDataException -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional @@ -205,27 +203,15 @@ constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val LLM_BASE = TaskType(JsonField.of("llm-base")) + @JvmField val LLM_BASE = of("llm-base") - @JvmField val TABULAR_CLASSIFICATION = TaskType(JsonField.of("tabular-classification")) + @JvmField val TABULAR_CLASSIFICATION = of("tabular-classification") - @JvmField val TABULAR_REGRESSION = TaskType(JsonField.of("tabular-regression")) + @JvmField val TABULAR_REGRESSION = of("tabular-regression") - @JvmField val TEXT_CLASSIFICATION = TaskType(JsonField.of("text-classification")) + @JvmField val TEXT_CLASSIFICATION = of("text-classification") @JvmStatic fun of(value: String) = TaskType(JsonField.of(value)) } @@ -264,6 +250,18 @@ constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } override fun equals(other: Any?): Boolean { diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListResponse.kt index 1876dfc..df9e294 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListResponse.kt @@ -562,25 +562,13 @@ private constructor( @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is Source && value == other.value /* spotless:on */ - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - companion object { - @JvmField val WEB = Source(JsonField.of("web")) + @JvmField val WEB = of("web") - @JvmField val API = Source(JsonField.of("api")) + @JvmField val API = of("api") - @JvmField val NULL = Source(JsonField.of("null")) + @JvmField val NULL = of("null") @JvmStatic fun of(value: String) = Source(JsonField.of(value)) } @@ -615,38 +603,37 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() - } - - class TaskType - @JsonCreator - private constructor( - private val value: JsonField, - ) : Enum { - - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value override fun equals(other: Any?): Boolean { if (this === other) { return true } - return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */ + return /* spotless:off */ other is Source && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() override fun toString() = value.toString() + } + + class TaskType + @JsonCreator + private constructor( + private val value: JsonField, + ) : Enum { + + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value companion object { - @JvmField val LLM_BASE = TaskType(JsonField.of("llm-base")) + @JvmField val LLM_BASE = of("llm-base") - @JvmField - val TABULAR_CLASSIFICATION = TaskType(JsonField.of("tabular-classification")) + @JvmField val TABULAR_CLASSIFICATION = of("tabular-classification") - @JvmField val TABULAR_REGRESSION = TaskType(JsonField.of("tabular-regression")) + @JvmField val TABULAR_REGRESSION = of("tabular-regression") - @JvmField val TEXT_CLASSIFICATION = TaskType(JsonField.of("text-classification")) + @JvmField val TEXT_CLASSIFICATION = of("text-classification") @JvmStatic fun of(value: String) = TaskType(JsonField.of(value)) } @@ -685,6 +672,18 @@ private constructor( } fun asString(): String = _value().asStringOrThrow() + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */ + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } @JsonDeserialize(builder = GitRepo.Builder::class) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/StoragePresignedUrlCreateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/StoragePresignedUrlCreateParams.kt index 16880ef..e1d6917 100644 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/StoragePresignedUrlCreateParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/StoragePresignedUrlCreateParams.kt @@ -7,7 +7,6 @@ import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.http.Headers import com.openlayer.api.core.http.QueryParams import com.openlayer.api.core.toImmutable -import com.openlayer.api.models.* import java.util.Objects import java.util.Optional diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/CommitTestResultListParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/CommitTestResultListParamsTest.kt index 634ca72..2982dc9 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/CommitTestResultListParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/CommitTestResultListParamsTest.kt @@ -3,7 +3,6 @@ package com.openlayer.api.models import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParamsTest.kt index de558c5..3c97a0d 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineDataStreamParamsTest.kt @@ -3,7 +3,6 @@ package com.openlayer.api.models import com.openlayer.api.core.JsonValue -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -21,10 +20,10 @@ class InferencePipelineDataStreamParamsTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt.builder() @@ -38,7 +37,17 @@ class InferencePipelineDataStreamParamsTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() } @@ -55,10 +64,10 @@ class InferencePipelineDataStreamParamsTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -73,7 +82,17 @@ class InferencePipelineDataStreamParamsTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() val body = params.getBody() assertThat(body).isNotNull @@ -86,10 +105,10 @@ class InferencePipelineDataStreamParamsTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt.builder() @@ -104,7 +123,17 @@ class InferencePipelineDataStreamParamsTest { ) ) assertThat(body.rows()) - .isEqualTo(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .isEqualTo( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) } @Test @@ -119,7 +148,17 @@ class InferencePipelineDataStreamParamsTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() val body = params.getBody() assertThat(body).isNotNull @@ -132,7 +171,17 @@ class InferencePipelineDataStreamParamsTest { ) ) assertThat(body.rows()) - .isEqualTo(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .isEqualTo( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) } @Test @@ -147,7 +196,17 @@ class InferencePipelineDataStreamParamsTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() assertThat(params).isNotNull // path param "inferencePipelineId" diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineDeleteParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineDeleteParamsTest.kt index 8ee3a33..7e24f8e 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineDeleteParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineDeleteParamsTest.kt @@ -2,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParamsTest.kt index 663b546..9becd92 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParamsTest.kt @@ -2,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParamsTest.kt index 85150f7..83221bf 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParamsTest.kt @@ -4,7 +4,6 @@ package com.openlayer.api.models import com.openlayer.api.core.JsonValue import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParamsTest.kt index b008ba0..b15691d 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParamsTest.kt @@ -3,7 +3,6 @@ package com.openlayer.api.models import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineUpdateParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineUpdateParamsTest.kt index ffecf85..961e64b 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineUpdateParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineUpdateParamsTest.kt @@ -2,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitCreateParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitCreateParamsTest.kt index 5eefc1e..40af250 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitCreateParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitCreateParamsTest.kt @@ -2,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.models.* import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -93,8 +92,12 @@ class ProjectCommitCreateParamsTest { ProjectCommitCreateParams.Commit.builder() .id("3fa85f64-5717-4562-b3fc-2c963f66afa6") .authorId("589ece63-49a2-41b4-98e1-10547761d4b0") + .fileSize(1024L) .message("Updated the prompt.") + .mlModelId("3fa85f64-5717-4562-b3fc-2c963f66afa6") .storageUri("s3://...") + .trainingDatasetId("3fa85f64-5717-4562-b3fc-2c963f66afa6") + .validationDatasetId("3fa85f64-5717-4562-b3fc-2c963f66afa6") .build() ) .storageUri("s3://...") @@ -106,8 +109,12 @@ class ProjectCommitCreateParamsTest { ProjectCommitCreateParams.Commit.builder() .id("3fa85f64-5717-4562-b3fc-2c963f66afa6") .authorId("589ece63-49a2-41b4-98e1-10547761d4b0") + .fileSize(1024L) .message("Updated the prompt.") + .mlModelId("3fa85f64-5717-4562-b3fc-2c963f66afa6") .storageUri("s3://...") + .trainingDatasetId("3fa85f64-5717-4562-b3fc-2c963f66afa6") + .validationDatasetId("3fa85f64-5717-4562-b3fc-2c963f66afa6") .build() ) assertThat(body.storageUri()).isEqualTo("s3://...") @@ -122,8 +129,12 @@ class ProjectCommitCreateParamsTest { ProjectCommitCreateParams.Commit.builder() .id("3fa85f64-5717-4562-b3fc-2c963f66afa6") .authorId("589ece63-49a2-41b4-98e1-10547761d4b0") + .fileSize(1024L) .message("Updated the prompt.") + .mlModelId("3fa85f64-5717-4562-b3fc-2c963f66afa6") .storageUri("s3://...") + .trainingDatasetId("3fa85f64-5717-4562-b3fc-2c963f66afa6") + .validationDatasetId("3fa85f64-5717-4562-b3fc-2c963f66afa6") .build() ) .storageUri("s3://...") diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListParamsTest.kt index 0a33199..563b800 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListParamsTest.kt @@ -3,7 +3,6 @@ package com.openlayer.api.models import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateParamsTest.kt index 0a0a757..2d6f944 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCreateParamsTest.kt @@ -2,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateParamsTest.kt index 0e96084..d9484ee 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineCreateParamsTest.kt @@ -2,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt index 70da9b9..951afbc 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParamsTest.kt @@ -3,7 +3,6 @@ package com.openlayer.api.models import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt index 5c74c20..f7f63bf 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListParamsTest.kt @@ -3,7 +3,6 @@ package com.openlayer.api.models import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/StoragePresignedUrlCreateParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/StoragePresignedUrlCreateParamsTest.kt index baa5e92..d62003a 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/StoragePresignedUrlCreateParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/StoragePresignedUrlCreateParamsTest.kt @@ -3,7 +3,6 @@ package com.openlayer.api.models import com.openlayer.api.core.http.QueryParams -import com.openlayer.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/ErrorHandlingTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/ErrorHandlingTest.kt index f52754e..b631154 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/ErrorHandlingTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/ErrorHandlingTest.kt @@ -4,17 +4,14 @@ package com.openlayer.api.services import com.fasterxml.jackson.databind.json.JsonMapper import com.github.tomakehurst.wiremock.client.WireMock.anyUrl -import com.github.tomakehurst.wiremock.client.WireMock.get import com.github.tomakehurst.wiremock.client.WireMock.ok import com.github.tomakehurst.wiremock.client.WireMock.post -import com.github.tomakehurst.wiremock.client.WireMock.put import com.github.tomakehurst.wiremock.client.WireMock.status import com.github.tomakehurst.wiremock.client.WireMock.stubFor import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo import com.github.tomakehurst.wiremock.junit5.WireMockTest import com.openlayer.api.client.OpenlayerClient import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.core.JsonString import com.openlayer.api.core.JsonValue import com.openlayer.api.core.http.Headers import com.openlayer.api.core.jsonMapper @@ -28,7 +25,8 @@ import com.openlayer.api.errors.RateLimitException import com.openlayer.api.errors.UnauthorizedException import com.openlayer.api.errors.UnexpectedStatusCodeException import com.openlayer.api.errors.UnprocessableEntityException -import com.openlayer.api.models.* +import com.openlayer.api.models.InferencePipelineDataStreamParams +import com.openlayer.api.models.InferencePipelineDataStreamResponse import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThatThrownBy import org.assertj.core.api.InstanceOfAssertFactories @@ -41,7 +39,7 @@ class ErrorHandlingTest { private val JSON_MAPPER: JsonMapper = jsonMapper() private val OPENLAYER_ERROR: OpenlayerError = - OpenlayerError.builder().putAdditionalProperty("key", JsonString.of("value")).build() + OpenlayerError.builder().putAdditionalProperty("key", JsonValue.from("value")).build() private lateinit var client: OpenlayerClient @@ -67,10 +65,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -85,7 +83,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() val expected = @@ -111,10 +119,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -129,7 +137,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor( @@ -156,10 +174,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -174,7 +192,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor( @@ -201,10 +229,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -219,7 +247,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor( @@ -250,10 +288,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -268,7 +306,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor( @@ -295,10 +343,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -313,7 +361,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor( @@ -344,10 +402,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -362,7 +420,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor( @@ -389,10 +457,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -407,7 +475,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor( @@ -438,10 +516,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -456,7 +534,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor( @@ -488,10 +576,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -506,7 +594,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor(post(anyUrl()).willReturn(status(200).withBody("Not JSON"))) @@ -532,10 +630,10 @@ class ErrorHandlingTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -550,7 +648,17 @@ class ErrorHandlingTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() stubFor(post(anyUrl()).willReturn(status(400).withBody("Not JSON"))) diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/ServiceParamsTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/ServiceParamsTest.kt index 4378175..1348d1b 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/ServiceParamsTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/ServiceParamsTest.kt @@ -5,22 +5,20 @@ package com.openlayer.api.services import com.fasterxml.jackson.databind.json.JsonMapper import com.github.tomakehurst.wiremock.client.WireMock.anyUrl import com.github.tomakehurst.wiremock.client.WireMock.equalTo -import com.github.tomakehurst.wiremock.client.WireMock.get import com.github.tomakehurst.wiremock.client.WireMock.matchingJsonPath import com.github.tomakehurst.wiremock.client.WireMock.ok import com.github.tomakehurst.wiremock.client.WireMock.post import com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor -import com.github.tomakehurst.wiremock.client.WireMock.put import com.github.tomakehurst.wiremock.client.WireMock.stubFor import com.github.tomakehurst.wiremock.client.WireMock.verify import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo import com.github.tomakehurst.wiremock.junit5.WireMockTest import com.openlayer.api.client.OpenlayerClient import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.core.JsonString import com.openlayer.api.core.JsonValue import com.openlayer.api.core.jsonMapper -import com.openlayer.api.models.* +import com.openlayer.api.models.InferencePipelineDataStreamParams +import com.openlayer.api.models.InferencePipelineDataStreamResponse import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -52,7 +50,7 @@ class ServiceParamsTest { val additionalBodyProperties = mutableMapOf() - additionalBodyProperties.put("testBodyProperty", JsonString.of("ghi890")) + additionalBodyProperties.put("testBodyProperty", JsonValue.from("ghi890")) val params = InferencePipelineDataStreamParams.builder() @@ -65,10 +63,10 @@ class ServiceParamsTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -83,7 +81,17 @@ class ServiceParamsTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .additionalHeaders(additionalHeaders) .additionalBodyProperties(additionalBodyProperties) .additionalQueryParams(additionalQueryParams) diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/InferencePipelineServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/InferencePipelineServiceTest.kt index d4ca7e1..ec3ccf3 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/InferencePipelineServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/InferencePipelineServiceTest.kt @@ -4,7 +4,9 @@ package com.openlayer.api.services.blocking import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.models.* +import com.openlayer.api.models.InferencePipelineDeleteParams +import com.openlayer.api.models.InferencePipelineRetrieveParams +import com.openlayer.api.models.InferencePipelineUpdateParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt index dd6703a..13aea9f 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt @@ -4,7 +4,8 @@ package com.openlayer.api.services.blocking import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.models.* +import com.openlayer.api.models.ProjectCreateParams +import com.openlayer.api.models.ProjectListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/commits/TestResultServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/commits/TestResultServiceTest.kt index 4a0d339..0cdb262 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/commits/TestResultServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/commits/TestResultServiceTest.kt @@ -4,7 +4,7 @@ package com.openlayer.api.services.blocking.commits import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.models.* +import com.openlayer.api.models.CommitTestResultListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceTest.kt index 0b70b54..1146339 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/DataServiceTest.kt @@ -5,7 +5,7 @@ package com.openlayer.api.services.blocking.inferencePipelines import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient import com.openlayer.api.core.JsonValue -import com.openlayer.api.models.* +import com.openlayer.api.models.InferencePipelineDataStreamParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -32,10 +32,10 @@ class DataServiceTest { .costColumnName("cost") .groundTruthColumnName("ground_truth") .inferenceIdColumnName("id") - .inputVariableNames(listOf("string")) + .inputVariableNames(listOf("user_query")) .latencyColumnName("latency") .metadata(JsonValue.from(mapOf())) - .numOfTokenColumnName("num_tokens") + .numOfTokenColumnName("tokens") .prompt( listOf( InferencePipelineDataStreamParams.Config.LlmData.Prompt @@ -50,7 +50,17 @@ class DataServiceTest { .build() ) ) - .rows(listOf(InferencePipelineDataStreamParams.Row.builder().build())) + .rows( + listOf( + InferencePipelineDataStreamParams.Row.builder() + .putAdditionalProperty("user_query", JsonValue.from("bar")) + .putAdditionalProperty("output", JsonValue.from("bar")) + .putAdditionalProperty("tokens", JsonValue.from("bar")) + .putAdditionalProperty("cost", JsonValue.from("bar")) + .putAdditionalProperty("timestamp", JsonValue.from("bar")) + .build() + ) + ) .build() ) println(inferencePipelineDataStreamResponse) diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/RowServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/RowServiceTest.kt index 8347fd9..eeee656 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/RowServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/RowServiceTest.kt @@ -5,7 +5,7 @@ package com.openlayer.api.services.blocking.inferencePipelines import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient import com.openlayer.api.core.JsonValue -import com.openlayer.api.models.* +import com.openlayer.api.models.InferencePipelineRowUpdateParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/TestResultServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/TestResultServiceTest.kt index fed01f2..21524e9 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/TestResultServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/inferencePipelines/TestResultServiceTest.kt @@ -4,7 +4,7 @@ package com.openlayer.api.services.blocking.inferencePipelines import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.models.* +import com.openlayer.api.models.InferencePipelineTestResultListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/CommitServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/CommitServiceTest.kt index cbedd4d..8bafae3 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/CommitServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/CommitServiceTest.kt @@ -4,7 +4,8 @@ package com.openlayer.api.services.blocking.projects import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.models.* +import com.openlayer.api.models.ProjectCommitCreateParams +import com.openlayer.api.models.ProjectCommitListParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/InferencePipelineServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/InferencePipelineServiceTest.kt index 96bcef8..c145f4f 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/InferencePipelineServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/projects/InferencePipelineServiceTest.kt @@ -4,7 +4,8 @@ package com.openlayer.api.services.blocking.projects import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.models.* +import com.openlayer.api.models.ProjectInferencePipelineCreateParams +import com.openlayer.api.models.ProjectInferencePipelineListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/storage/PresignedUrlServiceTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/storage/PresignedUrlServiceTest.kt index 558cb7c..c2986d3 100644 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/storage/PresignedUrlServiceTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/storage/PresignedUrlServiceTest.kt @@ -4,7 +4,7 @@ package com.openlayer.api.services.blocking.storage import com.openlayer.api.TestServerExtension import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient -import com.openlayer.api.models.* +import com.openlayer.api.models.StoragePresignedUrlCreateParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith