Add LLM-based encoding

(cherry picked from commit 907ffa35af90bd7fa7c7ccf49dcc99146dc1b42d)
This commit is contained in:
Jop Zitman 2025-03-21 21:15:04 +08:00
parent bee0de0c26
commit 99c8b24f64
5 changed files with 177 additions and 37 deletions

17
include/slipstream_llm.h Normal file
View file

@ -0,0 +1,17 @@
#ifndef SLIPSTREAM_LLM_H
#define SLIPSTREAM_LLM_H
#include <stdio.h>
#include <netinet/in.h>
typedef struct st_llm_connection_t llm_connection_t;
typedef struct st_llm_request_t llm_request_t;
ssize_t llm_create_connection(llm_connection_t** conn_p, int port);
ssize_t llm_encode(llm_connection_t* conn, char* dest, size_t dest_len, const char* src, size_t src_len);
ssize_t llm_decode(llm_connection_t* conn, char* dest, size_t dest_len, const char* src, size_t src_len);
#endif //SLIPSTREAM_LLM_H