Skip to content
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.10.0"
".": "0.11.0"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.11.0 (2025-01-08)

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

### Features

* **client:** add more builder convenience methods for lists ([#96](https://github.com/openai/openai-java/issues/96)) ([9ee703b](https://github.com/openai/openai-java/commit/9ee703b13e8c467a71e7787d420a131bc1910e4f))


### Documentation

* **readme:** fix misplaced period ([#94](https://github.com/openai/openai-java/issues/94)) ([c6242ba](https://github.com/openai/openai-java/commit/c6242bad2b917fb419d9a69ad65cebbda9b56b51))

## 0.10.0 (2025-01-08)

Full Changelog: [v0.9.1...v0.10.0](https://github.com/openai/openai-java/compare/v0.9.1...v0.10.0)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- 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.10.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.11.0)

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

Expand All @@ -32,7 +32,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfo
<!-- x-release-please-start-version -->

```kotlin
implementation("com.openai:openai-java:0.10.0")
implementation("com.openai:openai-java:0.11.0")
```

#### Maven
Expand All @@ -41,7 +41,7 @@ implementation("com.openai:openai-java:0.10.0")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>0.10.0</version>
<version>0.11.0</version>
</dependency>
```

Expand Down Expand Up @@ -417,7 +417,7 @@ $ export OPENAI_LOG=debug

This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

allprojects {
group = "com.openai"
version = "0.10.0" // x-release-please-version
version = "0.11.0" // x-release-please-version
}


21 changes: 21 additions & 0 deletions openai-java-core/src/main/kotlin/com/openai/models/Assistant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,27 @@ private constructor(
}
}

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(AssistantTool.ofCodeInterpreterTool(codeInterpreterTool))

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(fileSearchTool: FileSearchTool) =
addTool(AssistantTool.ofFileSearchTool(fileSearchTool))

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(functionTool: FunctionTool) =
addTool(AssistantTool.ofFunctionTool(functionTool))

/**
* Specifies the format that the model must output. Compatible with
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,27 @@ constructor(
}
}

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(AssistantTool.ofCodeInterpreterTool(codeInterpreterTool))

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(fileSearchTool: FileSearchTool) =
addTool(AssistantTool.ofFileSearchTool(fileSearchTool))

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(functionTool: FunctionTool) =
addTool(AssistantTool.ofFunctionTool(functionTool))

/**
* An alternative to sampling with temperature, called nucleus sampling, where the model
* considers the results of the tokens with top_p probability mass. So 0.1 means only
Expand Down Expand Up @@ -1041,6 +1062,26 @@ constructor(
*/
fun addTool(tool: AssistantTool) = apply { body.addTool(tool) }

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) = apply {
body.addTool(codeInterpreterTool)
}

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(fileSearchTool: FileSearchTool) = apply { body.addTool(fileSearchTool) }

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(functionTool: FunctionTool) = apply { body.addTool(functionTool) }

/**
* An alternative to sampling with temperature, called nucleus sampling, where the model
* considers the results of the tokens with top_p probability mass. So 0.1 means only the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,27 @@ constructor(
}
}

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(AssistantTool.ofCodeInterpreterTool(codeInterpreterTool))

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(fileSearchTool: FileSearchTool) =
addTool(AssistantTool.ofFileSearchTool(fileSearchTool))

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(functionTool: FunctionTool) =
addTool(AssistantTool.ofFunctionTool(functionTool))

/**
* An alternative to sampling with temperature, called nucleus sampling, where the model
* considers the results of the tokens with top_p probability mass. So 0.1 means only
Expand Down Expand Up @@ -1039,6 +1060,26 @@ constructor(
*/
fun addTool(tool: AssistantTool) = apply { body.addTool(tool) }

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) = apply {
body.addTool(codeInterpreterTool)
}

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(fileSearchTool: FileSearchTool) = apply { body.addTool(fileSearchTool) }

/**
* A list of tool enabled on the assistant. There can be a maximum of 128 tools per
* assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
*/
fun addTool(functionTool: FunctionTool) = apply { body.addTool(functionTool) }

/**
* An alternative to sampling with temperature, called nucleus sampling, where the model
* considers the results of the tokens with top_p probability mass. So 0.1 means only the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,26 @@ constructor(
}
}

/**
* Override the tools the assistant can use for this run. This is useful for modifying
* the behavior on a per-run basis.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(Tool.ofCodeInterpreterTool(codeInterpreterTool))

/**
* Override the tools the assistant can use for this run. This is useful for modifying
* the behavior on a per-run basis.
*/
fun addTool(fileSearchTool: FileSearchTool) =
addTool(Tool.ofFileSearchTool(fileSearchTool))

/**
* Override the tools the assistant can use for this run. This is useful for modifying
* the behavior on a per-run basis.
*/
fun addTool(functionTool: FunctionTool) = addTool(Tool.ofFunctionTool(functionTool))

/**
* An alternative to sampling with temperature, called nucleus sampling, where the model
* considers the results of the tokens with top_p probability mass. So 0.1 means only
Expand Down Expand Up @@ -1608,6 +1628,26 @@ constructor(
*/
fun addTool(tool: Tool) = apply { body.addTool(tool) }

/**
* Override the tools the assistant can use for this run. This is useful for modifying the
* behavior on a per-run basis.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) = apply {
body.addTool(codeInterpreterTool)
}

/**
* Override the tools the assistant can use for this run. This is useful for modifying the
* behavior on a per-run basis.
*/
fun addTool(fileSearchTool: FileSearchTool) = apply { body.addTool(fileSearchTool) }

/**
* Override the tools the assistant can use for this run. This is useful for modifying the
* behavior on a per-run basis.
*/
fun addTool(functionTool: FunctionTool) = apply { body.addTool(functionTool) }

/**
* An alternative to sampling with temperature, called nucleus sampling, where the model
* considers the results of the tokens with top_p probability mass. So 0.1 means only the
Expand Down Expand Up @@ -2476,6 +2516,14 @@ constructor(
}
}

/** The tools to add this file to. */
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(Tool.ofCodeInterpreterTool(codeInterpreterTool))

/** The tools to add this file to. */
fun addTool(fileSearch: Tool.FileSearch) =
addTool(Tool.ofFileSearch(fileSearch))

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,13 @@ constructor(
}
}

/** The tools to add this file to. */
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(Tool.ofCodeInterpreterTool(codeInterpreterTool))

/** The tools to add this file to. */
fun addTool(fileSearch: Tool.FileSearch) = addTool(Tool.ofFileSearch(fileSearch))

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,13 @@ constructor(
}
}

/** The tools to add this file to. */
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(Tool.ofCodeInterpreterTool(codeInterpreterTool))

/** The tools to add this file to. */
fun addTool(fileSearch: Tool.FileSearch) = addTool(Tool.ofFileSearch(fileSearch))

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,27 @@ constructor(
}
}

/**
* Override the tools the assistant can use for this run. This is useful for modifying
* the behavior on a per-run basis.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(AssistantTool.ofCodeInterpreterTool(codeInterpreterTool))

/**
* Override the tools the assistant can use for this run. This is useful for modifying
* the behavior on a per-run basis.
*/
fun addTool(fileSearchTool: FileSearchTool) =
addTool(AssistantTool.ofFileSearchTool(fileSearchTool))

/**
* Override the tools the assistant can use for this run. This is useful for modifying
* the behavior on a per-run basis.
*/
fun addTool(functionTool: FunctionTool) =
addTool(AssistantTool.ofFunctionTool(functionTool))

/**
* An alternative to sampling with temperature, called nucleus sampling, where the model
* considers the results of the tokens with top_p probability mass. So 0.1 means only
Expand Down Expand Up @@ -1724,6 +1745,26 @@ constructor(
*/
fun addTool(tool: AssistantTool) = apply { body.addTool(tool) }

/**
* Override the tools the assistant can use for this run. This is useful for modifying the
* behavior on a per-run basis.
*/
fun addTool(codeInterpreterTool: CodeInterpreterTool) = apply {
body.addTool(codeInterpreterTool)
}

/**
* Override the tools the assistant can use for this run. This is useful for modifying the
* behavior on a per-run basis.
*/
fun addTool(fileSearchTool: FileSearchTool) = apply { body.addTool(fileSearchTool) }

/**
* Override the tools the assistant can use for this run. This is useful for modifying the
* behavior on a per-run basis.
*/
fun addTool(functionTool: FunctionTool) = apply { body.addTool(functionTool) }

/**
* An alternative to sampling with temperature, called nucleus sampling, where the model
* considers the results of the tokens with top_p probability mass. So 0.1 means only the
Expand Down Expand Up @@ -2387,6 +2428,13 @@ constructor(
}
}

/** The tools to add this file to. */
fun addTool(codeInterpreterTool: CodeInterpreterTool) =
addTool(Tool.ofCodeInterpreterTool(codeInterpreterTool))

/** The tools to add this file to. */
fun addTool(fileSearch: Tool.FileSearch) = addTool(Tool.ofFileSearch(fileSearch))

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down
Loading
Loading