A minimalistic OpenAI API client for the JVM, written in Java
APACHE-2.0 License
This release contains the following additions:
Chat
parallel_tool_calls
variable in CreateChatCompletionRequest
Messages
quote
from FileCitation
inside ThreadMessage
Runs
parallel_tool_calls
variable in CreateRunRequest
and CreateThreadAndRunRequest
parallel_tool_calls
to ThreadRun
Vector Stores
ChunkingStrategy
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.9.2...v0.9.3
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.9.3")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.9.3</version>
</dependency>
Published by StefanBratanov 5 months ago
This release contains the following fixes/additions:
General
ToolResources
static initialization methods (https://github.com/StefanBratanov/jvm-openai/issues/9)@JsonSubTypes
annotation (https://github.com/StefanBratanov/jvm-openai/issues/10)GPT_4o
to OpenAIModel
enumRole
, Purpose
and Voice
enumsMessages
content
parameter when creating a messageFull Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.9.1...v0.9.2
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.9.2")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.9.2</version>
</dependency>
Published by StefanBratanov 6 months ago
This release contains the following fixes/additions:
General
Chat
stream_options
when creating a chat completion. More information for this functionality can be found at https://community.openai.com/t/usage-stats-now-available-when-using-streaming-with-the-chat-completions-api-or-completions-api/738156.usage
field to ChatCompletionChunk
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.9.0...v0.9.1
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.9.1")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.9.1</version>
</dependency>
Published by StefanBratanov 6 months ago
This release has too many changes to mention all, but in short it provides support for Assistants API v2
. If you would like to continue using v1
, use Release v0.8.0 instead. A guide for migrating from v1
to v2
is available at https://platform.openai.com/docs/assistants/migration.
This release also contains the following additions/fixes:
General
parameters
for a Function Tool
, escaped JSON strings will be unescaped when serializing .Runs
RunStepsClient
to align with the spec: https://platform.openai.com/docs/api-reference/run-steps
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.8.0...v0.9.0
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.9.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.9.0</version>
</dependency>
Published by StefanBratanov 6 months ago
This release contains the following additions/fixes:
General
OpenAI-Project
header) when building the OpenAI
instanceFine-tuning
learning_rate_multiplier
parameter in Hyperparameters
to be a double
instead of an int
Assistants
temperature
, top_p
and response_format
when creating an assistantRuns
top_p
, max_prompt_tokens
, max_completion_tokens
, truncation_strategy
, tool_choice
and response_format
when creating a runtop_p
, max_prompt_tokens
, max_completion_tokens
, truncation_strategy
, tool_choice
and response_format
fields to ThreadRun
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.7.0...v0.8.0
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.8.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.8.0</version>
</dependency>
Published by StefanBratanov 7 months ago
Special thanks to @maciej-cz for his first contribution in https://github.com/StefanBratanov/jvm-openai/pull/5 🎉
This release contains the following additions/improvements:
General
OpenAIModel
enum to simplify the selection of a modelChat
ChatCompletionStreamSubscriber
is usedStreamChatCompletionSubscriber
to ChatCompletionStreamSubscriber
Fine-tuning
integrations
and seed
fields when creating a fine-tuning jobintegrations
and seed
field to FineTuningJob
Messages
run_id
query param when listing messages to allow filtering by the run id that generated themRuns
additional_messages
, temperature
and stream
fields when creating a runtemperature
field to ThreadRun
stream
field when submitting tool outputs to runcreateRunAndStream
, createThreadAndRunAndStream
and submitToolOutputsAndStream
to RunsClient
to support Assistants Streaming
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.6.2...v0.7.0
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.7.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.7.0</version>
</dependency>
Published by StefanBratanov 8 months ago
This release contains the following additions/improvements:
General
2.17.0
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.6.1...v0.6.2
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.6.2")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.6.2</version>
</dependency>
Published by StefanBratanov 8 months ago
This release contains the following additions/improvements:
General
requestTimeout
when initializing OpenAI
. This timeout will apply to all requests.OpenAI openAI = OpenAI.newBuilder(System.getenv("OPENAI_API_KEY"))
.requestTimeout(Duration.ofSeconds(10))
.build();
Chat
instance_id
parameter as per https://github.com/openai/openai-openapi/pull/198
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.6.0...v0.6.1
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.6.1")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.6.1</version>
</dependency>
Published by StefanBratanov 9 months ago
This release contains the following additions/improvements:
General
multipart/form-data
requestsAudio
response_format
and timestamp_granularities
parameters when creating a transcriptionresponse_format
parameter when creating a translationChat
instance_id
parameter when creating a chat completionEmbeddings
dimensions
parameter when creating embeddingsFull Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.5.2...v0.6.0
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.6.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.6.0</version>
</dependency>
Published by StefanBratanov 9 months ago
This release contains the following additions/improvements:
General
JsonInclude.Include.NON_ABSENT
instead of JsonInclude.Include.NON_EMPTY
in order to serialize empty collections/maps/arrays/stringsRuns
additional_instructions
when creating a runusage
field to ThreadRun
and ThreadRunStep
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.5.1...v0.5.2
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.5.2")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.5.2</version>
</dependency>
Published by StefanBratanov 10 months ago
This release contains the following additions/fixes:
General
jackson-annotations
a compile dependency to resolve compile warningsChat
StreamChatCompletionSubscriber
interface implementation for stream requests in order to subscribe to streamed responsesChatRequest
-> CreateChatCompletionRequest
ChatResponse
-> ChatCompletion
ChatChunkResponse
-> ChatCompletionChunk
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.5.0...v0.5.1
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.5.1")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.5.1</version>
</dependency>
Published by StefanBratanov 10 months ago
From this release onward, the published artifact will be named jvm-openai
instead of chatjpt
. The project itself has been renamed as well. Old versions of the library would still be available on Maven Central under the old name.
This release contains the following additions:
General
io.github.stefanbratanov.chatjpt
package to io.github.stefanbratanov.jvm.openai
HttpClient
used for the API requestsError
record to the OpenAIException
which contains all the information that OpenAI API returns in case of errors.Chat
content
field when constructing a message.Audio/Images
Full Changelog: https://github.com/StefanBratanov/jvm-openai/compare/v0.4.0...v0.5.0
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:jvm-openai:0.5.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>jvm-openai</artifactId>
<version>0.5.0</version>
</dependency>
Published by StefanBratanov 10 months ago
This release adds support for the Assistants, Threads, Messages and Runs OpenAI Beta API endpoints.
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:chatjpt:0.4.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>chatjpt</artifactId>
<version>0.4.0</version>
</dependency>
Published by StefanBratanov 10 months ago
This release contains the following additions:
Chat
logprobs
supportstop
request parametertools
and tool_choice
request parametersEmbeddings
input
request parameterFull Changelog: https://github.com/StefanBratanov/chatjpt/compare/v0.2.0...v0.3.0
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:chatjpt:0.3.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>chatjpt</artifactId>
<version>0.3.0</version>
</dependency>
Published by StefanBratanov 10 months ago
This release adds support for the Audio, Embeddings, Fine-tuning, Files, Images and Moderations OpenAI API endpoints.
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:chatjpt:0.2.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>chatjpt</artifactId>
<version>0.2.0</version>
</dependency>
Published by StefanBratanov 10 months ago
This initial release has support for the Chat and Models OpenAI API endpoints.
The artifact is available on Maven Central and can be imported as follows:
implementation("io.github.stefanbratanov:chatjpt:0.1.0")
<dependency>
<groupId>io.github.stefanbratanov</groupId>
<artifactId>chatjpt</artifactId>
<version>0.1.0</version>
</dependency>