mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2025-09-11 22:30:41 +03:00
remove provider VoiGpt add provider AiChatOnline (#65)
This commit is contained in:
parent
0584083a4f
commit
cfe4783d4e
@ -54,7 +54,7 @@ class ChatGptModelsEnum(StrEnum):
|
|||||||
gpt_3_5_turbo_stream_gptTalkRu = "gpt-3.5-turbo--stream-gptTalkRu"
|
gpt_3_5_turbo_stream_gptTalkRu = "gpt-3.5-turbo--stream-gptTalkRu"
|
||||||
Llama_2_70b_chat_hf_stream_DeepInfra = "Llama-2-70b-chat-hf-stream-DeepInfra"
|
Llama_2_70b_chat_hf_stream_DeepInfra = "Llama-2-70b-chat-hf-stream-DeepInfra"
|
||||||
gpt_4_stream_aivvm = "gpt-4-stream-aivvm"
|
gpt_4_stream_aivvm = "gpt-4-stream-aivvm"
|
||||||
gpt_3_5_turbo_voiGpt = "gpt-3.5-turbo-voiGpt"
|
gpt_3_5_turbo_stream_AiChatOnline = "gpt-3.5-turbo-stream-AiChatOnline"
|
||||||
llama2_70B = "llama2-70B"
|
llama2_70B = "llama2-70B"
|
||||||
gpt_3_5_turbo_gptChatly = "gpt-3.5-turbo-gptChatly"
|
gpt_3_5_turbo_gptChatly = "gpt-3.5-turbo-gptChatly"
|
||||||
gpt_3_5_turbo_stream_Berlin = "gpt-3.5-turbo-stream-Berlin"
|
gpt_3_5_turbo_stream_Berlin = "gpt-3.5-turbo-stream-Berlin"
|
||||||
|
@ -74,9 +74,9 @@ docker run -it --rm \
|
|||||||
Run the application(use http proxy) using Docker:
|
Run the application(use http proxy) using Docker:
|
||||||
```
|
```
|
||||||
docker run --rm -it \
|
docker run --rm -it \
|
||||||
-p 8858:8858 \
|
--net=host \
|
||||||
--name freegpt \
|
--name freegpt \
|
||||||
-e HTTP_PROXY=http://127.0.0.1:8080 \
|
-e HTTP_PROXY=http://127.0.0.1:3128 \
|
||||||
fantasypeak/freegpt:latest
|
fantasypeak/freegpt:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -2450,3 +2450,113 @@ boost::asio::awaitable<void> FreeGpt::huggingChat(std::shared_ptr<Channel> ch, n
|
|||||||
});
|
});
|
||||||
co_return;
|
co_return;
|
||||||
}
|
}
|
||||||
|
boost::asio::awaitable<void> FreeGpt::voiGpt(std::shared_ptr<Channel> ch, nlohmann::json json) {
|
||||||
|
co_await boost::asio::post(boost::asio::bind_executor(*m_thread_pool_ptr, boost::asio::use_awaitable));
|
||||||
|
ScopeExit _exit{[=] { boost::asio::post(ch->get_executor(), [=] { ch->close(); }); }};
|
||||||
|
|
||||||
|
boost::system::error_code err{};
|
||||||
|
auto prompt = json.at("meta").at("content").at("parts").at(0).at("content").get<std::string>();
|
||||||
|
|
||||||
|
std::string recv, header_str;
|
||||||
|
Curl curl;
|
||||||
|
auto ret = curl.setUrl("https://voigpt.com")
|
||||||
|
.setProxy(m_cfg.http_proxy)
|
||||||
|
.setRecvHeadersCallback([&](std::string str) { header_str.append(str); })
|
||||||
|
.setRecvBodyCallback([&](std::string str) { recv.append(str); })
|
||||||
|
.perform();
|
||||||
|
if (ret) {
|
||||||
|
co_await boost::asio::post(boost::asio::bind_executor(ch->get_executor(), boost::asio::use_awaitable));
|
||||||
|
ch->try_send(err, ret.value());
|
||||||
|
co_return;
|
||||||
|
}
|
||||||
|
auto response_header = Curl::parseHttpHeaders(header_str);
|
||||||
|
std::string cookie;
|
||||||
|
auto range = response_header.equal_range("Set-Cookie");
|
||||||
|
for (auto it = range.first; it != range.second; ++it) {
|
||||||
|
if (!(it->second.contains("csrftoken=")))
|
||||||
|
continue;
|
||||||
|
auto view = it->second | std::views::drop_while(isspace) | std::views::reverse |
|
||||||
|
std::views::drop_while(isspace) | std::views::reverse;
|
||||||
|
auto fields = splitString(std::string{view.begin(), view.end()}, " ");
|
||||||
|
if (fields.size() < 1) {
|
||||||
|
co_await boost::asio::post(boost::asio::bind_executor(ch->get_executor(), boost::asio::use_awaitable));
|
||||||
|
ch->try_send(err, "can't get cookie");
|
||||||
|
co_return;
|
||||||
|
}
|
||||||
|
cookie = std::move(fields[0]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SPDLOG_INFO("cookie: [{}]", cookie);
|
||||||
|
|
||||||
|
std::unordered_multimap<std::string, std::string> http_headers{
|
||||||
|
{"Accept-Language", "de-DE,de;q=0.9,en-DE;q=0.8,en;q=0.7,en-US;q=0.6"},
|
||||||
|
{"Cookie", cookie},
|
||||||
|
{"origin", "https://voigpt.com"},
|
||||||
|
{"referer", "https://voigpt.com/"},
|
||||||
|
{"Sec-Ch-Ua-Mobile", "?0"},
|
||||||
|
{"Sec-Ch-Ua-Platform", "'Windows'"},
|
||||||
|
{"Sec-Fetch-Dest", "empty"},
|
||||||
|
{"Sec-Fetch-Mode", "cors"},
|
||||||
|
{"Sec-Fetch-Site", "same-origin"},
|
||||||
|
{"X-Csrftoken",
|
||||||
|
[&] {
|
||||||
|
cookie.erase(0, 10);
|
||||||
|
cookie.pop_back();
|
||||||
|
return cookie;
|
||||||
|
}()},
|
||||||
|
};
|
||||||
|
ret = curl.setUrl("https://voigpt.com/generate_response/")
|
||||||
|
.setProxy(m_cfg.http_proxy)
|
||||||
|
.setRecvHeadersCallback([&](std::string) {})
|
||||||
|
.setRecvBodyCallback([&](std::string str) {
|
||||||
|
boost::system::error_code err{};
|
||||||
|
nlohmann::json line_json = nlohmann::json::parse(str, nullptr, false);
|
||||||
|
if (line_json.is_discarded()) {
|
||||||
|
SPDLOG_ERROR("json parse error: [{}]", str);
|
||||||
|
boost::asio::post(ch->get_executor(), [=] { ch->try_send(err, str); });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
auto rsp_str = line_json["response"].get<std::string>();
|
||||||
|
if (!rsp_str.empty())
|
||||||
|
boost::asio::post(ch->get_executor(),
|
||||||
|
[=, rsp_str = std::move(rsp_str)] { ch->try_send(err, rsp_str); });
|
||||||
|
})
|
||||||
|
.clearHeaders()
|
||||||
|
.setHttpHeaders([&] -> auto& {
|
||||||
|
http_headers.emplace("Content-Type", "application/json");
|
||||||
|
return http_headers;
|
||||||
|
}())
|
||||||
|
.setBody([&] -> std::string {
|
||||||
|
constexpr std::string_view ask_json_str = R"({"messages": [{"role": "user", "content": "hello"}]})";
|
||||||
|
nlohmann::json ask_request = nlohmann::json::parse(ask_json_str, nullptr, false);
|
||||||
|
auto request_json = getConversationJson(json);
|
||||||
|
ask_request["messages"] = request_json;
|
||||||
|
std::string ask_request_str = ask_request.dump();
|
||||||
|
SPDLOG_INFO("ask_request_str: [{}]", ask_request_str);
|
||||||
|
return ask_request_str;
|
||||||
|
}())
|
||||||
|
.perform();
|
||||||
|
if (ret) {
|
||||||
|
co_await boost::asio::post(boost::asio::bind_executor(ch->get_executor(), boost::asio::use_awaitable));
|
||||||
|
ch->try_send(err, ret.value());
|
||||||
|
co_return;
|
||||||
|
}
|
||||||
|
co_return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string md5(const std::string& str, bool reverse = true) {
|
||||||
|
unsigned char hash[MD5_DIGEST_LENGTH];
|
||||||
|
|
||||||
|
MD5_CTX md5;
|
||||||
|
MD5_Init(&md5);
|
||||||
|
MD5_Update(&md5, str.c_str(), str.size());
|
||||||
|
MD5_Final(hash, &md5);
|
||||||
|
|
||||||
|
std::stringstream ss;
|
||||||
|
for (int i = 0; i < MD5_DIGEST_LENGTH; i++)
|
||||||
|
ss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(hash[i]);
|
||||||
|
auto md5_str = ss.str();
|
||||||
|
if (reverse)
|
||||||
|
std::ranges::reverse(md5_str);
|
||||||
|
return md5_str;
|
||||||
|
}
|
@ -35,7 +35,7 @@ public:
|
|||||||
boost::asio::awaitable<void> gptTalkru(std::shared_ptr<Channel>, nlohmann::json);
|
boost::asio::awaitable<void> gptTalkru(std::shared_ptr<Channel>, nlohmann::json);
|
||||||
boost::asio::awaitable<void> deepInfra(std::shared_ptr<Channel>, nlohmann::json);
|
boost::asio::awaitable<void> deepInfra(std::shared_ptr<Channel>, nlohmann::json);
|
||||||
boost::asio::awaitable<void> gptChatly(std::shared_ptr<Channel>, nlohmann::json);
|
boost::asio::awaitable<void> gptChatly(std::shared_ptr<Channel>, nlohmann::json);
|
||||||
boost::asio::awaitable<void> voiGpt(std::shared_ptr<Channel>, nlohmann::json);
|
boost::asio::awaitable<void> aiChatOnline(std::shared_ptr<Channel>, nlohmann::json);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::asio::awaitable<std::expected<boost::beast::ssl_stream<boost::beast::tcp_stream>, std::string>>
|
boost::asio::awaitable<std::expected<boost::beast::ssl_stream<boost::beast::tcp_stream>, std::string>>
|
||||||
|
@ -21,23 +21,6 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
std::string md5(const std::string& str, bool reverse = true) {
|
|
||||||
unsigned char hash[MD5_DIGEST_LENGTH];
|
|
||||||
|
|
||||||
MD5_CTX md5;
|
|
||||||
MD5_Init(&md5);
|
|
||||||
MD5_Update(&md5, str.c_str(), str.size());
|
|
||||||
MD5_Final(hash, &md5);
|
|
||||||
|
|
||||||
std::stringstream ss;
|
|
||||||
for (int i = 0; i < MD5_DIGEST_LENGTH; i++)
|
|
||||||
ss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(hash[i]);
|
|
||||||
auto md5_str = ss.str();
|
|
||||||
if (reverse)
|
|
||||||
std::ranges::reverse(md5_str);
|
|
||||||
return md5_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto splitString(const std::string& input, const std::string& delimiter) {
|
auto splitString(const std::string& input, const std::string& delimiter) {
|
||||||
std::vector<std::string> fields;
|
std::vector<std::string> fields;
|
||||||
std::string::size_type start = 0;
|
std::string::size_type start = 0;
|
||||||
@ -1789,7 +1772,7 @@ boost::asio::awaitable<void> FreeGpt::aivvm(std::shared_ptr<Channel> ch, nlohman
|
|||||||
return;
|
return;
|
||||||
})
|
})
|
||||||
.setBody([&] {
|
.setBody([&] {
|
||||||
constexpr std::string_view json_str = R"({
|
constexpr std::string_view json_str = R"({
|
||||||
"model":"gpt-3.5-turbo",
|
"model":"gpt-3.5-turbo",
|
||||||
"stream":true,
|
"stream":true,
|
||||||
"frequency_penalty":0,
|
"frequency_penalty":0,
|
||||||
@ -1803,10 +1786,10 @@ boost::asio::awaitable<void> FreeGpt::aivvm(std::shared_ptr<Channel> ch, nlohman
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})";
|
})";
|
||||||
nlohmann::json request = nlohmann::json::parse(json_str, nullptr, false);
|
nlohmann::json request = nlohmann::json::parse(json_str, nullptr, false);
|
||||||
request["messages"] = getConversationJson(json);
|
request["messages"] = getConversationJson(json);
|
||||||
SPDLOG_INFO("{}", request.dump(2));
|
SPDLOG_INFO("{}", request.dump(2));
|
||||||
return request.dump();
|
return request.dump();
|
||||||
}())
|
}())
|
||||||
.setHttpHeaders(headers)
|
.setHttpHeaders(headers)
|
||||||
.perform();
|
.perform();
|
||||||
@ -2172,96 +2155,104 @@ boost::asio::awaitable<void> FreeGpt::gptChatly(std::shared_ptr<Channel> ch, nlo
|
|||||||
co_return;
|
co_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::asio::awaitable<void> FreeGpt::voiGpt(std::shared_ptr<Channel> ch, nlohmann::json json) {
|
boost::asio::awaitable<void> FreeGpt::aiChatOnline(std::shared_ptr<Channel> ch, nlohmann::json json) {
|
||||||
co_await boost::asio::post(boost::asio::bind_executor(*m_thread_pool_ptr, boost::asio::use_awaitable));
|
co_await boost::asio::post(boost::asio::bind_executor(*m_thread_pool_ptr, boost::asio::use_awaitable));
|
||||||
ScopeExit _exit{[=] { boost::asio::post(ch->get_executor(), [=] { ch->close(); }); }};
|
ScopeExit _exit{[=] { boost::asio::post(ch->get_executor(), [=] { ch->close(); }); }};
|
||||||
|
|
||||||
boost::system::error_code err{};
|
|
||||||
auto prompt = json.at("meta").at("content").at("parts").at(0).at("content").get<std::string>();
|
auto prompt = json.at("meta").at("content").at("parts").at(0).at("content").get<std::string>();
|
||||||
|
|
||||||
std::string recv, header_str;
|
boost::system::error_code err{};
|
||||||
Curl curl;
|
std::unordered_multimap<std::string, std::string> headers{
|
||||||
auto ret = curl.setUrl("https://voigpt.com")
|
{"Accept", "text/event-stream"},
|
||||||
.setProxy(m_cfg.http_proxy)
|
{"content-type", "application/json"},
|
||||||
.setRecvHeadersCallback([&](std::string str) { header_str.append(str); })
|
{"Referer", "https://aichatonline.org/chatgpt/chat/"},
|
||||||
.setRecvBodyCallback([&](std::string str) { recv.append(str); })
|
{"Origin", "https://aichatonline.org"},
|
||||||
.perform();
|
{"Alt-Used", "aichatonline.org"},
|
||||||
if (ret) {
|
|
||||||
co_await boost::asio::post(boost::asio::bind_executor(ch->get_executor(), boost::asio::use_awaitable));
|
|
||||||
ch->try_send(err, ret.value());
|
|
||||||
co_return;
|
|
||||||
}
|
|
||||||
auto response_header = Curl::parseHttpHeaders(header_str);
|
|
||||||
std::string cookie;
|
|
||||||
auto range = response_header.equal_range("Set-Cookie");
|
|
||||||
for (auto it = range.first; it != range.second; ++it) {
|
|
||||||
if (!(it->second.contains("csrftoken=")))
|
|
||||||
continue;
|
|
||||||
auto view = it->second | std::views::drop_while(isspace) | std::views::reverse |
|
|
||||||
std::views::drop_while(isspace) | std::views::reverse;
|
|
||||||
auto fields = splitString(std::string{view.begin(), view.end()}, " ");
|
|
||||||
if (fields.size() < 1) {
|
|
||||||
co_await boost::asio::post(boost::asio::bind_executor(ch->get_executor(), boost::asio::use_awaitable));
|
|
||||||
ch->try_send(err, "can't get cookie");
|
|
||||||
co_return;
|
|
||||||
}
|
|
||||||
cookie = std::move(fields[0]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
SPDLOG_INFO("cookie: [{}]", cookie);
|
|
||||||
|
|
||||||
std::unordered_multimap<std::string, std::string> http_headers{
|
|
||||||
{"Accept-Language", "de-DE,de;q=0.9,en-DE;q=0.8,en;q=0.7,en-US;q=0.6"},
|
|
||||||
{"Cookie", cookie},
|
|
||||||
{"origin", "https://voigpt.com"},
|
|
||||||
{"referer", "https://voigpt.com/"},
|
|
||||||
{"Sec-Ch-Ua-Mobile", "?0"},
|
|
||||||
{"Sec-Ch-Ua-Platform", "'Windows'"},
|
|
||||||
{"Sec-Fetch-Dest", "empty"},
|
{"Sec-Fetch-Dest", "empty"},
|
||||||
{"Sec-Fetch-Mode", "cors"},
|
{"Sec-Fetch-Mode", "cors"},
|
||||||
{"Sec-Fetch-Site", "same-origin"},
|
{"Sec-Fetch-Site", "same-origin"},
|
||||||
{"X-Csrftoken",
|
|
||||||
[&] {
|
|
||||||
cookie.erase(0, 10);
|
|
||||||
cookie.pop_back();
|
|
||||||
return cookie;
|
|
||||||
}()},
|
|
||||||
};
|
};
|
||||||
ret = curl.setUrl("https://voigpt.com/generate_response/")
|
auto get_random_string = [](int len) -> std::string {
|
||||||
.setProxy(m_cfg.http_proxy)
|
static std::string chars{"abcdefghijklmnopqrstuvwxyz0123456789"};
|
||||||
.setRecvHeadersCallback([&](std::string) {})
|
static std::string letter{"abcdefghijklmnopqrstuvwxyz"};
|
||||||
.setRecvBodyCallback([&](std::string str) {
|
std::random_device rd;
|
||||||
boost::system::error_code err{};
|
std::mt19937 gen(rd());
|
||||||
nlohmann::json line_json = nlohmann::json::parse(str, nullptr, false);
|
std::uniform_int_distribution<> dis(0, 1000000);
|
||||||
if (line_json.is_discarded()) {
|
std::string random_string;
|
||||||
SPDLOG_ERROR("json parse error: [{}]", str);
|
random_string += chars[dis(gen) % letter.length()];
|
||||||
boost::asio::post(ch->get_executor(), [=] { ch->try_send(err, str); });
|
len = len - 1;
|
||||||
return;
|
for (int i = 0; i < len; i++)
|
||||||
}
|
random_string += chars[dis(gen) % chars.length()];
|
||||||
auto rsp_str = line_json["response"].get<std::string>();
|
return random_string;
|
||||||
if (!rsp_str.empty())
|
};
|
||||||
boost::asio::post(ch->get_executor(),
|
std::string recv;
|
||||||
[=, rsp_str = std::move(rsp_str)] { ch->try_send(err, rsp_str); });
|
auto ret = Curl()
|
||||||
})
|
.setUrl("https://aichatonline.org/chatgpt/wp-json/mwai-ui/v1/chats/submit")
|
||||||
.clearHeaders()
|
.setProxy(m_cfg.http_proxy)
|
||||||
.setHttpHeaders([&] -> auto& {
|
.setRecvHeadersCallback([](std::string) { return; })
|
||||||
http_headers.emplace("Content-Type", "application/json");
|
.setRecvBodyCallback([&](std::string str) mutable {
|
||||||
return http_headers;
|
// boost::system::error_code err{};
|
||||||
}())
|
// boost::asio::post(ch->get_executor(), [=] { ch->try_send(err, str); });
|
||||||
.setBody([&] -> std::string {
|
recv.append(str);
|
||||||
constexpr std::string_view ask_json_str = R"({"messages": [{"role": "user", "content": "hello"}]})";
|
while (true) {
|
||||||
nlohmann::json ask_request = nlohmann::json::parse(ask_json_str, nullptr, false);
|
auto position = recv.find("\n");
|
||||||
auto request_json = getConversationJson(json);
|
if (position == std::string::npos)
|
||||||
ask_request["messages"] = request_json;
|
break;
|
||||||
std::string ask_request_str = ask_request.dump();
|
auto msg = recv.substr(0, position + 1);
|
||||||
SPDLOG_INFO("ask_request_str: [{}]", ask_request_str);
|
recv.erase(0, position + 1);
|
||||||
return ask_request_str;
|
msg.pop_back();
|
||||||
}())
|
if (msg.empty())
|
||||||
.perform();
|
continue;
|
||||||
if (ret) {
|
auto fields = splitString(msg, "data: ");
|
||||||
|
boost::system::error_code err{};
|
||||||
|
nlohmann::json line_json = nlohmann::json::parse(fields.back(), nullptr, false);
|
||||||
|
if (line_json.is_discarded()) {
|
||||||
|
SPDLOG_ERROR("json parse error: [{}]", fields.back());
|
||||||
|
boost::asio::post(ch->get_executor(), [=] {
|
||||||
|
ch->try_send(err, std::format("json parse error: [{}]", fields.back()));
|
||||||
|
});
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
auto type = line_json["type"].get<std::string>();
|
||||||
|
if (type == "live") {
|
||||||
|
auto msg = line_json["data"].get<std::string>();
|
||||||
|
boost::asio::post(ch->get_executor(), [=] { ch->try_send(err, msg); });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setBody([&] {
|
||||||
|
constexpr std::string_view ask_json_str = R"({
|
||||||
|
"botId": "default",
|
||||||
|
"customId": null,
|
||||||
|
"session": "9jd0rhttij6neetg",
|
||||||
|
"chatId": "ci3jfyp1ki",
|
||||||
|
"contextId": 7,
|
||||||
|
"messages": [
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "hello"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"newMessage": "hello",
|
||||||
|
"newImageId": null,
|
||||||
|
"stream": true
|
||||||
|
})";
|
||||||
|
nlohmann::json ask_request = nlohmann::json::parse(ask_json_str, nullptr, false);
|
||||||
|
ask_request["session"] = get_random_string(16);
|
||||||
|
ask_request["chatId"] = get_random_string(10);
|
||||||
|
ask_request["messages"] = getConversationJson(json);
|
||||||
|
ask_request["newMessage"] = prompt;
|
||||||
|
std::string ask_request_str = ask_request.dump();
|
||||||
|
SPDLOG_INFO("request: [{}]", ask_request_str);
|
||||||
|
return ask_request_str;
|
||||||
|
}())
|
||||||
|
.clearHeaders()
|
||||||
|
.setHttpHeaders(headers)
|
||||||
|
.perform();
|
||||||
|
if (ret.has_value()) {
|
||||||
|
SPDLOG_ERROR("{}", ret.value());
|
||||||
co_await boost::asio::post(boost::asio::bind_executor(ch->get_executor(), boost::asio::use_awaitable));
|
co_await boost::asio::post(boost::asio::bind_executor(ch->get_executor(), boost::asio::use_awaitable));
|
||||||
ch->try_send(err, ret.value());
|
ch->try_send(err, ret.value());
|
||||||
co_return;
|
|
||||||
}
|
}
|
||||||
co_return;
|
co_return;
|
||||||
}
|
}
|
||||||
|
@ -352,7 +352,7 @@ int main(int, char** argv) {
|
|||||||
ADD_METHOD("gpt-3.5-turbo-stream-gptTalkRu", FreeGpt::gptTalkru);
|
ADD_METHOD("gpt-3.5-turbo-stream-gptTalkRu", FreeGpt::gptTalkru);
|
||||||
ADD_METHOD("Llama-2-70b-chat-hf-stream-DeepInfra", FreeGpt::deepInfra);
|
ADD_METHOD("Llama-2-70b-chat-hf-stream-DeepInfra", FreeGpt::deepInfra);
|
||||||
ADD_METHOD("gpt-3.5-turbo-gptChatly", FreeGpt::gptChatly);
|
ADD_METHOD("gpt-3.5-turbo-gptChatly", FreeGpt::gptChatly);
|
||||||
ADD_METHOD("gpt-3.5-turbo-voiGpt", FreeGpt::voiGpt);
|
ADD_METHOD("gpt-3.5-turbo-stream-AiChatOnline", FreeGpt::aiChatOnline);
|
||||||
|
|
||||||
SPDLOG_INFO("active provider:");
|
SPDLOG_INFO("active provider:");
|
||||||
for (auto& [provider, _] : gpt_function)
|
for (auto& [provider, _] : gpt_function)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user