LlamaLib  v2.0.2
Cross-platform library for local LLMs
Loading...
Searching...
No Matches
LLM_client.h File Reference

Client interface for local and remote LLM access. More...

#include <vector>
#include <thread>
#include <chrono>
#include <iostream>
#include <sstream>
#include "LLM.h"
#include "completion_processor.h"
#include "httplib.h"
Include dependency graph for LLM_client.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LLMClient
 Client for accessing LLM functionality locally or remotely. More...
 

Macros

#define CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH   1048576
 
#define CPPHTTPLIB_TCP_NODELAY   true
 

Functions

bool LLMClient_Is_Server_Alive (LLMClient *llm)
 
void LLMClient_Set_SSL (LLMClient *llm, const char *SSL_cert)
 Set SSL certificate (C API)
 
LLMClientLLMClient_Construct (LLMProvider *llm)
 Construct local LLMClient (C API)
 
LLMClientLLMClient_Construct_Remote (const char *url, const int port, const char *API_key="")
 Construct remote LLMClient (C API)
 

Detailed Description

Client interface for local and remote LLM access.

Provides a unified interface for accessing LLM functionality both locally (in-process) and remotely (via HTTP), with support for streaming responses

Definition in file LLM_client.h.

Macro Definition Documentation

◆ CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH

#define CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH   1048576

Definition at line 21 of file LLM_client.h.

◆ CPPHTTPLIB_TCP_NODELAY

#define CPPHTTPLIB_TCP_NODELAY   true

Definition at line 23 of file LLM_client.h.