From 2a0e4f8b80bb8e374a227c94408667750b845e72 Mon Sep 17 00:00:00 2001 From: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com> Date: Thu, 10 Sep 2026 10:53:28 +0100 Subject: [PATCH] Preserve caller context at async request dispatch --- .../client/okhttp/AsyncRequestDispatchTest.kt | 253 ++++++++++++++++++ .../kotlin/com/openai/core/http/HttpClient.kt | 5 + .../services/async/BatchServiceAsyncImpl.kt | 8 +- .../async/CompletionServiceAsyncImpl.kt | 4 +- .../async/ContainerServiceAsyncImpl.kt | 8 +- .../ContentProvenanceCheckServiceAsyncImpl.kt | 2 +- .../async/ConversationServiceAsyncImpl.kt | 8 +- .../async/EmbeddingServiceAsyncImpl.kt | 2 +- .../services/async/EvalServiceAsyncImpl.kt | 10 +- .../services/async/FileServiceAsyncImpl.kt | 10 +- .../services/async/ImageServiceAsyncImpl.kt | 10 +- .../services/async/ModelServiceAsyncImpl.kt | 6 +- .../async/ModerationServiceAsyncImpl.kt | 2 +- .../async/ResponseServiceAsyncImpl.kt | 14 +- .../services/async/SkillServiceAsyncImpl.kt | 10 +- .../services/async/UploadServiceAsyncImpl.kt | 6 +- .../async/VectorStoreServiceAsyncImpl.kt | 12 +- .../services/async/VideoServiceAsyncImpl.kt | 20 +- .../AdminApiKeyServiceAsyncImpl.kt | 8 +- .../organization/AuditLogServiceAsyncImpl.kt | 2 +- .../CertificateServiceAsyncImpl.kt | 14 +- .../DataRetentionServiceAsyncImpl.kt | 4 +- .../organization/GroupServiceAsyncImpl.kt | 10 +- .../organization/InviteServiceAsyncImpl.kt | 8 +- .../organization/ProjectServiceAsyncImpl.kt | 10 +- .../organization/RoleServiceAsyncImpl.kt | 10 +- .../SpendAlertServiceAsyncImpl.kt | 10 +- .../SpendLimitServiceAsyncImpl.kt | 6 +- .../organization/UsageServiceAsyncImpl.kt | 22 +- .../organization/UserServiceAsyncImpl.kt | 8 +- .../groups/RoleServiceAsyncImpl.kt | 8 +- .../groups/UserServiceAsyncImpl.kt | 8 +- .../projects/ApiKeyServiceAsyncImpl.kt | 6 +- .../projects/CertificateServiceAsyncImpl.kt | 6 +- .../projects/DataRetentionServiceAsyncImpl.kt | 4 +- .../projects/GroupServiceAsyncImpl.kt | 8 +- .../HostedToolPermissionServiceAsyncImpl.kt | 4 +- .../ModelPermissionServiceAsyncImpl.kt | 6 +- .../projects/RateLimitServiceAsyncImpl.kt | 4 +- .../projects/RoleServiceAsyncImpl.kt | 10 +- .../ServiceAccountServiceAsyncImpl.kt | 10 +- .../projects/SpendAlertServiceAsyncImpl.kt | 10 +- .../projects/SpendLimitServiceAsyncImpl.kt | 6 +- .../projects/UserServiceAsyncImpl.kt | 10 +- .../projects/groups/RoleServiceAsyncImpl.kt | 8 +- .../serviceaccounts/ApiKeyServiceAsyncImpl.kt | 2 +- .../projects/users/RoleServiceAsyncImpl.kt | 8 +- .../users/RoleServiceAsyncImpl.kt | 8 +- .../async/audio/SpeechServiceAsyncImpl.kt | 2 +- .../audio/TranscriptionServiceAsyncImpl.kt | 4 +- .../audio/TranslationServiceAsyncImpl.kt | 2 +- .../async/beta/AssistantServiceAsyncImpl.kt | 10 +- .../async/beta/ResponseServiceAsyncImpl.kt | 14 +- .../async/beta/ThreadServiceAsyncImpl.kt | 12 +- .../beta/chatkit/SessionServiceAsyncImpl.kt | 4 +- .../beta/chatkit/ThreadServiceAsyncImpl.kt | 8 +- .../beta/realtime/SessionServiceAsyncImpl.kt | 2 +- .../TranscriptionSessionServiceAsyncImpl.kt | 2 +- .../responses/InputItemServiceAsyncImpl.kt | 2 +- .../responses/InputTokenServiceAsyncImpl.kt | 2 +- .../beta/threads/MessageServiceAsyncImpl.kt | 10 +- .../async/beta/threads/RunServiceAsyncImpl.kt | 16 +- .../beta/threads/runs/StepServiceAsyncImpl.kt | 4 +- .../chat/ChatCompletionServiceAsyncImpl.kt | 12 +- .../completions/MessageServiceAsyncImpl.kt | 2 +- .../async/containers/FileServiceAsyncImpl.kt | 8 +- .../files/ContentServiceAsyncImpl.kt | 2 +- .../conversations/ItemServiceAsyncImpl.kt | 8 +- .../async/evals/RunServiceAsyncImpl.kt | 10 +- .../evals/runs/OutputItemServiceAsyncImpl.kt | 4 +- .../async/finetuning/JobServiceAsyncImpl.kt | 14 +- .../alpha/GraderServiceAsyncImpl.kt | 4 +- .../checkpoints/PermissionServiceAsyncImpl.kt | 8 +- .../jobs/CheckpointServiceAsyncImpl.kt | 2 +- .../async/realtime/CallServiceAsyncImpl.kt | 10 +- .../realtime/ClientSecretServiceAsyncImpl.kt | 2 +- .../responses/InputItemServiceAsyncImpl.kt | 2 +- .../responses/InputTokenServiceAsyncImpl.kt | 2 +- .../async/safety/AlertServiceAsyncImpl.kt | 2 +- .../async/skills/ContentServiceAsyncImpl.kt | 2 +- .../async/skills/VersionServiceAsyncImpl.kt | 8 +- .../versions/ContentServiceAsyncImpl.kt | 2 +- .../async/uploads/PartServiceAsyncImpl.kt | 2 +- .../vectorstores/FileBatchServiceAsyncImpl.kt | 8 +- .../vectorstores/FileServiceAsyncImpl.kt | 12 +- 85 files changed, 553 insertions(+), 295 deletions(-) create mode 100644 openai-java-client-okhttp/src/test/kotlin/com/openai/client/okhttp/AsyncRequestDispatchTest.kt diff --git a/openai-java-client-okhttp/src/test/kotlin/com/openai/client/okhttp/AsyncRequestDispatchTest.kt b/openai-java-client-okhttp/src/test/kotlin/com/openai/client/okhttp/AsyncRequestDispatchTest.kt new file mode 100644 index 000000000..4b6ff24b2 --- /dev/null +++ b/openai-java-client-okhttp/src/test/kotlin/com/openai/client/okhttp/AsyncRequestDispatchTest.kt @@ -0,0 +1,253 @@ +package com.openai.client.okhttp + +import com.openai.client.OpenAIClientAsync +import com.openai.client.OpenAIClientAsyncImpl +import com.openai.core.ClientOptions +import com.openai.core.RequestOptions +import com.openai.core.http.AsyncStreamResponse +import com.openai.core.http.HttpClient +import com.openai.core.http.HttpRequest +import com.openai.core.http.HttpResponse +import com.openai.models.chat.completions.ChatCompletionChunk +import com.openai.models.chat.completions.ChatCompletionCreateParams +import java.util.Optional +import java.util.concurrent.AbstractExecutorService +import java.util.concurrent.CompletableFuture +import java.util.concurrent.CopyOnWriteArrayList +import java.util.concurrent.CountDownLatch +import java.util.concurrent.ExecutionException +import java.util.concurrent.Executors +import java.util.concurrent.TimeUnit +import okhttp3.mockwebserver.Dispatcher +import okhttp3.mockwebserver.MockResponse +import okhttp3.mockwebserver.MockWebServer +import okhttp3.mockwebserver.RecordedRequest +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows + +internal class AsyncRequestDispatchTest { + private val context = ThreadLocal() + + @Test fun asyncClientPreservesEachCallersContext() = verifyRequestDispatch(false) + + @Test fun syncClientAsyncViewPreservesEachCallersContext() = verifyRequestDispatch(true) + + private fun verifyRequestDispatch(fromSyncClient: Boolean) { + val releaseResponse = CountDownLatch(1) + val server = + server( + releaseResponse, + """{"id":"model-test","object":"model","created":0,"owned_by":"test"}""", + ) + val dispatcher = ContextExecutor("request-dispatcher", context) + val client: OpenAIClientAsync = + if (fromSyncClient) { + OpenAIOkHttpClient.builder() + .apiKey("test-key") + .baseUrl(server.url("/").toString()) + .dispatcherExecutorService(dispatcher) + .maxRetries(0) + .build() + .async() + } else { + OpenAIOkHttpClientAsync.builder() + .apiKey("test-key") + .baseUrl(server.url("/").toString()) + .dispatcherExecutorService(dispatcher) + .maxRetries(0) + .build() + } + try { + context.set("first-request") + val first = client.models().retrieve("model-test") + context.set("second-request") + val second = client.models().withRawResponse().retrieve("model-test") + context.remove() + + assertThat(first.isDone).isFalse() + assertThat(second.isDone).isFalse() + releaseResponse.countDown() + assertThat(first.get(5, TimeUnit.SECONDS).id()).isEqualTo("model-test") + second.get(5, TimeUnit.SECONDS).use { response -> + assertThat(response.parse().id()).isEqualTo("model-test") + } + assertThat(dispatcher.submissions) + .containsExactlyInAnyOrder("first-request", "second-request") + } finally { + context.remove() + releaseResponse.countDown() + client.close() + server.shutdown() + } + } + + @Test fun streamingCallbacksUseConfiguredContextExecutor() = verifyStreamingCallbacks(false) + + @Test fun streamingCallbacksUseExplicitContextExecutor() = verifyStreamingCallbacks(true) + + private fun verifyStreamingCallbacks(explicitExecutor: Boolean) { + val releaseResponse = CountDownLatch(1) + val body = + "data: {\"id\":\"chunk-test\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"model-test\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"hello\"},\"finish_reason\":null}]}\n\ndata: [DONE]\n\n" + val server = server(releaseResponse, body) + val dispatcher = ContextExecutor("request-dispatcher", context) + val configured = ContextExecutor("configured-callback", context) + val explicit = ContextExecutor("explicit-callback", context) + val selected = if (explicitExecutor) explicit else configured + val client = + OpenAIOkHttpClientAsync.builder() + .apiKey("test-key") + .baseUrl(server.url("/").toString()) + .dispatcherExecutorService(dispatcher) + .streamHandlerExecutor(configured) + .maxRetries(0) + .build() + val observed = CopyOnWriteArrayList>() + val content = CopyOnWriteArrayList() + val errors = CopyOnWriteArrayList() + try { + context.set("stream-request") + val stream = + client + .chat() + .completions() + .createStreaming( + ChatCompletionCreateParams.builder() + .model("model-test") + .addUserMessage("hello") + .build() + ) + val handler = + object : AsyncStreamResponse.Handler { + override fun onNext(value: ChatCompletionChunk) { + observed.add(context.get() to Thread.currentThread().name) + content.add(value.choices().single().delta().content().orElse("")) + } + + override fun onComplete(error: Optional) { + observed.add(context.get() to Thread.currentThread().name) + error.ifPresent(errors::add) + } + } + if (explicitExecutor) stream.subscribe(handler, explicit) else stream.subscribe(handler) + context.remove() + assertThat(stream.onCompleteFuture().isDone).isFalse() + releaseResponse.countDown() + stream.onCompleteFuture().get(5, TimeUnit.SECONDS) + + assertThat(errors).isEmpty() + assertThat(content).containsExactly("hello") + assertThat(observed) + .containsExactly( + "stream-request" to selected.threadName, + "stream-request" to selected.threadName, + ) + assertThat(dispatcher.submissions).containsExactly("stream-request") + assertThat(selected.submissions).containsExactly("stream-request") + if (explicitExecutor) assertThat(configured.submissions).isEmpty() + } finally { + context.remove() + releaseResponse.countDown() + client.close() + explicit.shutdownNow() + server.shutdown() + } + } + + @Test fun synchronousTransportFailureRemainsAnExceptionalFuture() = verifyTransportFailure(true) + + @Test fun failedTransportFutureIsPropagated() = verifyTransportFailure(false) + + private fun verifyTransportFailure(throwsSynchronously: Boolean) { + val failure = IllegalStateException("test transport failure") + val caller = Thread.currentThread() + val dispatchedOn = CompletableFuture() + val transport = + object : HttpClient { + override fun execute( + request: HttpRequest, + requestOptions: RequestOptions, + ): HttpResponse = error("The synchronous transport must not be called") + + override fun executeAsync( + request: HttpRequest, + requestOptions: RequestOptions, + ): CompletableFuture { + dispatchedOn.complete(Thread.currentThread()) + if (throwsSynchronously) throw failure + return CompletableFuture().also { + it.completeExceptionally(failure) + } + } + + override fun close() {} + } + val client = + OpenAIClientAsyncImpl( + ClientOptions.builder() + .httpClient(transport) + .apiKey("test-key") + .maxRetries(0) + .build() + ) + try { + val future = client.models().retrieve("model-test") + val error = assertThrows { future.get(5, TimeUnit.SECONDS) } + assertThat(error.cause).isSameAs(failure) + assertThat(dispatchedOn.get(5, TimeUnit.SECONDS)).isSameAs(caller) + } finally { + client.close() + } + } + + private fun server(releaseResponse: CountDownLatch, body: String): MockWebServer = + MockWebServer().apply { + dispatcher = + object : Dispatcher() { + override fun dispatch(request: RecordedRequest): MockResponse { + check(releaseResponse.await(5, TimeUnit.SECONDS)) + return MockResponse() + .setHeader( + "Content-Type", + if (body.startsWith("data:")) "text/event-stream" + else "application/json", + ) + .setBody(body) + } + } + start() + } +} + +// Model an executor that captures application context at submission, as managed executors do. +private class ContextExecutor(val threadName: String, private val context: ThreadLocal) : + AbstractExecutorService() { + private val delegate = Executors.newSingleThreadExecutor { Thread(it, threadName) } + val submissions = CopyOnWriteArrayList() + + override fun execute(command: Runnable) { + val captured = context.get() + submissions.add(captured) + delegate.execute { + val previous = context.get() + try { + context.set(captured) + command.run() + } finally { + if (previous == null) context.remove() else context.set(previous) + } + } + } + + override fun shutdown() = delegate.shutdown() + + override fun shutdownNow(): MutableList = delegate.shutdownNow() + + override fun isShutdown(): Boolean = delegate.isShutdown + + override fun isTerminated(): Boolean = delegate.isTerminated + + override fun awaitTermination(timeout: Long, unit: TimeUnit): Boolean = + delegate.awaitTermination(timeout, unit) +} diff --git a/openai-java-core/src/main/kotlin/com/openai/core/http/HttpClient.kt b/openai-java-core/src/main/kotlin/com/openai/core/http/HttpClient.kt index 3db3a2669..421d4f00b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/core/http/HttpClient.kt +++ b/openai-java-core/src/main/kotlin/com/openai/core/http/HttpClient.kt @@ -13,6 +13,11 @@ interface HttpClient : AutoCloseable { fun execute(request: HttpRequest): HttpResponse = execute(request, RequestOptions.none()) + /** + * Starts an asynchronous request on the request-preparation completion thread. + * + * The transport is responsible for dispatching any blocking I/O to its executor. + */ fun executeAsync( request: HttpRequest, requestOptions: RequestOptions = RequestOptions.none(), diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/BatchServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/BatchServiceAsyncImpl.kt index 2c1f1dfb5..4e80feaf8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/BatchServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/BatchServiceAsyncImpl.kt @@ -102,7 +102,7 @@ class BatchServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -138,7 +138,7 @@ class BatchServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -172,7 +172,7 @@ class BatchServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -217,7 +217,7 @@ class BatchServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/CompletionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/CompletionServiceAsyncImpl.kt index 4c20cd1cb..2968d0444 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/CompletionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/CompletionServiceAsyncImpl.kt @@ -95,7 +95,7 @@ class CompletionServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -140,7 +140,7 @@ class CompletionServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ContainerServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ContainerServiceAsyncImpl.kt index 614268207..8efb5a11f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ContainerServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ContainerServiceAsyncImpl.kt @@ -116,7 +116,7 @@ class ContainerServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -153,7 +153,7 @@ class ContainerServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -187,7 +187,7 @@ class ContainerServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -232,7 +232,7 @@ class ContainerServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response.use { deleteHandler.handle(it) } diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ContentProvenanceCheckServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ContentProvenanceCheckServiceAsyncImpl.kt index 2acdd7962..24fa720f8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ContentProvenanceCheckServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ContentProvenanceCheckServiceAsyncImpl.kt @@ -80,7 +80,7 @@ internal constructor(private val clientOptions: ClientOptions) : ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ConversationServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ConversationServiceAsyncImpl.kt index 0f90995ac..196c2aec6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ConversationServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ConversationServiceAsyncImpl.kt @@ -116,7 +116,7 @@ class ConversationServiceAsyncImpl internal constructor(private val clientOption ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -153,7 +153,7 @@ class ConversationServiceAsyncImpl internal constructor(private val clientOption ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -191,7 +191,7 @@ class ConversationServiceAsyncImpl internal constructor(private val clientOption ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -229,7 +229,7 @@ class ConversationServiceAsyncImpl internal constructor(private val clientOption ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/EmbeddingServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/EmbeddingServiceAsyncImpl.kt index 9a77cdc06..72e2f2922 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/EmbeddingServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/EmbeddingServiceAsyncImpl.kt @@ -78,7 +78,7 @@ class EmbeddingServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/EvalServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/EvalServiceAsyncImpl.kt index a09af60fc..fa1699cf5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/EvalServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/EvalServiceAsyncImpl.kt @@ -128,7 +128,7 @@ class EvalServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -165,7 +165,7 @@ class EvalServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -203,7 +203,7 @@ class EvalServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -237,7 +237,7 @@ class EvalServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -283,7 +283,7 @@ class EvalServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/FileServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/FileServiceAsyncImpl.kt index 6e24a5624..b0259780c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/FileServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/FileServiceAsyncImpl.kt @@ -116,7 +116,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -153,7 +153,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -187,7 +187,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -233,7 +233,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -268,7 +268,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response) } } } diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsyncImpl.kt index 2049cc35c..44b4022db 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsyncImpl.kt @@ -122,7 +122,7 @@ class ImageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -157,7 +157,7 @@ class ImageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -198,7 +198,7 @@ class ImageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -235,7 +235,7 @@ class ImageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -280,7 +280,7 @@ class ImageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ModelServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ModelServiceAsyncImpl.kt index 06c8cb0ff..220cb3fc7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ModelServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ModelServiceAsyncImpl.kt @@ -97,7 +97,7 @@ class ModelServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -131,7 +131,7 @@ class ModelServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -177,7 +177,7 @@ class ModelServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ModerationServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ModerationServiceAsyncImpl.kt index a3a99206e..818480ada 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ModerationServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ModerationServiceAsyncImpl.kt @@ -75,7 +75,7 @@ class ModerationServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsyncImpl.kt index 3701198b2..637ea5e0b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsyncImpl.kt @@ -167,7 +167,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -212,7 +212,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -251,7 +251,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -290,7 +290,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -329,7 +329,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response.use { deleteHandler.handle(it) } @@ -361,7 +361,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -396,7 +396,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/SkillServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/SkillServiceAsyncImpl.kt index 463a595b9..af9f17a6c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/SkillServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/SkillServiceAsyncImpl.kt @@ -135,7 +135,7 @@ class SkillServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -171,7 +171,7 @@ class SkillServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -208,7 +208,7 @@ class SkillServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -242,7 +242,7 @@ class SkillServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -288,7 +288,7 @@ class SkillServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/UploadServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/UploadServiceAsyncImpl.kt index 3f7f8af60..863c8f2a9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/UploadServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/UploadServiceAsyncImpl.kt @@ -106,7 +106,7 @@ class UploadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -143,7 +143,7 @@ class UploadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -180,7 +180,7 @@ class UploadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/VectorStoreServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/VectorStoreServiceAsyncImpl.kt index 2faac4d8a..02bc761cb 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/VectorStoreServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/VectorStoreServiceAsyncImpl.kt @@ -154,7 +154,7 @@ class VectorStoreServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -192,7 +192,7 @@ class VectorStoreServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -231,7 +231,7 @@ class VectorStoreServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -266,7 +266,7 @@ class VectorStoreServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -313,7 +313,7 @@ class VectorStoreServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -352,7 +352,7 @@ class VectorStoreServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/VideoServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/VideoServiceAsyncImpl.kt index 748494443..cbf80c0d8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/VideoServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/VideoServiceAsyncImpl.kt @@ -166,7 +166,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -203,7 +203,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -238,7 +238,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -285,7 +285,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -321,7 +321,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -357,7 +357,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response) } } @@ -382,7 +382,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -417,7 +417,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -455,7 +455,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -493,7 +493,7 @@ class VideoServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/AdminApiKeyServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/AdminApiKeyServiceAsyncImpl.kt index 209526d3c..30da83e0d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/AdminApiKeyServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/AdminApiKeyServiceAsyncImpl.kt @@ -104,7 +104,7 @@ class AdminApiKeyServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -141,7 +141,7 @@ class AdminApiKeyServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -175,7 +175,7 @@ class AdminApiKeyServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -221,7 +221,7 @@ class AdminApiKeyServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/AuditLogServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/AuditLogServiceAsyncImpl.kt index 7320335a6..df02b91a5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/AuditLogServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/AuditLogServiceAsyncImpl.kt @@ -74,7 +74,7 @@ class AuditLogServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/CertificateServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/CertificateServiceAsyncImpl.kt index 1a3aafcf2..3913d4522 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/CertificateServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/CertificateServiceAsyncImpl.kt @@ -131,7 +131,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -168,7 +168,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -206,7 +206,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -240,7 +240,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -286,7 +286,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -321,7 +321,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -364,7 +364,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/DataRetentionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/DataRetentionServiceAsyncImpl.kt index 60836a454..10def6a23 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/DataRetentionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/DataRetentionServiceAsyncImpl.kt @@ -81,7 +81,7 @@ class DataRetentionServiceAsyncImpl internal constructor(private val clientOptio ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -116,7 +116,7 @@ class DataRetentionServiceAsyncImpl internal constructor(private val clientOptio ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/GroupServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/GroupServiceAsyncImpl.kt index 8986b449e..3e0b7bd8f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/GroupServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/GroupServiceAsyncImpl.kt @@ -135,7 +135,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -171,7 +171,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -209,7 +209,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -243,7 +243,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -289,7 +289,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/InviteServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/InviteServiceAsyncImpl.kt index 3142d8ece..4ade6a814 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/InviteServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/InviteServiceAsyncImpl.kt @@ -102,7 +102,7 @@ class InviteServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -138,7 +138,7 @@ class InviteServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -172,7 +172,7 @@ class InviteServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -218,7 +218,7 @@ class InviteServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/ProjectServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/ProjectServiceAsyncImpl.kt index ea821b429..84f96220f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/ProjectServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/ProjectServiceAsyncImpl.kt @@ -272,7 +272,7 @@ class ProjectServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -309,7 +309,7 @@ class ProjectServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -346,7 +346,7 @@ class ProjectServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -380,7 +380,7 @@ class ProjectServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -426,7 +426,7 @@ class ProjectServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/RoleServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/RoleServiceAsyncImpl.kt index 1f6b25d24..db2a94532 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/RoleServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/RoleServiceAsyncImpl.kt @@ -110,7 +110,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -146,7 +146,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -183,7 +183,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -217,7 +217,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -263,7 +263,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/SpendAlertServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/SpendAlertServiceAsyncImpl.kt index 5134bebf2..032781812 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/SpendAlertServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/SpendAlertServiceAsyncImpl.kt @@ -111,7 +111,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -148,7 +148,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -186,7 +186,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -220,7 +220,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -266,7 +266,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/SpendLimitServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/SpendLimitServiceAsyncImpl.kt index 0b7ebbac8..768af8690 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/SpendLimitServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/SpendLimitServiceAsyncImpl.kt @@ -90,7 +90,7 @@ class SpendLimitServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -125,7 +125,7 @@ class SpendLimitServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -160,7 +160,7 @@ class SpendLimitServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/UsageServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/UsageServiceAsyncImpl.kt index 6b8f063f6..f0b58b0f0 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/UsageServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/UsageServiceAsyncImpl.kt @@ -162,7 +162,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -196,7 +196,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -230,7 +230,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -264,7 +264,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -298,7 +298,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -332,7 +332,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -366,7 +366,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -400,7 +400,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -434,7 +434,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -468,7 +468,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -502,7 +502,7 @@ class UsageServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/UserServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/UserServiceAsyncImpl.kt index 917ba6ab9..5b0b3796f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/UserServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/UserServiceAsyncImpl.kt @@ -117,7 +117,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -155,7 +155,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -189,7 +189,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -235,7 +235,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/groups/RoleServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/groups/RoleServiceAsyncImpl.kt index 5dbf22227..bc55b73f6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/groups/RoleServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/groups/RoleServiceAsyncImpl.kt @@ -107,7 +107,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -150,7 +150,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -187,7 +187,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -239,7 +239,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/groups/UserServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/groups/UserServiceAsyncImpl.kt index 4a4aaf96f..600d9a36e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/groups/UserServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/groups/UserServiceAsyncImpl.kt @@ -107,7 +107,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -150,7 +150,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -187,7 +187,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -239,7 +239,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ApiKeyServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ApiKeyServiceAsyncImpl.kt index 9a3d1409a..7ef70a19c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ApiKeyServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ApiKeyServiceAsyncImpl.kt @@ -103,7 +103,7 @@ class ApiKeyServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -140,7 +140,7 @@ class ApiKeyServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -192,7 +192,7 @@ class ApiKeyServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/CertificateServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/CertificateServiceAsyncImpl.kt index 1efabf406..865aa6e24 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/CertificateServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/CertificateServiceAsyncImpl.kt @@ -104,7 +104,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -156,7 +156,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -208,7 +208,7 @@ class CertificateServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/DataRetentionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/DataRetentionServiceAsyncImpl.kt index 868c5f9f9..7711c4073 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/DataRetentionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/DataRetentionServiceAsyncImpl.kt @@ -91,7 +91,7 @@ class DataRetentionServiceAsyncImpl internal constructor(private val clientOptio ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -134,7 +134,7 @@ class DataRetentionServiceAsyncImpl internal constructor(private val clientOptio ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/GroupServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/GroupServiceAsyncImpl.kt index 01def70f4..0e4b76a04 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/GroupServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/GroupServiceAsyncImpl.kt @@ -118,7 +118,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -161,7 +161,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -198,7 +198,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -250,7 +250,7 @@ class GroupServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/HostedToolPermissionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/HostedToolPermissionServiceAsyncImpl.kt index e6c4060d2..5a69d6816 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/HostedToolPermissionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/HostedToolPermissionServiceAsyncImpl.kt @@ -96,7 +96,7 @@ internal constructor(private val clientOptions: ClientOptions) : HostedToolPermi ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -139,7 +139,7 @@ internal constructor(private val clientOptions: ClientOptions) : HostedToolPermi ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ModelPermissionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ModelPermissionServiceAsyncImpl.kt index add8103c8..a0a5006af 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ModelPermissionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ModelPermissionServiceAsyncImpl.kt @@ -102,7 +102,7 @@ internal constructor(private val clientOptions: ClientOptions) : ModelPermission ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -145,7 +145,7 @@ internal constructor(private val clientOptions: ClientOptions) : ModelPermission ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -188,7 +188,7 @@ internal constructor(private val clientOptions: ClientOptions) : ModelPermission ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/RateLimitServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/RateLimitServiceAsyncImpl.kt index 34c2d1750..e8872ec1d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/RateLimitServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/RateLimitServiceAsyncImpl.kt @@ -93,7 +93,7 @@ class RateLimitServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -145,7 +145,7 @@ class RateLimitServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/RoleServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/RoleServiceAsyncImpl.kt index 2d46deb35..939671d1e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/RoleServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/RoleServiceAsyncImpl.kt @@ -113,7 +113,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -154,7 +154,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -196,7 +196,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -233,7 +233,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -284,7 +284,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ServiceAccountServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ServiceAccountServiceAsyncImpl.kt index 2232772d7..409a47f20 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ServiceAccountServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/ServiceAccountServiceAsyncImpl.kt @@ -134,7 +134,7 @@ internal constructor(private val clientOptions: ClientOptions) : ServiceAccountS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -177,7 +177,7 @@ internal constructor(private val clientOptions: ClientOptions) : ServiceAccountS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -221,7 +221,7 @@ internal constructor(private val clientOptions: ClientOptions) : ServiceAccountS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -263,7 +263,7 @@ internal constructor(private val clientOptions: ClientOptions) : ServiceAccountS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -315,7 +315,7 @@ internal constructor(private val clientOptions: ClientOptions) : ServiceAccountS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/SpendAlertServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/SpendAlertServiceAsyncImpl.kt index 9d16201fb..8e8999adb 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/SpendAlertServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/SpendAlertServiceAsyncImpl.kt @@ -119,7 +119,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -162,7 +162,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -206,7 +206,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -248,7 +248,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -300,7 +300,7 @@ class SpendAlertServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/SpendLimitServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/SpendLimitServiceAsyncImpl.kt index 26262bb4d..8212fe9c5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/SpendLimitServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/SpendLimitServiceAsyncImpl.kt @@ -100,7 +100,7 @@ class SpendLimitServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -143,7 +143,7 @@ class SpendLimitServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -186,7 +186,7 @@ class SpendLimitServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/UserServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/UserServiceAsyncImpl.kt index 34983f6f3..fa5fd30e1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/UserServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/UserServiceAsyncImpl.kt @@ -126,7 +126,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -169,7 +169,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -213,7 +213,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -250,7 +250,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -302,7 +302,7 @@ class UserServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/groups/RoleServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/groups/RoleServiceAsyncImpl.kt index 4a562dcb0..59a90a832 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/groups/RoleServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/groups/RoleServiceAsyncImpl.kt @@ -113,7 +113,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -157,7 +157,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -200,7 +200,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -253,7 +253,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/serviceaccounts/ApiKeyServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/serviceaccounts/ApiKeyServiceAsyncImpl.kt index d5d9c882a..d9bc8563b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/serviceaccounts/ApiKeyServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/serviceaccounts/ApiKeyServiceAsyncImpl.kt @@ -86,7 +86,7 @@ class ApiKeyServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/users/RoleServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/users/RoleServiceAsyncImpl.kt index ac411eb60..0b7609246 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/users/RoleServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/projects/users/RoleServiceAsyncImpl.kt @@ -113,7 +113,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -157,7 +157,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -200,7 +200,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -253,7 +253,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/users/RoleServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/users/RoleServiceAsyncImpl.kt index b528ee563..6de27a050 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/users/RoleServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/admin/organization/users/RoleServiceAsyncImpl.kt @@ -107,7 +107,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -150,7 +150,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -187,7 +187,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -239,7 +239,7 @@ class RoleServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/audio/SpeechServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/audio/SpeechServiceAsyncImpl.kt index 6da642182..171cd8d66 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/audio/SpeechServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/audio/SpeechServiceAsyncImpl.kt @@ -69,7 +69,7 @@ class SpeechServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response) } } } diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncImpl.kt index 6fc5792fa..33b02e2aa 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncImpl.kt @@ -106,7 +106,7 @@ class TranscriptionServiceAsyncImpl internal constructor(private val clientOptio ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> val handler = if (params.responseFormat().getOrNull()?.isJson() != false) @@ -151,7 +151,7 @@ class TranscriptionServiceAsyncImpl internal constructor(private val clientOptio ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranslationServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranslationServiceAsyncImpl.kt index c0c6d605a..4d1d9b46e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranslationServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranslationServiceAsyncImpl.kt @@ -75,7 +75,7 @@ class TranslationServiceAsyncImpl internal constructor(private val clientOptions ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/AssistantServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/AssistantServiceAsyncImpl.kt index 8a279a3d6..36fdd07af 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/AssistantServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/AssistantServiceAsyncImpl.kt @@ -125,7 +125,7 @@ class AssistantServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -164,7 +164,7 @@ class AssistantServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -204,7 +204,7 @@ class AssistantServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -240,7 +240,7 @@ class AssistantServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -288,7 +288,7 @@ class AssistantServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ResponseServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ResponseServiceAsyncImpl.kt index 9b9950e29..2719335d9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ResponseServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ResponseServiceAsyncImpl.kt @@ -167,7 +167,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -213,7 +213,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -253,7 +253,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -293,7 +293,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -333,7 +333,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response.use { deleteHandler.handle(it) } @@ -366,7 +366,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -402,7 +402,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ThreadServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ThreadServiceAsyncImpl.kt index e55f7cd1e..9761e9a2f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ThreadServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ThreadServiceAsyncImpl.kt @@ -176,7 +176,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -214,7 +214,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -253,7 +253,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -293,7 +293,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -329,7 +329,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -377,7 +377,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/chatkit/SessionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/chatkit/SessionServiceAsyncImpl.kt index bab85904e..0d51a837b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/chatkit/SessionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/chatkit/SessionServiceAsyncImpl.kt @@ -92,7 +92,7 @@ class SessionServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -131,7 +131,7 @@ class SessionServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/chatkit/ThreadServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/chatkit/ThreadServiceAsyncImpl.kt index 316039766..aa174d760 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/chatkit/ThreadServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/chatkit/ThreadServiceAsyncImpl.kt @@ -115,7 +115,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -150,7 +150,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -197,7 +197,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -235,7 +235,7 @@ class ThreadServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/realtime/SessionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/realtime/SessionServiceAsyncImpl.kt index 94fca0df6..ed26345bb 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/realtime/SessionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/realtime/SessionServiceAsyncImpl.kt @@ -79,7 +79,7 @@ class SessionServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/realtime/TranscriptionSessionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/realtime/TranscriptionSessionServiceAsyncImpl.kt index b45f1b23d..08d37c559 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/realtime/TranscriptionSessionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/realtime/TranscriptionSessionServiceAsyncImpl.kt @@ -84,7 +84,7 @@ internal constructor(private val clientOptions: ClientOptions) : TranscriptionSe ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/responses/InputItemServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/responses/InputItemServiceAsyncImpl.kt index 4a6e08ab2..63c476de4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/responses/InputItemServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/responses/InputItemServiceAsyncImpl.kt @@ -79,7 +79,7 @@ class InputItemServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/responses/InputTokenServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/responses/InputTokenServiceAsyncImpl.kt index 55d486089..51ae57b88 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/responses/InputTokenServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/responses/InputTokenServiceAsyncImpl.kt @@ -75,7 +75,7 @@ class InputTokenServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/MessageServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/MessageServiceAsyncImpl.kt index fe7dd9acb..013a7b262 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/MessageServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/MessageServiceAsyncImpl.kt @@ -129,7 +129,7 @@ class MessageServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -173,7 +173,7 @@ class MessageServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -217,7 +217,7 @@ class MessageServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -256,7 +256,7 @@ class MessageServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -309,7 +309,7 @@ class MessageServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncImpl.kt index 807ddf9d7..6a1ef5647 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncImpl.kt @@ -183,7 +183,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -234,7 +234,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -274,7 +274,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -313,7 +313,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -352,7 +352,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -405,7 +405,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -451,7 +451,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -509,7 +509,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/runs/StepServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/runs/StepServiceAsyncImpl.kt index 9773f8527..f40762e76 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/runs/StepServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/threads/runs/StepServiceAsyncImpl.kt @@ -107,7 +107,7 @@ class StepServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -152,7 +152,7 @@ class StepServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncImpl.kt index 720075d3f..c467cd879 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncImpl.kt @@ -146,7 +146,7 @@ internal constructor(private val clientOptions: ClientOptions) : ChatCompletionS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -191,7 +191,7 @@ internal constructor(private val clientOptions: ClientOptions) : ChatCompletionS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -230,7 +230,7 @@ internal constructor(private val clientOptions: ClientOptions) : ChatCompletionS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -268,7 +268,7 @@ internal constructor(private val clientOptions: ClientOptions) : ChatCompletionS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -302,7 +302,7 @@ internal constructor(private val clientOptions: ClientOptions) : ChatCompletionS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -348,7 +348,7 @@ internal constructor(private val clientOptions: ClientOptions) : ChatCompletionS ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/chat/completions/MessageServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/chat/completions/MessageServiceAsyncImpl.kt index 50dee1358..758e32887 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/chat/completions/MessageServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/chat/completions/MessageServiceAsyncImpl.kt @@ -79,7 +79,7 @@ class MessageServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/containers/FileServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/containers/FileServiceAsyncImpl.kt index 6671cd08a..ce6626c83 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/containers/FileServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/containers/FileServiceAsyncImpl.kt @@ -120,7 +120,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -162,7 +162,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -199,7 +199,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -249,7 +249,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response.use { deleteHandler.handle(it) } diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/containers/files/ContentServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/containers/files/ContentServiceAsyncImpl.kt index 48f4985b8..d46015c88 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/containers/files/ContentServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/containers/files/ContentServiceAsyncImpl.kt @@ -77,7 +77,7 @@ class ContentServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response) } } } diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/conversations/ItemServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/conversations/ItemServiceAsyncImpl.kt index 0a4870880..35f5050a1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/conversations/ItemServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/conversations/ItemServiceAsyncImpl.kt @@ -107,7 +107,7 @@ class ItemServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -149,7 +149,7 @@ class ItemServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -186,7 +186,7 @@ class ItemServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -237,7 +237,7 @@ class ItemServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/evals/RunServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/evals/RunServiceAsyncImpl.kt index 67f57f144..9d9b8f859 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/evals/RunServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/evals/RunServiceAsyncImpl.kt @@ -133,7 +133,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -170,7 +170,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -207,7 +207,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -253,7 +253,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -291,7 +291,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/evals/runs/OutputItemServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/evals/runs/OutputItemServiceAsyncImpl.kt index 783e93924..5f1f9d60b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/evals/runs/OutputItemServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/evals/runs/OutputItemServiceAsyncImpl.kt @@ -95,7 +95,7 @@ class OutputItemServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -138,7 +138,7 @@ class OutputItemServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/JobServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/JobServiceAsyncImpl.kt index ecdac83e7..8738c9542 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/JobServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/JobServiceAsyncImpl.kt @@ -145,7 +145,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -182,7 +182,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -216,7 +216,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -262,7 +262,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -299,7 +299,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -345,7 +345,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -383,7 +383,7 @@ class JobServiceAsyncImpl internal constructor(private val clientOptions: Client ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/alpha/GraderServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/alpha/GraderServiceAsyncImpl.kt index 6751bd12b..4cc3e3f80 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/alpha/GraderServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/alpha/GraderServiceAsyncImpl.kt @@ -84,7 +84,7 @@ class GraderServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -119,7 +119,7 @@ class GraderServiceAsyncImpl internal constructor(private val clientOptions: Cli ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsyncImpl.kt index a5c48fdac..375479012 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsyncImpl.kt @@ -115,7 +115,7 @@ class PermissionServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -166,7 +166,7 @@ class PermissionServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -208,7 +208,7 @@ class PermissionServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -260,7 +260,7 @@ class PermissionServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/jobs/CheckpointServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/jobs/CheckpointServiceAsyncImpl.kt index 6dca96561..da920f998 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/jobs/CheckpointServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/jobs/CheckpointServiceAsyncImpl.kt @@ -79,7 +79,7 @@ class CheckpointServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/CallServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/CallServiceAsyncImpl.kt index c7c97b379..423c82f62 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/CallServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/CallServiceAsyncImpl.kt @@ -117,7 +117,7 @@ class CallServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response) } } @@ -144,7 +144,7 @@ class CallServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response.use { acceptHandler.handle(it) } @@ -175,7 +175,7 @@ class CallServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response.use { hangupHandler.handle(it) } @@ -206,7 +206,7 @@ class CallServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response.use { referHandler.handle(it) } @@ -237,7 +237,7 @@ class CallServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response.use { rejectHandler.handle(it) } diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsyncImpl.kt index f6922f924..ba724976f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsyncImpl.kt @@ -74,7 +74,7 @@ class ClientSecretServiceAsyncImpl internal constructor(private val clientOption ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/responses/InputItemServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/responses/InputItemServiceAsyncImpl.kt index 8feecdbac..26b3ed221 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/responses/InputItemServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/responses/InputItemServiceAsyncImpl.kt @@ -78,7 +78,7 @@ class InputItemServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/responses/InputTokenServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/responses/InputTokenServiceAsyncImpl.kt index 2e640cbc9..36712adbe 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/responses/InputTokenServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/responses/InputTokenServiceAsyncImpl.kt @@ -74,7 +74,7 @@ class InputTokenServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/safety/AlertServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/safety/AlertServiceAsyncImpl.kt index 583e9d80b..481a27f33 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/safety/AlertServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/safety/AlertServiceAsyncImpl.kt @@ -77,7 +77,7 @@ class AlertServiceAsyncImpl internal constructor(private val clientOptions: Clie ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/skills/ContentServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/skills/ContentServiceAsyncImpl.kt index fac050dbf..d0f6a807e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/skills/ContentServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/skills/ContentServiceAsyncImpl.kt @@ -71,7 +71,7 @@ class ContentServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response) } } } diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/skills/VersionServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/skills/VersionServiceAsyncImpl.kt index 784ef45bd..219e77e56 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/skills/VersionServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/skills/VersionServiceAsyncImpl.kt @@ -119,7 +119,7 @@ class VersionServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -161,7 +161,7 @@ class VersionServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -198,7 +198,7 @@ class VersionServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -249,7 +249,7 @@ class VersionServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/skills/versions/ContentServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/skills/versions/ContentServiceAsyncImpl.kt index 0bad80dc5..51e450fd8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/skills/versions/ContentServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/skills/versions/ContentServiceAsyncImpl.kt @@ -77,7 +77,7 @@ class ContentServiceAsyncImpl internal constructor(private val clientOptions: Cl ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response) } } } diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/uploads/PartServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/uploads/PartServiceAsyncImpl.kt index e0485f201..c66f3f900 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/uploads/PartServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/uploads/PartServiceAsyncImpl.kt @@ -80,7 +80,7 @@ class PartServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileBatchServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileBatchServiceAsyncImpl.kt index cee446daf..322968ad0 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileBatchServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileBatchServiceAsyncImpl.kt @@ -112,7 +112,7 @@ class FileBatchServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -155,7 +155,7 @@ class FileBatchServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -200,7 +200,7 @@ class FileBatchServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -244,7 +244,7 @@ class FileBatchServiceAsyncImpl internal constructor(private val clientOptions: ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileServiceAsyncImpl.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileServiceAsyncImpl.kt index 7ab1a0f34..92508f6dc 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileServiceAsyncImpl.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileServiceAsyncImpl.kt @@ -131,7 +131,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -174,7 +174,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -218,7 +218,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -256,7 +256,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -308,7 +308,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response @@ -352,7 +352,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien ) val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions)) return request - .thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) } + .thenCompose { clientOptions.httpClient.executeAsync(it, requestOptions) } .thenApply { response -> errorHandler.handle(response).parseable { response