Helixform / TeleGPT

An out-of-box ChatGPT bot for Telegram.
https://icystudio.github.io/TeleGPT/telegpt_core
MIT License
236 stars 15 forks source link

Extract OpenAI module & Add `max_tokens` setting #10

Closed unixzii closed 1 year ago

unixzii commented 1 year ago

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.