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

## 0.11.7 (2025-01-17)

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

### Chores

* **internal:** upgrade kotlin compiler and gradle ([#132](https://github.com/openai/openai-java/issues/132)) ([61a0b0d](https://github.com/openai/openai-java/commit/61a0b0debfd50646fc9fe310b5decc2e891f48d0))


### Documentation

* add javadoc.io badge ([#135](https://github.com/openai/openai-java/issues/135)) ([e905ce5](https://github.com/openai/openai-java/commit/e905ce509aabe1b9db9519b6ff77a79fc95434e1))
* add more documentation ([#134](https://github.com/openai/openai-java/issues/134)) ([893eafc](https://github.com/openai/openai-java/commit/893eafcb367b4ea96331c6deccb71c865eb67d4b))

## 0.11.6 (2025-01-17)

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

<!-- 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.11.6)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.11.7)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.11.7/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.11.6)

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

Expand All @@ -30,7 +31,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.11.6")
implementation("com.openai:openai-java:0.11.7")
```

#### Maven
Expand All @@ -39,7 +40,7 @@ implementation("com.openai:openai-java:0.11.6")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>0.11.6</version>
<version>0.11.7</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 @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.openai"
version = "0.11.6" // x-release-please-version
version = "0.11.7" // x-release-please-version
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`kotlin-dsl`
kotlin("jvm") version "1.9.22"
kotlin("jvm") version "2.1.0"
id("com.vanniktech.maven.publish") version "0.28.0"
}

Expand Down
8 changes: 6 additions & 2 deletions buildSrc/src/main/kotlin/openai.kotlin.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ configure<SpotlessExtension> {

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true
freeCompilerArgs = listOf("-Xjvm-default=all", "-Xjdk-release=1.8")
freeCompilerArgs = listOf(
"-Xjvm-default=all",
"-Xjdk-release=1.8",
// Suppress deprecation warnings because we may still reference and test deprecated members.
"-Xsuppress-warning=DEPRECATION"
)
jvmTarget = "1.8"
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
6 changes: 4 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,17 @@ private constructor(

interface Visitor<out T> {

/**
* A citation within the message that points to a specific quote from a specific File
* associated with the assistant or the message. Generated when the assistant uses the
* "file_search" tool to search files.
*/
fun visitFileCitationAnnotation(fileCitationAnnotation: FileCitationAnnotation): T

/**
* A URL for the file that's generated when the assistant used the `code_interpreter` tool
* to generate a file.
*/
fun visitFilePathAnnotation(filePathAnnotation: FilePathAnnotation): T

fun unknown(json: JsonValue?): T {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,19 @@ private constructor(

interface Visitor<out T> {

/**
* A citation within the message that points to a specific quote from a specific File
* associated with the assistant or the message. Generated when the assistant uses the
* "file_search" tool to search files.
*/
fun visitFileCitationDeltaAnnotation(
fileCitationDeltaAnnotation: FileCitationDeltaAnnotation
): T

/**
* A URL for the file that's generated when the assistant used the `code_interpreter` tool
* to generate a file.
*/
fun visitFilePathDeltaAnnotation(filePathDeltaAnnotation: FilePathDeltaAnnotation): T

fun unknown(json: JsonValue?): T {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ private constructor(
)
}

/** The object type, which is always `assistant`. */
class Object
@JsonCreator
private constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ private constructor(

interface Visitor<out T> {

/** `auto` is the default value */
fun visitBehavior(behavior: Behavior): T

fun visitResponseFormatText(responseFormatText: ResponseFormatText): T
Expand Down Expand Up @@ -237,6 +238,7 @@ private constructor(
}
}

/** `auto` is the default value */
class Behavior
@JsonCreator
private constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,52 +861,152 @@ private constructor(

interface Visitor<out T> {

/**
* Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object)
* is created.
*/
fun visitThreadCreated(threadCreated: ThreadCreated): T

/**
* Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is
* created.
*/
fun visitThreadRunCreated(threadRunCreated: ThreadRunCreated): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to
* a `queued` status.
*/
fun visitThreadRunQueued(threadRunQueued: ThreadRunQueued): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to
* an `in_progress` status.
*/
fun visitThreadRunInProgress(threadRunInProgress: ThreadRunInProgress): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to
* a `requires_action` status.
*/
fun visitThreadRunRequiresAction(threadRunRequiresAction: ThreadRunRequiresAction): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is
* completed.
*/
fun visitThreadRunCompleted(threadRunCompleted: ThreadRunCompleted): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with
* status `incomplete`.
*/
fun visitThreadRunIncomplete(threadRunIncomplete: ThreadRunIncomplete): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails.
*/
fun visitThreadRunFailed(threadRunFailed: ThreadRunFailed): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to
* a `cancelling` status.
*/
fun visitThreadRunCancelling(threadRunCancelling: ThreadRunCancelling): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is
* cancelled.
*/
fun visitThreadRunCancelled(threadRunCancelled: ThreadRunCancelled): T

/**
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires.
*/
fun visitThreadRunExpired(threadRunExpired: ThreadRunExpired): T

/**
* Occurs when a
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
* created.
*/
fun visitThreadRunStepCreated(threadRunStepCreated: ThreadRunStepCreated): T

/**
* Occurs when a
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to
* an `in_progress` state.
*/
fun visitThreadRunStepInProgress(threadRunStepInProgress: ThreadRunStepInProgress): T

/**
* Occurs when parts of a
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are
* being streamed.
*/
fun visitThreadRunStepDelta(threadRunStepDelta: ThreadRunStepDelta): T

/**
* Occurs when a
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
* completed.
*/
fun visitThreadRunStepCompleted(threadRunStepCompleted: ThreadRunStepCompleted): T

/**
* Occurs when a
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails.
*/
fun visitThreadRunStepFailed(threadRunStepFailed: ThreadRunStepFailed): T

/**
* Occurs when a
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
* cancelled.
*/
fun visitThreadRunStepCancelled(threadRunStepCancelled: ThreadRunStepCancelled): T

/**
* Occurs when a
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires.
*/
fun visitThreadRunStepExpired(threadRunStepExpired: ThreadRunStepExpired): T

/**
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object)
* is created.
*/
fun visitThreadMessageCreated(threadMessageCreated: ThreadMessageCreated): T

/**
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object)
* moves to an `in_progress` state.
*/
fun visitThreadMessageInProgress(threadMessageInProgress: ThreadMessageInProgress): T

/**
* Occurs when parts of a
* [Message](https://platform.openai.com/docs/api-reference/messages/object) are being
* streamed.
*/
fun visitThreadMessageDelta(threadMessageDelta: ThreadMessageDelta): T

/**
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object)
* is completed.
*/
fun visitThreadMessageCompleted(threadMessageCompleted: ThreadMessageCompleted): T

/**
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object)
* ends before it is completed.
*/
fun visitThreadMessageIncomplete(threadMessageIncomplete: ThreadMessageIncomplete): T

/**
* Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors)
* occurs. This can happen due to an internal server error or a timeout.
*/
fun visitErrorEvent(errorEvent: ErrorEvent): T

fun unknown(json: JsonValue?): T {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ private constructor(
)
}

/** The type of the tool. If type is `function`, the function name must be set */
class Type
@JsonCreator
private constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,16 @@ private constructor(

interface Visitor<out T> {

/**
* `none` means the model will not call any tools and instead generates a message. `auto`
* means the model can pick between generating a message or calling one or more tools.
* `required` means the model must call one or more tools before responding to the user.
*/
fun visitBehavior(behavior: Behavior): T

/**
* Specifies a tool the model should use. Use to force the model to call a specific tool.
*/
fun visitAssistantToolChoice(assistantToolChoice: AssistantToolChoice): T

fun unknown(json: JsonValue?): T {
Expand Down Expand Up @@ -175,6 +183,11 @@ private constructor(
}
}

/**
* `none` means the model will not call any tools and instead generates a message. `auto` means
* the model can pick between generating a message or calling one or more tools. `required`
* means the model must call one or more tools before responding to the user.
*/
class Behavior
@JsonCreator
private constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ private constructor(
)
}

/** Always `auto`. */
class Type
@JsonCreator
private constructor(
Expand Down
Loading
Loading