Skip to content

Commit

Permalink
style(internal): simplify client build method
Browse files Browse the repository at this point in the history
chore: unknown commit message
  • Loading branch information
stainless-bot authored and Stainless Bot committed Oct 22, 2024
1 parent 70f673c commit f0bc243
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -82,6 +82,5 @@ class OpenAIOkHttpClient private constructor() {
)
.build()
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -82,6 +82,5 @@ class OpenAIOkHttpClientAsync private constructor() {
)
.build()
)
}
}
}

0 comments on commit f0bc243

Please sign in to comment.