#include <LLMConnection.h>
Definition at line 169 of file LLMConnection.h.
◆ LLMConnection()
| cmlabs::LLMConnection::LLMConnection |
( |
| ) |
|
◆ ~LLMConnection()
| cmlabs::LLMConnection::~LLMConnection |
( |
| ) |
|
◆ configure()
Definition at line 197 of file LLMConnection.cpp.
References cmlabs::attrTrue(), cmlabs::XMLNode::getAttribute(), cmlabs::XMLNode::getChildNode(), cmlabs::XMLNode::getName(), cmlabs::XMLNode::isEmpty(), cmlabs::LLM_ERR_CONFIG_EMPTY, cmlabs::LLM_ERR_CONFIG_INLINE_SECRET, cmlabs::LLM_ERR_CONFIG_NO_NAME, cmlabs::LLM_ERR_CONFIG_NO_VENDOR, cmlabs::LLM_ERR_CONFIG_NOT_LLM, cmlabs::LLM_OK, cmlabs::XMLNode::nChildNode(), and stricmp.
Referenced by configureFromString().
◆ configureFromString()
| LLMResult cmlabs::LLMConnection::configureFromString |
( |
const char * | xml | ) |
|
◆ connect()
◆ getAPIKeyRef()
| const std::string & cmlabs::LLMConnection::getAPIKeyRef |
( |
| ) |
const |
|
inline |
◆ getConstraints()
| const LLMConstraints & cmlabs::LLMConnection::getConstraints |
( |
| ) |
const |
|
inline |
◆ getEndpoint()
| const std::string & cmlabs::LLMConnection::getEndpoint |
( |
| ) |
const |
|
inline |
◆ getHeaders()
| const std::vector< LLMHeader > & cmlabs::LLMConnection::getHeaders |
( |
| ) |
const |
|
inline |
◆ getLastError()
| LLMResult cmlabs::LLMConnection::getLastError |
( |
| ) |
const |
|
inline |
◆ getName()
| const std::string & cmlabs::LLMConnection::getName |
( |
| ) |
const |
|
inline |
◆ getRequestTemplate()
| const std::string & cmlabs::LLMConnection::getRequestTemplate |
( |
| ) |
const |
|
inline |
◆ getResponseTemplate()
| const std::string & cmlabs::LLMConnection::getResponseTemplate |
( |
| ) |
const |
|
inline |
◆ getSchemaVersion()
| const std::string & cmlabs::LLMConnection::getSchemaVersion |
( |
| ) |
const |
|
inline |
◆ getSelectedModel()
| const std::string & cmlabs::LLMConnection::getSelectedModel |
( |
| ) |
const |
|
inline |
◆ getStreamTransport()
◆ getVendorType()
◆ getVendorTypeName()
| const std::string & cmlabs::LLMConnection::getVendorTypeName |
( |
| ) |
const |
|
inline |
◆ hasResolvedSecret()
| bool cmlabs::LLMConnection::hasResolvedSecret |
( |
| ) |
const |
|
inline |
◆ interact()
| LLMResult cmlabs::LLMConnection::interact |
( |
const char * | input, |
|
|
std::string & | reply ) |
Definition at line 696 of file LLMConnection.cpp.
References cmlabs::HTTPReply::getContent(), HTTP_MALFORMED_URL, HTTP_OK, HTTP_POST, HTTP_SERVER_UNAVAILABLE, cmlabs::LLM_ERR_HTTP, cmlabs::LLM_ERR_HTTP_UNREACHABLE, cmlabs::LLM_ERR_NO_INPUT, cmlabs::LLM_ERR_NOT_CONFIGURED, cmlabs::LLM_ERR_NOT_CONNECTED, cmlabs::LLM_ERR_REPLY_PARSE, cmlabs::LLM_OK, cmlabs::llmJSONUnescape(), and cmlabs::HTTPReply::type.
◆ interactStream()
| LLMResult cmlabs::LLMConnection::interactStream |
( |
const char * | input, |
|
|
LLMStreamCallback | callback, |
|
|
void * | userData, |
|
|
std::string * | fullReply = NULL ) |
Definition at line 639 of file LLMConnection.cpp.
References cmlabs::SSLConnection::connect(), cmlabs::TCPConnection::connect(), cmlabs::HTTPRequest::createRequest(), cmlabs::NetworkConnection::disconnect(), cmlabs::html::GetHostFromURL(), cmlabs::html::GetPortFromURL(), cmlabs::html::GetProtocolFromURL(), cmlabs::html::GetURIFromURL(), HTTP_POST, cmlabs::LLM_ERR_CONFIG_BAD_TRANSPORT, cmlabs::LLM_ERR_CONFIG_INVALID, cmlabs::LLM_ERR_HTTP_UNREACHABLE, cmlabs::LLM_ERR_NO_INPUT, cmlabs::LLM_ERR_NOT_CONFIGURED, cmlabs::LLM_ERR_NOT_CONNECTED, cmlabs::LLM_OK, cmlabs::LLM_STREAM_NONE, cmlabs::HTTPProtocol::SendHTTPRequest(), and stricmp.
◆ isConfigured()
| bool cmlabs::LLMConnection::isConfigured |
( |
| ) |
const |
|
inline |
◆ isConnected()
| bool cmlabs::LLMConnection::isConnected |
( |
| ) |
const |
|
inline |
◆ isGlobal()
| bool cmlabs::LLMConnection::isGlobal |
( |
| ) |
const |
|
inline |
◆ listModels()
| std::vector< std::string > cmlabs::LLMConnection::listModels |
( |
| ) |
const |
◆ reset()
◆ selectModel()
| LLMResult cmlabs::LLMConnection::selectModel |
( |
const char * | modelName | ) |
|
◆ setOwner()
◆ stats()
| LLMStats cmlabs::LLMConnection::stats |
( |
| ) |
const |
The documentation for this class was generated from the following files: