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.15.1 #172

Merged
merged 2 commits into from
Jan 27, 2025
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.15.0"
".": "0.15.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.15.1 (2025-01-27)

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

### Documentation

* builder, enum, and union comments ([#171](https://github.com/openai/openai-java/issues/171)) ([37acbbd](https://github.com/openai/openai-java/commit/37acbbd239d6b540a461084240bc266ad0491e9c))

## 0.15.0 (2025-01-27)

Full Changelog: [v0.14.1...v0.15.0](https://github.com/openai/openai-java/compare/v0.14.1...v0.15.0)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +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.15.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.15.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.15.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.15.1)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.15.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.15.1)

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

Expand All @@ -25,7 +25,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor
### Gradle

```kotlin
implementation("com.openai:openai-java:0.15.0")
implementation("com.openai:openai-java:0.15.1")
```

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

allprojects {
group = "com.openai"
version = "0.15.0" // x-release-please-version
version = "0.15.1" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class OpenAIOkHttpClient private constructor() {
@JvmStatic fun fromEnv(): OpenAIClient = builder().fromEnv().build()
}

/** A builder for [OpenAIOkHttpClient]. */
class Builder internal constructor() {

private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class OpenAIOkHttpClientAsync private constructor() {
@JvmStatic fun fromEnv(): OpenAIClientAsync = builder().fromEnv().build()
}

/** A builder for [OpenAIOkHttpClientAsync]. */
class Builder internal constructor() {

private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private constructor(
@JvmStatic fun fromEnv(): ClientOptions = builder().fromEnv().build()
}

/** A builder for [ClientOptions]. */
class Builder internal constructor() {

private var httpClient: HttpClient? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}

/** A builder for [OpenAIError]. */
class Builder internal constructor() {

private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ private constructor(
@JvmStatic fun ofFilePath(filePath: FilePathAnnotation) = Annotation(filePath = filePath)
}

/** An interface that defines how to map each variant of [Annotation] to a value of type [T]. */
interface Visitor<out T> {

/**
Expand All @@ -144,6 +145,15 @@ private constructor(
*/
fun visitFilePath(filePath: FilePathAnnotation): T

/**
* Maps an unknown variant of [Annotation] to a value of type [T].
*
* An instance of [Annotation] can contain an unknown variant if it was deserialized from
* data that doesn't match any known variant. For example, if the SDK is on an older version
* than the API, then the API may respond with new variants that the SDK is unaware of.
*
* @throws OpenAIInvalidDataException in the default implementation.
*/
fun unknown(json: JsonValue?): T {
throw OpenAIInvalidDataException("Unknown Annotation: $json")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ private constructor(
fun ofFilePath(filePath: FilePathDeltaAnnotation) = AnnotationDelta(filePath = filePath)
}

/**
* An interface that defines how to map each variant of [AnnotationDelta] to a value of type
* [T].
*/
interface Visitor<out T> {

/**
Expand All @@ -145,6 +149,16 @@ private constructor(
*/
fun visitFilePath(filePath: FilePathDeltaAnnotation): T

/**
* Maps an unknown variant of [AnnotationDelta] to a value of type [T].
*
* An instance of [AnnotationDelta] can contain an unknown variant if it was deserialized
* from data that doesn't match any known variant. For example, if the SDK is on an older
* version than the API, then the API may respond with new variants that the SDK is unaware
* of.
*
* @throws OpenAIInvalidDataException in the default implementation.
*/
fun unknown(json: JsonValue?): T {
throw OpenAIInvalidDataException("Unknown AnnotationDelta: $json")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}

/** A builder for [Assistant]. */
class Builder internal constructor() {

private var id: JsonField<String>? = null
Expand Down Expand Up @@ -754,6 +755,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}

/** A builder for [ToolResources]. */
class Builder internal constructor() {

private var codeInterpreter: JsonField<CodeInterpreter> = JsonMissing.of()
Expand Down Expand Up @@ -857,6 +859,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}

/** A builder for [CodeInterpreter]. */
class Builder internal constructor() {

private var fileIds: JsonField<MutableList<String>>? = null
Expand Down Expand Up @@ -1001,6 +1004,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}

/** A builder for [FileSearch]. */
class Builder internal constructor() {

private var vectorStoreIds: JsonField<MutableList<String>>? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}

/** A builder for [AssistantDeleted]. */
class Builder internal constructor() {

private var id: JsonField<String>? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ private constructor(
AssistantResponseFormatOption(responseFormatJsonSchema = responseFormatJsonSchema)
}

/**
* An interface that defines how to map each variant of [AssistantResponseFormatOption] to a
* value of type [T].
*/
interface Visitor<out T> {

/** `auto` is the default value */
Expand All @@ -182,6 +186,16 @@ private constructor(

fun visitResponseFormatJsonSchema(responseFormatJsonSchema: ResponseFormatJsonSchema): T

/**
* Maps an unknown variant of [AssistantResponseFormatOption] to a value of type [T].
*
* An instance of [AssistantResponseFormatOption] can contain an unknown variant if it was
* deserialized from data that doesn't match any known variant. For example, if the SDK is
* on an older version than the API, then the API may respond with new variants that the SDK
* is unaware of.
*
* @throws OpenAIInvalidDataException in the default implementation.
*/
fun unknown(json: JsonValue?): T {
throw OpenAIInvalidDataException("Unknown AssistantResponseFormatOption: $json")
}
Expand Down
Loading
Loading