ai-for-java / openai4j

Java client library for OpenAI API
Apache License 2.0
85 stars 35 forks source link

[FEATURE] Support customize dispatcher of okHttpClient in DefaultOpenAiClient #37

Open jsonwan opened 2 months ago

jsonwan commented 2 months ago

Is your feature request related to a problem? Please describe. I want to use this openai client in a production environment, so the ThreadPoolExecutor which okHttpClient use should be customized for monitoring and tracing reason. The way to modify ThreadPoolExecutor of okHttpClient is to customize its dispatcher.

Describe the solution you'd like Add a dispatcher field in OpenAiClient.Builder to allow user to customize it.