mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-04-04 11:52:45 -04:00
refactor: Combine bool functions with capabilities to flag
This commit is contained in:
@ -249,19 +249,10 @@ void ClaudeProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool ClaudeProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities ClaudeProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClaudeProvider::supportThinking() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClaudeProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Thinking
|
||||
| PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void ClaudeProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -54,9 +54,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportThinking() const override;
|
||||
bool supportImage() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
@ -265,19 +265,10 @@ void GoogleAIProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool GoogleAIProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities GoogleAIProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GoogleAIProvider::supportThinking() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GoogleAIProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Thinking
|
||||
| PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void GoogleAIProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -54,9 +54,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportThinking() const override;
|
||||
bool supportImage() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
@ -177,14 +177,9 @@ void LMStudioProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool LMStudioProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities LMStudioProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LMStudioProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void LMStudioProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -53,8 +53,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportImage() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
@ -237,14 +237,9 @@ void LlamaCppProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool LlamaCppProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities LlamaCppProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LlamaCppProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void LlamaCppProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -54,8 +54,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportImage() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
@ -189,14 +189,9 @@ void MistralAIProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool MistralAIProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities MistralAIProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MistralAIProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void MistralAIProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -53,8 +53,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportImage() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
@ -272,19 +272,10 @@ void OllamaProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool OllamaProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities OllamaProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OllamaProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OllamaProvider::supportThinking() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Thinking
|
||||
| PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void OllamaProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -54,9 +54,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportImage() const override;
|
||||
bool supportThinking() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
@ -224,14 +224,9 @@ void OpenAICompatProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool OpenAICompatProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities OpenAICompatProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OpenAICompatProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void OpenAICompatProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -53,8 +53,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportImage() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
@ -254,14 +254,9 @@ void OpenAIProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool OpenAIProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities OpenAIProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OpenAIProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void OpenAIProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -53,8 +53,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportImage() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
@ -292,19 +292,10 @@ void OpenAIResponsesProvider::sendRequest(
|
||||
.arg(requestId, clientId, url.toString()));
|
||||
}
|
||||
|
||||
bool OpenAIResponsesProvider::supportsTools() const
|
||||
PluginLLMCore::ProviderCapabilities OpenAIResponsesProvider::capabilities() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OpenAIResponsesProvider::supportImage() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OpenAIResponsesProvider::supportThinking() const
|
||||
{
|
||||
return true;
|
||||
return PluginLLMCore::ProviderCapability::Tools | PluginLLMCore::ProviderCapability::Thinking
|
||||
| PluginLLMCore::ProviderCapability::Image;
|
||||
}
|
||||
|
||||
void OpenAIResponsesProvider::cancelRequest(const PluginLLMCore::RequestID &requestId)
|
||||
|
||||
@ -53,9 +53,7 @@ public:
|
||||
void sendRequest(
|
||||
const PluginLLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
bool supportsTools() const override;
|
||||
bool supportImage() const override;
|
||||
bool supportThinking() const override;
|
||||
PluginLLMCore::ProviderCapabilities capabilities() const override;
|
||||
void cancelRequest(const PluginLLMCore::RequestID &requestId) override;
|
||||
|
||||
::LLMCore::ToolsManager *toolsManager() const override;
|
||||
|
||||
Reference in New Issue
Block a user