Llama.cpp C++-to-Csharp wrapper from testedlines.com: C++ docs 1.0.1
Llama.cpp C++-to-Csharp wrapper is a minor extension to Llama.cpp tag b3490 codebase modified a bit by testedlines allowing it to be compiled for and called from Styled Lines Csharp unity asset store package.
Loading...
Searching...
No Matches
lib_manual.h
Go to the documentation of this file.
1#pragma once
2#ifndef SWIGEXPORT
3# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
4# if defined(STATIC_LINKED)
5# define SWIGEXPORT
6# else
7# define SWIGEXPORT __declspec(dllexport)
8# endif
9# else
10# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
11# define SWIGEXPORT __attribute__ ((visibility("default")))
12# else
13# define SWIGEXPORT
14# endif
15# endif
16#endif
17
18/* calling conventions for Windows */
19#ifndef SWIGSTDCALL
20# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
21# define SWIGSTDCALL __stdcall
22# else
23# define SWIGSTDCALL
24# endif
25#endif
26
27extern "C" {
28 typedef void (*LogCallback)(void* ctx, const char* text, int length);
29 typedef void (*TokenCallback)(void* ctx, const char* text, int length);
30 typedef void (*CompleteCallback)(void* ctx, const char* input, int input_length, const char* output, int output_length);
34}
void(* CompleteCallback)(void *ctx, const char *input, int input_length, const char *output, int output_length)
Definition lib_manual.h:30
void(* LogCallback)(void *ctx, const char *text, int length)
Definition lib_manual.h:28
void SetTokenCallback(const void *ctx, TokenCallback tfn)
void(* TokenCallback)(void *ctx, const char *text, int length)
Definition lib_manual.h:29
void SetCompletionCallback(const void *ctx, CompleteCallback cfn)
void SetLogCallback(const void *ctx, LogCallback lfn)
#define SWIGSTDCALL
Definition lib_manual.h:23
#define SWIGEXPORT
Definition lib_manual.h:13