From f0bc243a7836cdf17c479ac569c102fbc361de6d Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:06:09 -0400 Subject: [PATCH] style(internal): simplify client build method chore: unknown commit message --- .../kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt | 5 ++--- .../com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt index 4a35acb..568b820 100644 --- a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt +++ b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt @@ -70,8 +70,8 @@ class OpenAIOkHttpClient private constructor() { fun fromEnv() = apply { clientOptions.fromEnv() } - fun build(): OpenAIClient { - return OpenAIClientImpl( + fun build(): OpenAIClient = + OpenAIClientImpl( clientOptions .httpClient( OkHttpClient.builder() @@ -82,6 +82,5 @@ class OpenAIOkHttpClient private constructor() { ) .build() ) - } } } diff --git a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt index 6e7f01b..53fc744 100644 --- a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt +++ b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt @@ -70,8 +70,8 @@ class OpenAIOkHttpClientAsync private constructor() { fun fromEnv() = apply { clientOptions.fromEnv() } - fun build(): OpenAIClientAsync { - return OpenAIClientAsyncImpl( + fun build(): OpenAIClientAsync = + OpenAIClientAsyncImpl( clientOptions .httpClient( OkHttpClient.builder() @@ -82,6 +82,5 @@ class OpenAIOkHttpClientAsync private constructor() { ) .build() ) - } } }