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.5.1 #22

Merged
merged 2 commits into from
Nov 26, 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.5.0"
".": "0.5.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.5.1 (2024-11-26)

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

### Chores

* **internal:** update example values ([#21](https://github.com/openai/openai-java/issues/21)) ([2270e67](https://github.com/openai/openai-java/commit/2270e676a013d9c00012757b86d9d86010c09a20))

## 0.5.0 (2024-11-25)

Full Changelog: [v0.4.0...v0.5.0](https://github.com/openai/openai-java/compare/v0.4.0...v0.5.0)
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.5.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.5.1)

<!-- 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.5.0")
implementation("com.openai:openai-java:0.5.1")
```

#### Maven
Expand All @@ -39,7 +39,7 @@ implementation("com.openai:openai-java:0.5.0")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>0.5.0</version>
<version>0.5.1</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.5.0" // x-release-please-version
version = "0.5.1" // x-release-please-version
}

nexusPublishing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class BatchErrorTest {
@Test
fun createBatchError() {
val batchError =
BatchError.builder().code("code").line(123L).message("message").param("param").build()
BatchError.builder().code("code").line(0L).message("message").param("param").build()
assertThat(batchError).isNotNull
assertThat(batchError.code()).contains("code")
assertThat(batchError.line()).contains(123L)
assertThat(batchError.line()).contains(0L)
assertThat(batchError.message()).contains("message")
assertThat(batchError.param()).contains("param")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ class BatchListParamsTest {

@Test
fun createBatchListParams() {
BatchListParams.builder().after("after").limit(123L).build()
BatchListParams.builder().after("after").limit(0L).build()
}

@Test
fun getQueryParams() {
val params = BatchListParams.builder().after("after").limit(123L).build()
val params = BatchListParams.builder().after("after").limit(0L).build()
val expected = QueryParams.builder()
expected.put("after", "after")
expected.put("limit", "123")
expected.put("limit", "0")
assertThat(params.getQueryParams()).isEqualTo(expected.build())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class BatchRequestCountsTest {
@Test
fun createBatchRequestCounts() {
val batchRequestCounts =
BatchRequestCounts.builder().completed(123L).failed(123L).total(123L).build()
BatchRequestCounts.builder().completed(0L).failed(0L).total(0L).build()
assertThat(batchRequestCounts).isNotNull
assertThat(batchRequestCounts.completed()).isEqualTo(123L)
assertThat(batchRequestCounts.failed()).isEqualTo(123L)
assertThat(batchRequestCounts.total()).isEqualTo(123L)
assertThat(batchRequestCounts.completed()).isEqualTo(0L)
assertThat(batchRequestCounts.failed()).isEqualTo(0L)
assertThat(batchRequestCounts.total()).isEqualTo(0L)
}
}
44 changes: 22 additions & 22 deletions openai-java-core/src/test/kotlin/com/openai/models/BatchTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ class BatchTest {
Batch.builder()
.id("id")
.completionWindow("completion_window")
.createdAt(123L)
.createdAt(0L)
.endpoint("endpoint")
.inputFileId("input_file_id")
.object_(Batch.Object.BATCH)
.status(Batch.Status.VALIDATING)
.cancelledAt(123L)
.cancellingAt(123L)
.completedAt(123L)
.cancelledAt(0L)
.cancellingAt(0L)
.completedAt(0L)
.errorFileId("error_file_id")
.errors(
Batch.Errors.builder()
.data(
listOf(
BatchError.builder()
.code("code")
.line(123L)
.line(0L)
.message("message")
.param("param")
.build()
Expand All @@ -38,28 +38,28 @@ class BatchTest {
.object_("object")
.build()
)
.expiredAt(123L)
.expiresAt(123L)
.failedAt(123L)
.finalizingAt(123L)
.inProgressAt(123L)
.expiredAt(0L)
.expiresAt(0L)
.failedAt(0L)
.finalizingAt(0L)
.inProgressAt(0L)
.metadata(JsonNull.of())
.outputFileId("output_file_id")
.requestCounts(
BatchRequestCounts.builder().completed(123L).failed(123L).total(123L).build()
BatchRequestCounts.builder().completed(0L).failed(0L).total(0L).build()
)
.build()
assertThat(batch).isNotNull
assertThat(batch.id()).isEqualTo("id")
assertThat(batch.completionWindow()).isEqualTo("completion_window")
assertThat(batch.createdAt()).isEqualTo(123L)
assertThat(batch.createdAt()).isEqualTo(0L)
assertThat(batch.endpoint()).isEqualTo("endpoint")
assertThat(batch.inputFileId()).isEqualTo("input_file_id")
assertThat(batch.object_()).isEqualTo(Batch.Object.BATCH)
assertThat(batch.status()).isEqualTo(Batch.Status.VALIDATING)
assertThat(batch.cancelledAt()).contains(123L)
assertThat(batch.cancellingAt()).contains(123L)
assertThat(batch.completedAt()).contains(123L)
assertThat(batch.cancelledAt()).contains(0L)
assertThat(batch.cancellingAt()).contains(0L)
assertThat(batch.completedAt()).contains(0L)
assertThat(batch.errorFileId()).contains("error_file_id")
assertThat(batch.errors())
.contains(
Expand All @@ -68,7 +68,7 @@ class BatchTest {
listOf(
BatchError.builder()
.code("code")
.line(123L)
.line(0L)
.message("message")
.param("param")
.build()
Expand All @@ -77,14 +77,14 @@ class BatchTest {
.object_("object")
.build()
)
assertThat(batch.expiredAt()).contains(123L)
assertThat(batch.expiresAt()).contains(123L)
assertThat(batch.failedAt()).contains(123L)
assertThat(batch.finalizingAt()).contains(123L)
assertThat(batch.inProgressAt()).contains(123L)
assertThat(batch.expiredAt()).contains(0L)
assertThat(batch.expiresAt()).contains(0L)
assertThat(batch.failedAt()).contains(0L)
assertThat(batch.finalizingAt()).contains(0L)
assertThat(batch.inProgressAt()).contains(0L)
assertThat(batch._metadata()).isEqualTo(JsonNull.of())
assertThat(batch.outputFileId()).contains("output_file_id")
assertThat(batch.requestCounts())
.contains(BatchRequestCounts.builder().completed(123L).failed(123L).total(123L).build())
.contains(BatchRequestCounts.builder().completed(0L).failed(0L).total(0L).build())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ class ChatCompletionAudioTest {
ChatCompletionAudio.builder()
.id("id")
.data("data")
.expiresAt(123L)
.expiresAt(0L)
.transcript("transcript")
.build()
assertThat(chatCompletionAudio).isNotNull
assertThat(chatCompletionAudio.id()).isEqualTo("id")
assertThat(chatCompletionAudio.data()).isEqualTo("data")
assertThat(chatCompletionAudio.expiresAt()).isEqualTo(123L)
assertThat(chatCompletionAudio.expiresAt()).isEqualTo(0L)
assertThat(chatCompletionAudio.transcript()).isEqualTo("transcript")
}
}
Loading