diff --git a/.release-please-manifest.json b/.release-please-manifest.json index caf5ca3f3..8e9be47fc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.26.0" + ".": "0.26.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 228017f96..eb05982d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.26.1 (2025-02-21) + +Full Changelog: [v0.26.0...v0.26.1](https://github.com/openai/openai-java/compare/v0.26.0...v0.26.1) + +### Documentation + +* add immutability explanation to readme ([#243](https://github.com/openai/openai-java/issues/243)) ([5826fb0](https://github.com/openai/openai-java/commit/5826fb0fafa06c647a520f82847319a32ddcbbbb)) + ## 0.26.0 (2025-02-20) Full Changelog: [v0.25.0...v0.26.0](https://github.com/openai/openai-java/compare/v0.25.0...v0.26.0) diff --git a/README.md b/README.md index 9dcd39f1c..fd578b983 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.26.0) -[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.26.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.26.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.26.1) +[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.26.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.26.1) @@ -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.26.0") +implementation("com.openai:openai-java:0.26.1") ``` ### Maven @@ -34,7 +34,7 @@ implementation("com.openai:openai-java:0.26.0") com.openai openai-java - 0.26.0 + 0.26.1 ``` @@ -119,6 +119,14 @@ To send a request to the OpenAI API, build an instance of some `Params` class an For example, `client.chat().completions().create(...)` should be called with an instance of `ChatCompletionCreateParams`, and it will return an instance of `ChatCompletion`. +## Immutability + +Each class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it. + +Each class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy. + +Because each class is immutable, builder modification will _never_ affect already built class instances. + ## Asynchronous execution The default client is synchronous. To switch to asynchronous execution, call the `async()` method: diff --git a/build.gradle.kts b/build.gradle.kts index 2fd9a5eb0..fb41fce82 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.openai" - version = "0.26.0" // x-release-please-version + version = "0.26.1" // x-release-please-version } subprojects {