mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-07-14 02:54:48 -04:00
✨ feat: Add request validator
This commit is contained in:
@ -195,6 +195,12 @@ void LLMClientInterface::handleCompletion(const QJsonObject &request)
|
||||
config.promptTemplate->prepareRequest(config.providerRequest, updatedContext);
|
||||
config.provider->prepareRequest(config.providerRequest, LLMCore::RequestType::Fim);
|
||||
|
||||
auto errors = config.provider->validateRequest(config.providerRequest, promptTemplate->type());
|
||||
if (!errors.isEmpty()) {
|
||||
LOG_MESSAGE("Validate errors for fim request:");
|
||||
LOG_MESSAGES(errors);
|
||||
return;
|
||||
}
|
||||
m_requestHandler.sendLLMRequest(config, request);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user