add provider ChatAnywhere (#57)

* dd provider ChatAnywhere

* update dependencies
This commit is contained in:
Dmitry Afanasyev
2023-11-17 20:34:44 +03:00
committed by GitHub
parent 31ad4e7dcb
commit f8b32fcadc
7 changed files with 245 additions and 188 deletions

View File

@@ -7,7 +7,8 @@
struct Config {
std::string client_root_path;
std::size_t interval{300};
std::size_t work_thread_num{std::thread::hardware_concurrency() * 2};
std::size_t work_thread_num{std::thread::hardware_concurrency() == 1 ? 2
: std::thread::hardware_concurrency() * 2};
std::string host{"0.0.0.0"};
std::string port{"8858"};
std::string chat_path{"/chat"};

View File

@@ -40,6 +40,7 @@ public:
boost::asio::awaitable<void> aivvm(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> berlin(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> chatGpt4Online(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> chatAnywhere(std::shared_ptr<Channel>, nlohmann::json);
private:
boost::asio::awaitable<std::expected<boost::beast::ssl_stream<boost::beast::tcp_stream>, std::string>>