Skip to content

OpenAIService.close method declared with parentheses #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ trait WSHelper {
client
}

def close =
def close(): Unit =
client.close()
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ private trait OpenAIMultiServiceAdapter extends OpenAIServiceWrapper {
fun(underlyings(calcIndex))

override def close =
underlyings.foreach(_.close)
underlyings.foreach(_.close())
}

private class OpenAIMultiServiceRotationAdapter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ private class OpenAIRetryServiceAdapter(
)
}

override def close =
underlying.close
override def close(): Unit =
underlying.close()

private def retry[T](
failureMessage: String)(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,5 +351,5 @@ trait OpenAIService extends OpenAIServiceConsts {
/**
* Closes the underlying ws client, and releases all its resources.
*/
def close: Unit
def close(): Unit
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object OpenAIExampleApp extends BaseOpenAIClientApp {
openAIService.listModels.map(
_.foreach(println)
).onComplete { _ =>
openAIService.close
openAIService.close()
system.terminate
System.exit(0)
}
Expand Down