mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-04-02 02:42:45 -04:00
refactor: Remove validate request function
This commit is contained in:
@ -27,7 +27,6 @@
|
||||
#include <QJsonObject>
|
||||
#include <QtCore/qurlquery.h>
|
||||
|
||||
#include "pluginllmcore/ValidationUtils.hpp"
|
||||
#include "logger/Logger.hpp"
|
||||
#include "settings/ChatAssistantSettings.hpp"
|
||||
#include "settings/CodeCompletionSettings.hpp"
|
||||
@ -149,28 +148,6 @@ QFuture<QList<QString>> GoogleAIProvider::getInstalledModels(const QString &base
|
||||
return m_client->listModels();
|
||||
}
|
||||
|
||||
QList<QString> GoogleAIProvider::validateRequest(
|
||||
const QJsonObject &request, PluginLLMCore::TemplateType type)
|
||||
{
|
||||
QJsonObject templateReq;
|
||||
|
||||
templateReq = QJsonObject{
|
||||
{"contents", QJsonArray{}},
|
||||
{"system_instruction", QJsonArray{}},
|
||||
{"generationConfig",
|
||||
QJsonObject{
|
||||
{"temperature", {}},
|
||||
{"maxOutputTokens", {}},
|
||||
{"topP", {}},
|
||||
{"topK", {}},
|
||||
{"thinkingConfig",
|
||||
QJsonObject{{"thinkingBudget", {}}, {"includeThoughts", {}}}}}},
|
||||
{"safetySettings", QJsonArray{}},
|
||||
{"tools", QJsonArray{}}};
|
||||
|
||||
return PluginLLMCore::ValidationUtils::validateRequestFields(request, templateReq);
|
||||
}
|
||||
|
||||
QString GoogleAIProvider::apiKey() const
|
||||
{
|
||||
return Settings::providerSettings().googleAiApiKey();
|
||||
|
||||
Reference in New Issue
Block a user