Move instractoins out from FIM request

This commit is contained in:
Petr Mironychev
2024-09-01 12:00:14 +02:00
parent dec8967df2
commit d7fc62f94b
13 changed files with 95 additions and 41 deletions

View File

@ -22,6 +22,8 @@
#include <languageclient/languageclientinterface.h>
#include <texteditor/texteditor.h>
#include "QodeAssistData.hpp"
class QNetworkReply;
class QNetworkAccessManager;
@ -35,12 +37,6 @@ public:
LLMClientInterface();
public:
struct ContextPair
{
QString prefix;
QString suffix;
};
Utils::FilePath serverDeviceTemplate() const override;
void sendCompletionToClient(const QString &completion,
@ -50,10 +46,10 @@ public:
void handleCompletion(const QJsonObject &request,
const QString &accumulatedCompletion = QString());
void sendLLMRequest(const QJsonObject &request, const ContextPair &prompt);
void sendLLMRequest(const QJsonObject &request, const ContextData &prompt);
void handleLLMResponse(QNetworkReply *reply, const QJsonObject &request);
ContextPair prepareContext(const QJsonObject &request,
ContextData prepareContext(const QJsonObject &request,
const QString &accumulatedCompletion = QString{});
void updateProvider();