mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-04-03 11:22:59 -04:00
refactor: Remove dead code
This commit is contained in:
@ -37,8 +37,9 @@ namespace QodeAssist::Providers {
|
||||
|
||||
OllamaProvider::OllamaProvider(QObject *parent)
|
||||
: PluginLLMCore::Provider(parent)
|
||||
, m_client(new ::LLMCore::OllamaClient(url(), apiKey(), QString(), this))
|
||||
, m_client(new ::LLMCore::OllamaClient(QString(), QString(), QString(), this))
|
||||
{
|
||||
m_apiKeyGetter = [] { return Settings::providerSettings().ollamaBasicAuthApiKey(); };
|
||||
Tools::registerQodeAssistTools(m_client->tools());
|
||||
}
|
||||
|
||||
@ -139,20 +140,6 @@ QFuture<QList<QString>> OllamaProvider::getInstalledModels(const QString &baseUr
|
||||
return m_client->listModels();
|
||||
}
|
||||
|
||||
QString OllamaProvider::apiKey() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
void OllamaProvider::prepareNetworkRequest(QNetworkRequest &networkRequest) const
|
||||
{
|
||||
networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||
const auto key = Settings::providerSettings().ollamaBasicAuthApiKey();
|
||||
if (!key.isEmpty()) {
|
||||
networkRequest.setRawHeader("Authorization", "Basic " + key.toLatin1());
|
||||
}
|
||||
}
|
||||
|
||||
PluginLLMCore::ProviderID OllamaProvider::providerID() const
|
||||
{
|
||||
return PluginLLMCore::ProviderID::Ollama;
|
||||
|
||||
Reference in New Issue
Block a user