update chat service (#31)

* rename chatgpt service

* add zeus tool for new provider

* add zeus tool for new provider

* update chat service

* update README.md
This commit is contained in:
Dmitry Afanasyev
2023-10-10 23:22:41 +03:00
committed by GitHub
parent f6f3865fb6
commit e9f76d0ea9
30 changed files with 8095 additions and 969 deletions

View File

@@ -14,6 +14,7 @@ struct Config {
std::string http_proxy;
std::string api_key;
std::vector<std::string> ip_white_list;
std::string zeus{"http://chatgpt_zeus_service:8860"};
};
YCS_ADD_STRUCT(Config, client_root_path, interval, work_thread_num, host, port, chat_path, providers, enable_proxy,
http_proxy, api_key, ip_white_list)
http_proxy, api_key, ip_white_list, zeus)

View File

@@ -18,14 +18,9 @@ public:
FreeGpt(Config&);
boost::asio::awaitable<void> aiTianhu(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> aiTianhuSpace(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> deepAi(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> aiChat(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> chatGptAi(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> acytoo(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> openAi(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> h2o(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> yqcloud(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> huggingChat(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> you(std::shared_ptr<Channel>, nlohmann::json);
@@ -39,9 +34,10 @@ public:
boost::asio::awaitable<void> chatGptDuo(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> chatForAi(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> freeGpt(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> cromicle(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> chatGpt4Online(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> gptalk(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> gptForLove(std::shared_ptr<Channel>, nlohmann::json);
boost::asio::awaitable<void> chatGptDemo(std::shared_ptr<Channel>, nlohmann::json);
private:
boost::asio::awaitable<std::expected<boost::beast::ssl_stream<boost::beast::tcp_stream>, std::string>>