CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::LLMConnection Class Reference

#include <LLMConnection.h>

Public Member Functions

 LLMConnection ()
 ~LLMConnection ()
void setOwner (void *owner, LLMOwnerEndCallback callback)
LLMResult configure (const XMLNode &llmNode)
LLMResult configureFromString (const char *xml)
bool isConfigured () const
LLMResult getLastError () const
const std::string & getName () const
LLMVendorType getVendorType () const
const std::string & getVendorTypeName () const
const std::string & getEndpoint () const
bool isGlobal () const
const std::string & getSchemaVersion () const
const std::string & getAPIKeyRef () const
bool hasResolvedSecret () const
const std::string & getRequestTemplate () const
const std::string & getResponseTemplate () const
const std::vector< LLMHeader > & getHeaders () const
const LLMConstraintsgetConstraints () const
std::vector< std::string > listModels () const
LLMResult selectModel (const char *modelName)
const std::string & getSelectedModel () const
LLMResult connect ()
LLMResult reset ()
LLMResult interact (const char *input, std::string &reply)
LLMResult interactStream (const char *input, LLMStreamCallback callback, void *userData, std::string *fullReply=NULL)
bool isConnected () const
LLMStreamTransport getStreamTransport () const
LLMStats stats () const

Detailed Description

Definition at line 169 of file LLMConnection.h.

Constructor & Destructor Documentation

◆ LLMConnection()

cmlabs::LLMConnection::LLMConnection ( )

◆ ~LLMConnection()

cmlabs::LLMConnection::~LLMConnection ( )

Definition at line 70 of file LLMConnection.cpp.

References cmlabs::GetTimeNow().

Member Function Documentation

◆ configure()

◆ configureFromString()

LLMResult cmlabs::LLMConnection::configureFromString ( const char * xml)

◆ connect()

LLMResult cmlabs::LLMConnection::connect ( )

◆ getAPIKeyRef()

const std::string & cmlabs::LLMConnection::getAPIKeyRef ( ) const
inline

Definition at line 197 of file LLMConnection.h.

◆ getConstraints()

const LLMConstraints & cmlabs::LLMConnection::getConstraints ( ) const
inline

Definition at line 204 of file LLMConnection.h.

◆ getEndpoint()

const std::string & cmlabs::LLMConnection::getEndpoint ( ) const
inline

Definition at line 194 of file LLMConnection.h.

◆ getHeaders()

const std::vector< LLMHeader > & cmlabs::LLMConnection::getHeaders ( ) const
inline

Definition at line 203 of file LLMConnection.h.

◆ getLastError()

LLMResult cmlabs::LLMConnection::getLastError ( ) const
inline

Definition at line 188 of file LLMConnection.h.

◆ getName()

const std::string & cmlabs::LLMConnection::getName ( ) const
inline

Definition at line 191 of file LLMConnection.h.

◆ getRequestTemplate()

const std::string & cmlabs::LLMConnection::getRequestTemplate ( ) const
inline

Definition at line 201 of file LLMConnection.h.

◆ getResponseTemplate()

const std::string & cmlabs::LLMConnection::getResponseTemplate ( ) const
inline

Definition at line 202 of file LLMConnection.h.

◆ getSchemaVersion()

const std::string & cmlabs::LLMConnection::getSchemaVersion ( ) const
inline

Definition at line 196 of file LLMConnection.h.

◆ getSelectedModel()

const std::string & cmlabs::LLMConnection::getSelectedModel ( ) const
inline

Definition at line 211 of file LLMConnection.h.

◆ getStreamTransport()

LLMStreamTransport cmlabs::LLMConnection::getStreamTransport ( ) const
inline

Definition at line 232 of file LLMConnection.h.

◆ getVendorType()

LLMVendorType cmlabs::LLMConnection::getVendorType ( ) const
inline

Definition at line 192 of file LLMConnection.h.

◆ getVendorTypeName()

const std::string & cmlabs::LLMConnection::getVendorTypeName ( ) const
inline

Definition at line 193 of file LLMConnection.h.

◆ hasResolvedSecret()

bool cmlabs::LLMConnection::hasResolvedSecret ( ) const
inline

Definition at line 200 of file LLMConnection.h.

◆ interact()

◆ interactStream()

◆ isConfigured()

bool cmlabs::LLMConnection::isConfigured ( ) const
inline

Definition at line 187 of file LLMConnection.h.

◆ isConnected()

bool cmlabs::LLMConnection::isConnected ( ) const
inline

Definition at line 230 of file LLMConnection.h.

◆ isGlobal()

bool cmlabs::LLMConnection::isGlobal ( ) const
inline

Definition at line 195 of file LLMConnection.h.

◆ listModels()

std::vector< std::string > cmlabs::LLMConnection::listModels ( ) const

Definition at line 275 of file LLMConnection.cpp.

◆ reset()

LLMResult cmlabs::LLMConnection::reset ( )

◆ selectModel()

LLMResult cmlabs::LLMConnection::selectModel ( const char * modelName)

◆ setOwner()

void cmlabs::LLMConnection::setOwner ( void * owner,
LLMOwnerEndCallback callback )

Definition at line 79 of file LLMConnection.cpp.

◆ stats()

LLMStats cmlabs::LLMConnection::stats ( ) const

Definition at line 751 of file LLMConnection.cpp.

References cmlabs::GetTimeNow(), and cmlabs::LLMStats::uptimeMS.


The documentation for this class was generated from the following files: