feat: add openai-compatible api models (#2683)

Signed-off-by: Shiranui <supersonic@livemail.tw>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Co-authored-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
不知火 Shiranui
2024-07-25 22:02:52 +08:00
committed by GitHub
parent 6b97d0f8ea
commit f9cd2e321c
14 changed files with 539 additions and 15 deletions

View File

@@ -99,6 +99,15 @@ Network *Network::globalInstance()
return networkInstance();
}
bool Network::isHttpUrlValid(QUrl url) {
if (!url.isValid())
return false;
QString scheme(url.scheme());
if (scheme != "http" && scheme != "https")
return false;
return true;
}
Network::Network()
: QObject{nullptr}
{