mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-10-02 01:56:59 -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:
18
llmcore/Provider.cpp
Normal file
18
llmcore/Provider.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "Provider.hpp"
|
||||
|
||||
namespace QodeAssist::LLMCore {
|
||||
|
||||
Provider::Provider(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_httpClient(std::make_unique<HttpClient>())
|
||||
{
|
||||
connect(m_httpClient.get(), &HttpClient::dataReceived, this, &Provider::onDataReceived);
|
||||
connect(m_httpClient.get(), &HttpClient::requestFinished, this, &Provider::onRequestFinished);
|
||||
}
|
||||
|
||||
HttpClient *Provider::httpClient() const
|
||||
{
|
||||
return m_httpClient.get();
|
||||
}
|
||||
|
||||
} // namespace QodeAssist::LLMCore
|
Reference in New Issue
Block a user