As we are going to support Dall-E feature soon, OpenAI client will be used across the modules. In this PR, we extract the client from Chat module to a separate module.
By the way, due to the capacity problems of OpenAI APIs, I also added a configuration item: max_tokens to limit the maximum tokens in the answer response, which can alleviate the problem.
As we are going to support Dall-E feature soon, OpenAI client will be used across the modules. In this PR, we extract the client from
Chat
module to a separate module.By the way, due to the capacity problems of OpenAI APIs, I also added a configuration item:
max_tokens
to limit the maximum tokens in the answer response, which can alleviate the problem.