diff --git a/client/src/main/java/com/theokanning/openai/client/OpenAiApi.java b/client/src/main/java/com/theokanning/openai/client/OpenAiApi.java index 7342e953..611cbf01 100644 --- a/client/src/main/java/com/theokanning/openai/client/OpenAiApi.java +++ b/client/src/main/java/com/theokanning/openai/client/OpenAiApi.java @@ -199,126 +199,126 @@ public interface OpenAiApi { @GET("v1/dashboard/billing/usage") Single billingUsage(@Query("start_date") LocalDate starDate, @Query("end_date") LocalDate endDate); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/assistants") Single createAssistant(@Body AssistantRequest request); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/assistants/{assistant_id}") Single retrieveAssistant(@Path("assistant_id") String assistantId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/assistants/{assistant_id}") Single modifyAssistant(@Path("assistant_id") String assistantId, @Body ModifyAssistantRequest request); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @DELETE("/v1/assistants/{assistant_id}") Single deleteAssistant(@Path("assistant_id") String assistantId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/assistants") Single> listAssistants(@QueryMap Map filterRequest); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/assistants/{assistant_id}/files") Single createAssistantFile(@Path("assistant_id") String assistantId, @Body AssistantFileRequest fileRequest); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/assistants/{assistant_id}/files/{file_id}") Single retrieveAssistantFile(@Path("assistant_id") String assistantId, @Path("file_id") String fileId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @DELETE("/v1/assistants/{assistant_id}/files/{file_id}") Single deleteAssistantFile(@Path("assistant_id") String assistantId, @Path("file_id") String fileId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/assistants/{assistant_id}/files") Single> listAssistantFiles(@Path("assistant_id") String assistantId, @QueryMap Map filterRequest); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads") Single createThread(@Body ThreadRequest request); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}") Single retrieveThread(@Path("thread_id") String threadId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads/{thread_id}") Single modifyThread(@Path("thread_id") String threadId, @Body ThreadRequest request); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @DELETE("/v1/threads/{thread_id}") Single deleteThread(@Path("thread_id") String threadId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads/{thread_id}/messages") Single createMessage(@Path("thread_id") String threadId, @Body MessageRequest request); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/messages/{message_id}") Single retrieveMessage(@Path("thread_id") String threadId, @Path("message_id") String messageId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads/{thread_id}/messages/{message_id}") Single modifyMessage(@Path("thread_id") String threadId, @Path("message_id") String messageId, @Body ModifyMessageRequest request); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/messages") Single> listMessages(@Path("thread_id") String threadId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/messages") Single> listMessages(@Path("thread_id") String threadId, @QueryMap Map filterRequest); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/messages/{message_id}/files/{file_id}") Single retrieveMessageFile(@Path("thread_id") String threadId, @Path("message_id") String messageId, @Path("file_id") String fileId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/messages/{message_id}/files") Single> listMessageFiles(@Path("thread_id") String threadId, @Path("message_id") String messageId); - @Headers({"OpenAI-Beta: assistants=v1"}) + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/messages/{message_id}/files") Single> listMessageFiles(@Path("thread_id") String threadId, @Path("message_id") String messageId, @QueryMap Map filterRequest); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads/{thread_id}/runs") Single createRun(@Path("thread_id") String threadId, @Body RunCreateRequest runCreateRequest); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/runs/{run_id}") Single retrieveRun(@Path("thread_id") String threadId, @Path("run_id") String runId); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads/{thread_id}/runs/{run_id}") Single modifyRun(@Path("thread_id") String threadId, @Path("run_id") String runId, @Body Map metadata); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/runs") Single> listRuns(@Path("thread_id") String threadId, @QueryMap Map listSearchParameters); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads/{thread_id}/runs/{run_id}/submit_tool_outputs") Single submitToolOutputs(@Path("thread_id") String threadId, @Path("run_id") String runId, @Body SubmitToolOutputsRequest submitToolOutputsRequest); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads/{thread_id}/runs/{run_id}/cancel") Single cancelRun(@Path("thread_id") String threadId, @Path("run_id") String runId); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @POST("/v1/threads/runs") Single createThreadAndRun(@Body CreateThreadAndRunRequest createThreadAndRunRequest); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/runs/{run_id}/steps/{step_id}") Single retrieveRunStep(@Path("thread_id") String threadId, @Path("run_id") String runId, @Path("step_id") String stepId); - @Headers("OpenAI-Beta: assistants=v1") + @Headers({"OpenAI-Beta: assistants=v1", "Content-Type: application/json"}) @GET("/v1/threads/{thread_id}/runs/{run_id}/steps") Single> listRunSteps(@Path("thread_id") String threadId, @Path("run_id") String runId, @QueryMap Map listSearchParameters); }