Skip to content

Commit f35bfff

Browse files
release: 0.11.7 (#133)
* chore(internal): upgrade kotlin compiler and gradle (#132) * docs: add more documentation (#134) * docs: add javadoc.io badge (#135) * release: 0.11.7 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent da01485 commit f35bfff

File tree

166 files changed

+902
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+902
-23
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.11.6"
2+
".": "0.11.7"
33
}

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## 0.11.7 (2025-01-17)
4+
5+
Full Changelog: [v0.11.6...v0.11.7](https://github.com/openai/openai-java/compare/v0.11.6...v0.11.7)
6+
7+
### Chores
8+
9+
* **internal:** upgrade kotlin compiler and gradle ([#132](https://github.com/openai/openai-java/issues/132)) ([61a0b0d](https://github.com/openai/openai-java/commit/61a0b0debfd50646fc9fe310b5decc2e891f48d0))
10+
11+
12+
### Documentation
13+
14+
* add javadoc.io badge ([#135](https://github.com/openai/openai-java/issues/135)) ([e905ce5](https://github.com/openai/openai-java/commit/e905ce509aabe1b9db9519b6ff77a79fc95434e1))
15+
* add more documentation ([#134](https://github.com/openai/openai-java/issues/134)) ([893eafc](https://github.com/openai/openai-java/commit/893eafcb367b4ea96331c6deccb71c865eb67d4b))
16+
317
## 0.11.6 (2025-01-17)
418

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

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
1010
<!-- x-release-please-start-version -->
1111

12-
[![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)
12+
[![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)
13+
[![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)
1314

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

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

3233
```kotlin
33-
implementation("com.openai:openai-java:0.11.6")
34+
implementation("com.openai:openai-java:0.11.7")
3435
```
3536

3637
#### Maven
@@ -39,7 +40,7 @@ implementation("com.openai:openai-java:0.11.6")
3940
<dependency>
4041
<groupId>com.openai</groupId>
4142
<artifactId>openai-java</artifactId>
42-
<version>0.11.6</version>
43+
<version>0.11.7</version>
4344
</dependency>
4445
```
4546

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88

99
allprojects {
1010
group = "com.openai"
11-
version = "0.11.6" // x-release-please-version
11+
version = "0.11.7" // x-release-please-version
1212
}
1313

1414
subprojects {

buildSrc/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
`kotlin-dsl`
3-
kotlin("jvm") version "1.9.22"
3+
kotlin("jvm") version "2.1.0"
44
id("com.vanniktech.maven.publish") version "0.28.0"
55
}
66

buildSrc/src/main/kotlin/openai.kotlin.gradle.kts

+6-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ configure<SpotlessExtension> {
2121

2222
tasks.withType<KotlinCompile>().configureEach {
2323
kotlinOptions {
24-
allWarningsAsErrors = true
25-
freeCompilerArgs = listOf("-Xjvm-default=all", "-Xjdk-release=1.8")
24+
freeCompilerArgs = listOf(
25+
"-Xjvm-default=all",
26+
"-Xjdk-release=1.8",
27+
// Suppress deprecation warnings because we may still reference and test deprecated members.
28+
"-Xsuppress-warning=DEPRECATION"
29+
)
2630
jvmTarget = "1.8"
2731
}
2832
}

gradle/wrapper/gradle-wrapper.jar

130 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

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

8991
# Use the maximum available, or set MAX_FD != -1 to use that value.
9092
MAX_FD=maximum

gradlew.bat

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

openai-java-core/src/main/kotlin/com/openai/models/Annotation.kt

+9
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,17 @@ private constructor(
140140

141141
interface Visitor<out T> {
142142

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

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

147156
fun unknown(json: JsonValue?): T {

openai-java-core/src/main/kotlin/com/openai/models/AnnotationDelta.kt

+9
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,19 @@ private constructor(
146146

147147
interface Visitor<out T> {
148148

149+
/**
150+
* A citation within the message that points to a specific quote from a specific File
151+
* associated with the assistant or the message. Generated when the assistant uses the
152+
* "file_search" tool to search files.
153+
*/
149154
fun visitFileCitationDeltaAnnotation(
150155
fileCitationDeltaAnnotation: FileCitationDeltaAnnotation
151156
): T
152157

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

155164
fun unknown(json: JsonValue?): T {

openai-java-core/src/main/kotlin/com/openai/models/Assistant.kt

+1
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ private constructor(
706706
)
707707
}
708708

709+
/** The object type, which is always `assistant`. */
709710
class Object
710711
@JsonCreator
711712
private constructor(

openai-java-core/src/main/kotlin/com/openai/models/AssistantResponseFormatOption.kt

+2
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ private constructor(
171171

172172
interface Visitor<out T> {
173173

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

176177
fun visitResponseFormatText(responseFormatText: ResponseFormatText): T
@@ -237,6 +238,7 @@ private constructor(
237238
}
238239
}
239240

241+
/** `auto` is the default value */
240242
class Behavior
241243
@JsonCreator
242244
private constructor(

openai-java-core/src/main/kotlin/com/openai/models/AssistantStreamEvent.kt

+100
Original file line numberDiff line numberDiff line change
@@ -861,52 +861,152 @@ private constructor(
861861

862862
interface Visitor<out T> {
863863

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

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

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

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

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

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

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

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

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

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

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

928+
/**
929+
* Occurs when a
930+
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
931+
* created.
932+
*/
886933
fun visitThreadRunStepCreated(threadRunStepCreated: ThreadRunStepCreated): T
887934

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

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

949+
/**
950+
* Occurs when a
951+
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
952+
* completed.
953+
*/
892954
fun visitThreadRunStepCompleted(threadRunStepCompleted: ThreadRunStepCompleted): T
893955

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

962+
/**
963+
* Occurs when a
964+
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
965+
* cancelled.
966+
*/
896967
fun visitThreadRunStepCancelled(threadRunStepCancelled: ThreadRunStepCancelled): T
897968

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

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

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

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

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

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

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

9121012
fun unknown(json: JsonValue?): T {

openai-java-core/src/main/kotlin/com/openai/models/AssistantToolChoice.kt

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ private constructor(
119119
)
120120
}
121121

122+
/** The type of the tool. If type is `function`, the function name must be set */
122123
class Type
123124
@JsonCreator
124125
private constructor(

openai-java-core/src/main/kotlin/com/openai/models/AssistantToolChoiceOption.kt

+13
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,16 @@ private constructor(
131131

132132
interface Visitor<out T> {
133133

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

141+
/**
142+
* Specifies a tool the model should use. Use to force the model to call a specific tool.
143+
*/
136144
fun visitAssistantToolChoice(assistantToolChoice: AssistantToolChoice): T
137145

138146
fun unknown(json: JsonValue?): T {
@@ -175,6 +183,11 @@ private constructor(
175183
}
176184
}
177185

186+
/**
187+
* `none` means the model will not call any tools and instead generates a message. `auto` means
188+
* the model can pick between generating a message or calling one or more tools. `required`
189+
* means the model must call one or more tools before responding to the user.
190+
*/
178191
class Behavior
179192
@JsonCreator
180193
private constructor(

openai-java-core/src/main/kotlin/com/openai/models/AutoFileChunkingStrategyParam.kt

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ private constructor(
101101
)
102102
}
103103

104+
/** Always `auto`. */
104105
class Type
105106
@JsonCreator
106107
private constructor(

0 commit comments

Comments
 (0)