Skip to content
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.7.2"
".": "0.7.3"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.7.3 (2024-12-11)

Full Changelog: [v0.7.2...v0.7.3](https://github.com/openai/openai-java/compare/v0.7.2...v0.7.3)

### Chores

* **internal:** remove unused imports ([#38](https://github.com/openai/openai-java/issues/38)) ([021177f](https://github.com/openai/openai-java/commit/021177f995fb11e9a17ebf3950e0d46591e3c354))


### Styles

* **internal:** make enum value definitions less verbose ([#35](https://github.com/openai/openai-java/issues/35)) ([1effd49](https://github.com/openai/openai-java/commit/1effd49f5c1585c54e46454945df3fe2314ef05d))
* **internal:** move enum identity methods to bottom of class ([#37](https://github.com/openai/openai-java/issues/37)) ([7a9d27a](https://github.com/openai/openai-java/commit/7a9d27a7ef5d59f78479e1af83a980eb52097fcc))

## 0.7.2 (2024-12-11)

Full Changelog: [v0.7.1...v0.7.2](https://github.com/openai/openai-java/compare/v0.7.1...v0.7.2)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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

[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.7.2)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.7.3)

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

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

```kotlin
implementation("com.openai:openai-java:0.7.2")
implementation("com.openai:openai-java:0.7.3")
```

#### Maven
Expand All @@ -39,7 +39,7 @@ implementation("com.openai:openai-java:0.7.2")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>0.7.2</version>
<version>0.7.3</version>
</dependency>
```

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.openai"
version = "0.7.2" // x-release-please-version
version = "0.7.3" // x-release-please-version
}


62 changes: 31 additions & 31 deletions openai-java-core/src/main/kotlin/com/openai/models/Batch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -466,21 +466,9 @@ 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 Object && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()

companion object {

@JvmField val BATCH = Object(JsonField.of("batch"))
@JvmField val BATCH = of("batch")

@JvmStatic fun of(value: String) = Object(JsonField.of(value))
}
Expand All @@ -507,45 +495,45 @@ private constructor(
}

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

class Status
@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 Status && value == other.value /* spotless:on */
return /* spotless:off */ other is Object && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

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

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

companion object {

@JvmField val VALIDATING = Status(JsonField.of("validating"))
@JvmField val VALIDATING = of("validating")

@JvmField val FAILED = Status(JsonField.of("failed"))
@JvmField val FAILED = of("failed")

@JvmField val IN_PROGRESS = Status(JsonField.of("in_progress"))
@JvmField val IN_PROGRESS = of("in_progress")

@JvmField val FINALIZING = Status(JsonField.of("finalizing"))
@JvmField val FINALIZING = of("finalizing")

@JvmField val COMPLETED = Status(JsonField.of("completed"))
@JvmField val COMPLETED = of("completed")

@JvmField val EXPIRED = Status(JsonField.of("expired"))
@JvmField val EXPIRED = of("expired")

@JvmField val CANCELLING = Status(JsonField.of("cancelling"))
@JvmField val CANCELLING = of("cancelling")

@JvmField val CANCELLED = Status(JsonField.of("cancelled"))
@JvmField val CANCELLED = of("cancelled")

@JvmStatic fun of(value: String) = Status(JsonField.of(value))
}
Expand Down Expand Up @@ -600,6 +588,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 = Errors.Builder::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,21 +411,9 @@ 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 CompletionWindow && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()

companion object {

@JvmField val _24H = CompletionWindow(JsonField.of("24h"))
@JvmField val _24H = of("24h")

@JvmStatic fun of(value: String) = CompletionWindow(JsonField.of(value))
}
Expand All @@ -452,35 +440,35 @@ constructor(
}

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

class Endpoint
@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 Endpoint && value == other.value /* spotless:on */
return /* spotless:off */ other is CompletionWindow && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

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

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

companion object {

@JvmField val V1_CHAT_COMPLETIONS = Endpoint(JsonField.of("/v1/chat/completions"))
@JvmField val V1_CHAT_COMPLETIONS = of("/v1/chat/completions")

@JvmField val V1_EMBEDDINGS = Endpoint(JsonField.of("/v1/embeddings"))
@JvmField val V1_EMBEDDINGS = of("/v1/embeddings")

@JvmField val V1_COMPLETIONS = Endpoint(JsonField.of("/v1/completions"))
@JvmField val V1_COMPLETIONS = of("/v1/completions")

@JvmStatic fun of(value: String) = Endpoint(JsonField.of(value))
}
Expand Down Expand Up @@ -515,6 +503,18 @@ constructor(
}

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

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is Endpoint && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

/** Optional custom metadata for the batch. */
Expand Down
Loading
Loading