Skip to content

Commit 088a898

Browse files
release: 0.26.1 (#244)
* docs: add immutability explanation to readme (#243) * release: 0.26.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent da1109a commit 088a898

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

.release-please-manifest.json

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

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.26.1 (2025-02-21)
4+
5+
Full Changelog: [v0.26.0...v0.26.1](https://github.com/openai/openai-java/compare/v0.26.0...v0.26.1)
6+
7+
### Documentation
8+
9+
* add immutability explanation to readme ([#243](https://github.com/openai/openai-java/issues/243)) ([5826fb0](https://github.com/openai/openai-java/commit/5826fb0fafa06c647a520f82847319a32ddcbbbb))
10+
311
## 0.26.0 (2025-02-20)
412

513
Full Changelog: [v0.25.0...v0.26.0](https://github.com/openai/openai-java/compare/v0.25.0...v0.26.0)

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +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.26.0)
13-
[![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)
12+
[![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)
13+
[![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)
1414

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

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

2727
```kotlin
28-
implementation("com.openai:openai-java:0.26.0")
28+
implementation("com.openai:openai-java:0.26.1")
2929
```
3030

3131
### Maven
@@ -34,7 +34,7 @@ implementation("com.openai:openai-java:0.26.0")
3434
<dependency>
3535
<groupId>com.openai</groupId>
3636
<artifactId>openai-java</artifactId>
37-
<version>0.26.0</version>
37+
<version>0.26.1</version>
3838
</dependency>
3939
```
4040

@@ -119,6 +119,14 @@ To send a request to the OpenAI API, build an instance of some `Params` class an
119119

120120
For example, `client.chat().completions().create(...)` should be called with an instance of `ChatCompletionCreateParams`, and it will return an instance of `ChatCompletion`.
121121

122+
## Immutability
123+
124+
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.
125+
126+
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.
127+
128+
Because each class is immutable, builder modification will _never_ affect already built class instances.
129+
122130
## Asynchronous execution
123131

124132
The default client is synchronous. To switch to asynchronous execution, call the `async()` method:

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.26.0" // x-release-please-version
11+
version = "0.26.1" // x-release-please-version
1212
}
1313

1414
subprojects {

0 commit comments

Comments
 (0)