You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: fix missing readme comment
* feat(client): support base64 embeddings and use as default (#519)
* Add EmbeddingValue union type and Base64 support for embeddings
This implementation adds support for Base64-encoded embeddings as the default response format, while maintaining complete backward compatibility with existing `List<Float>` usage.
### 1. Default Behavior Change
- **New Default**: Embedding requests now default to Base64 encoding format
- **Backward Compatibility**: Existing code using `embedding()` method continues to work unchanged
- **Performance**: Base64 encoding reduces network payload size significantly
Introduces the EmbeddingValue class to support both float list and base64-encoded embedding data, enabling efficient handling and backward compatibility. Embedding, EmbeddingCreateParams, and related classes are updated to use EmbeddingValue, with automatic decoding and encoding between formats. Adds EmbeddingDefaults for global default encoding configuration, and comprehensive tests for new behaviors and compatibility.
* Deleted invalid EmbeddingDefaults.kt
Deleted invalid EmbeddingDefaults.kt
* fix: actually add system properties
* Modified the field name for floats and base64
Modified the field name for floats and base64
* Deleted DebutTest
Deleted DebutTest
* Modified validate method and refactored apply scope function
* validate() methods validate anything the "shape" of the data being correct
* The code has been refactored to use Kotlin's apply scope function for improved conciseness and consistency.
* Modified default encoding
Modified default encoding
* Modified the implementation of default encoding
Modified the implementation of default encoding
* Modified format
Modified format
* Delete plan2.md
Delete plan2.md
* fix: set the default correctly
* fix: rename some things
* chore: EmbeddingValue refactor
* refactor: embedding data model
* chore: delete test with no asserts
* chore: test changes
* fix: little-endian
---------
Co-authored-by: Yoshio Terada <[email protected]>
Co-authored-by: Tomer Aberbach <[email protected]>
* release: 2.19.0
---------
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Yoshio Terada <[email protected]>
Co-authored-by: Yoshio Terada <[email protected]>
Co-authored-by: Tomer Aberbach <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Changelog
2
2
3
+
## 2.19.0 (2025-07-23)
4
+
5
+
Full Changelog: [v2.18.2...v2.19.0](https://github.com/openai/openai-java/compare/v2.18.2...v2.19.0)
6
+
7
+
### Features
8
+
9
+
***client:** support base64 embeddings and use as default ([#519](https://github.com/openai/openai-java/issues/519)) ([12b0ff7](https://github.com/openai/openai-java/commit/12b0ff75cf2a3bc93cf5c41adbbf2b5097a8e941))
The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https://platform.openai.com/docs) from applications written in Java.
11
11
12
12
<!-- x-release-please-start-version -->
13
13
14
-
The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/2.18.2).
14
+
The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/2.19.0).
15
15
16
16
<!-- x-release-please-end -->
17
17
@@ -24,7 +24,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor
0 commit comments