Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.1.0-alpha.10 #62

Merged
merged 6 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.9"
".": "0.1.0-alpha.10"
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- x-release-please-start-version -->

[![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)

<!-- x-release-please-end -->

Expand All @@ -27,7 +27,7 @@ The REST API documentation can be found on [openlayer.com](https://openlayer.co
<!-- x-release-please-start-version -->

```kotlin
implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.9")
implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.10")
```

#### Maven
Expand All @@ -36,7 +36,7 @@ implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.9")
<dependency>
<groupId>com.openlayer.api</groupId>
<artifactId>openlayer-java</artifactId>
<version>0.1.0-alpha.9</version>
<version>0.1.0-alpha.10</version>
</dependency>
```

Expand Down Expand Up @@ -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);
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}


Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -240,29 +238,17 @@ constructor(

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = 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))
}
Expand Down Expand Up @@ -305,39 +291,39 @@ constructor(
}

fun asString(): String = _value().asStringOrThrow()
}

class Type
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = 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<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = 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))
}
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,29 +391,17 @@ private constructor(

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = 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))
}
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,9 @@ private constructor(

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<Boolean> = 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))
}
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading