mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-09-28 16:15:56 -04:00
Refactor llm providers to use internal http client (#227)
* refactor: Move http client into provider * refactor: Rework ollama provider for work with internal http client * refactor: Rework LM Studio provider to work with internal http client * refactor: Rework Mistral AI to work with internal http client * fix: Replace url and header to QNetworkRequest * refactor: Rework Google provider to use internal http client * refactor: OpenAI compatible providers switch to use internal http client * fix: Remove m_requestHandler from tests * refactor: Remove old handleData method * fix: Remove LLMClientInterfaceTest
This commit is contained in:
@ -36,12 +36,20 @@ public:
|
||||
LLMCore::PromptTemplate *prompt,
|
||||
LLMCore::ContextData context,
|
||||
LLMCore::RequestType type) override;
|
||||
bool handleResponse(QNetworkReply *reply, QString &accumulatedResponse) override;
|
||||
QList<QString> getInstalledModels(const QString &url) override;
|
||||
QList<QString> validateRequest(const QJsonObject &request, LLMCore::TemplateType type) override;
|
||||
QString apiKey() const override;
|
||||
void prepareNetworkRequest(QNetworkRequest &networkRequest) const override;
|
||||
LLMCore::ProviderID providerID() const override;
|
||||
|
||||
void sendRequest(const QString &requestId, const QUrl &url, const QJsonObject &payload) override;
|
||||
|
||||
public slots:
|
||||
void onDataReceived(const QString &requestId, const QByteArray &data) override;
|
||||
void onRequestFinished(const QString &requestId, bool success, const QString &error) override;
|
||||
|
||||
private:
|
||||
QHash<QString, QString> m_accumulatedResponses;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist::Providers
|
||||
|
Reference in New Issue
Block a user