diff --git a/pom.xml b/pom.xml
index 53914e35..92704e9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
io.github.sashirestela
simple-openai
- 1.2.2
+ 1.2.3
jar
simple-openai
@@ -52,7 +52,7 @@
11
[2.0.9,3.0.0)
- 0.10.0
+ 0.11.1
[1.18.30,2.0.0)
[2.15.2,3.0.0)
[4.31.1,5.0.0)
diff --git a/src/main/java/io/github/sashirestela/openai/OpenAI.java b/src/main/java/io/github/sashirestela/openai/OpenAI.java
index b6430c24..3408c75c 100644
--- a/src/main/java/io/github/sashirestela/openai/OpenAI.java
+++ b/src/main/java/io/github/sashirestela/openai/OpenAI.java
@@ -579,6 +579,7 @@ interface Moderations {
* Assistants
*/
@Resource("/v1/assistants")
+ @Header(name = "OpenAI-Beta", value = "assistants=v1")
interface Assistants {
/**
@@ -587,7 +588,6 @@ interface Assistants {
* @param assistantRequest The assistant request.
* @return the created assistant object
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST
CompletableFuture create(@Body AssistantRequest assistantRequest);
@@ -597,7 +597,6 @@ interface Assistants {
* @param assistantId The ID of the assistant to retrieve.
* @return The {@link Assistant} object matching the specified ID.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{assistantId}")
CompletableFuture getOne(@Path("assistantId") String assistantId);
@@ -608,7 +607,6 @@ interface Assistants {
* @param assistantRequest The assistant request.
* @return the modified assistant object
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{assistantId}")
CompletableFuture modify(@Path("assistantId") String assistantId,
@Body AssistantRequest assistantRequest);
@@ -619,7 +617,6 @@ CompletableFuture modify(@Path("assistantId") String assistantId,
* @param assistantId The ID of the assistant to delete.
* @return the deletion status
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@DELETE("/{assistantId}")
CompletableFuture delete(@Path("assistantId") String assistantId);
@@ -638,7 +635,6 @@ default CompletableFuture> getList() {
* @param page The result page requested.
* @return the list of assistant objects
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET
CompletableFuture> getList(@Query PageRequest page);
@@ -662,7 +658,6 @@ default CompletableFuture createFile(String assistantId, String f
* should use.
* @return the created assistant file object.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{assistantId}/files")
CompletableFuture createFile(@Path("assistantId") String assistantId, @Body FilePath file);
@@ -673,7 +668,6 @@ default CompletableFuture createFile(String assistantId, String f
* @param fileId The ID of the file we're getting.
* @return the assistant file object matching the specified ID
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{assistantId}/files/{fileId}")
CompletableFuture getFile(@Path("assistantId") String assistantId,
@Path("fileId") String fileId);
@@ -685,7 +679,6 @@ CompletableFuture getFile(@Path("assistantId") String assistantId
* @param fileId The ID of the file to delete.
* @return the deletion status
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@DELETE("/{assistantId}/files/{fileId}")
CompletableFuture deleteFile(@Path("assistantId") String assistantId,
@Path("fileId") String fileId);
@@ -707,7 +700,6 @@ default CompletableFuture> getFileList(String assistantId) {
* @param page The requested result page.
* @return the list of assistant file objects.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{assistantId}/files")
CompletableFuture> getFileList(@Path("assistantId") String assistantId,
@Query PageRequest page);
@@ -721,6 +713,7 @@ CompletableFuture> getFileList(@Path("assistantId") String a
* Threads
*/
@Resource("/v1/threads")
+ @Header(name = "OpenAI-Beta", value = "assistants=v1")
interface Threads {
/**
@@ -738,7 +731,6 @@ default CompletableFuture create() {
* @param threadRequest The thread request.
* @return the created thread object
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST
CompletableFuture create(@Body ThreadRequest threadRequest);
@@ -748,7 +740,6 @@ default CompletableFuture create() {
* @param threadId The ID of the thread to retrieve.
* @return The {@link Thread} object matching the specified ID.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}")
CompletableFuture getOne(@Path("threadId") String threadId);
@@ -758,7 +749,6 @@ default CompletableFuture create() {
* @param threadRequest The thread request.
* @return the created thread object
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{threadId}")
CompletableFuture modify(@Path("threadId") String threadId, @Body ThreadRequest threadRequest);
@@ -768,7 +758,6 @@ default CompletableFuture create() {
* @param threadId The ID of the thread to delete.
* @return the thread deletion status
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@DELETE("/{threadId}")
CompletableFuture delete(@Path("threadId") String threadId);
@@ -779,7 +768,6 @@ default CompletableFuture create() {
* @param request The requested message to create.
* @return the created message object
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{threadId}/messages")
CompletableFuture createMessage(@Path("threadId") String threadId,
@Body ThreadMessageRequest request);
@@ -791,7 +779,6 @@ CompletableFuture createMessage(@Path("threadId") String threadId
* @param messageId The ID of the message to retrieve.
* @return The message object matching the specified ID.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}/messages/{messageId}")
CompletableFuture getMessage(@Path("threadId") String threadId,
@Path("messageId") String messageId);
@@ -804,7 +791,6 @@ CompletableFuture getMessage(@Path("threadId") String threadId,
* @param request The message modification request.
* @return The message object matching the specified ID.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{threadId}/messages/{messageId}")
CompletableFuture modifyMessage(@Path("threadId") String threadId,
@Path("messageId") String messageId, @Body ThreadMessageRequest request);
@@ -826,7 +812,6 @@ default CompletableFuture> getMessageList(String threadId) {
* @param page The requested result page.
* @return The list of message objects.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}/messages")
CompletableFuture> getMessageList(@Path("threadId") String threadId,
@Query PageRequest page);
@@ -838,7 +823,6 @@ CompletableFuture> getMessageList(@Path("threadId") String t
* @param messageId The ID of the message to delete.
* @return The thread message deletion status.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{threadId}/messages/{messageId}")
CompletableFuture deleteMessage(@Path("threadId") String threadId,
@Path("messageId") String messageId);
@@ -851,7 +835,6 @@ CompletableFuture deleteMessage(@Path("threadId") String
* @param fileId The ID of the file being retrieved.
* @return The message file object.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}/messages/{messageId}/files/{fileId}")
CompletableFuture getMessageFile(@Path("threadId") String threadId,
@Path("messageId") String messageId, @Path("fileId") String fileId);
@@ -875,7 +858,6 @@ default CompletableFuture> getMessageFileList(String thr
* @param page The requested result page.
* @return The list of message file objects.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}/messages/{messageId}/files")
CompletableFuture> getMessageFileList(@Path("threadId") String threadId,
@Path("messageId") String messageId, @Query PageRequest page);
@@ -900,7 +882,6 @@ default CompletableFuture createRun(String threadId, String assistant
* @param request The requested run.
* @return the queued run object
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{threadId}/runs")
CompletableFuture createRun(@Path("threadId") String threadId, @Body ThreadRunRequest request);
@@ -911,7 +892,6 @@ default CompletableFuture createRun(String threadId, String assistant
* @param runId The ID of the run to retrieve.
* @return The run object matching the specified ID.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}/runs/{runId}")
CompletableFuture getRun(@Path("threadId") String threadId, @Path("runId") String runId);
@@ -922,7 +902,6 @@ default CompletableFuture createRun(String threadId, String assistant
* @param runId The ID of the run to modify.
* @return The modified run object matching the specified ID.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{threadId}/runs/{runId}")
CompletableFuture modifyRun(@Path("threadId") String threadId, @Path("runId") String runId,
@Body ThreadRunRequest request);
@@ -944,7 +923,6 @@ default CompletableFuture> getRunList(String threadId) {
* @param page The requested page of result.
* @return A list of run objects.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}/runs")
CompletableFuture> getRunList(@Path("threadId") String threadId, @Query PageRequest page);
@@ -973,7 +951,6 @@ default CompletableFuture submitToolOutputs(String threadId, String r
* @param toolOutputs The tool output submission.
* @return The modified run object matching the specified ID.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{threadId}/runs/{runId}/submit_tool_outputs")
CompletableFuture submitToolOutputs(@Path("threadId") String threadId, @Path("runId") String runId,
@Body ToolOutputSubmission toolOutputs);
@@ -985,7 +962,6 @@ CompletableFuture submitToolOutputs(@Path("threadId") String threadId
* @param runId The ID of the run to cancel.
* @return The modified run object matching the specified ID.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/{threadId}/runs/{runId}/cancel")
CompletableFuture cancelRun(@Path("threadId") String threadId, @Path("runId") String runId);
@@ -995,7 +971,6 @@ CompletableFuture submitToolOutputs(@Path("threadId") String threadId
* @param request The thread request create and to run.
* @return A created run object.
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@POST("/runs")
CompletableFuture createThreadAndRun(@Body ThreadCreateAndRunRequest request);
@@ -1007,7 +982,6 @@ CompletableFuture submitToolOutputs(@Path("threadId") String threadId
* @param stepId The ID of the run step to retrieve.
* @return the list of run step objects
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}/runs/{runId}/steps/{stepId}")
CompletableFuture getRunStep(@Path("threadId") String threadId, @Path("runId") String runId,
@Path("stepId") String stepId);
@@ -1031,7 +1005,6 @@ default CompletableFuture> getRunStepList(String threadId, S
* @param page The requested result page.
* @return the list of run step objects
*/
- @Header(name = "OpenAI-Beta", value = "assistants=v1")
@GET("/{threadId}/runs/{runId}/steps")
CompletableFuture> getRunStepList(@Path("threadId") String threadId,
@Path("runId") String runId, @Query PageRequest page);