include llama.cpp since there were some edits
This commit is contained in:
1 parent
db7f28d087
commit
8c66990853
3918 files changed
+1640170
-1
No files matched your search
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
struct common_subproc;
|
||||
|
||||
// spawns llama-connect, which exposes this server to a remote browser over WebRTC
|
||||
// core binary is in a separate project: https://github.com/ggml-org/llama-connect
|
||||
struct server_connect {
|
||||
server_connect();
|
||||
~server_connect();
|
||||
|
||||
server_connect(const server_connect &) = delete;
|
||||
server_connect & operator=(const server_connect &) = delete;
|
||||
|
||||
// path of the llama-connect binary, empty if not found
|
||||
static std::string find_binary();
|
||||
|
||||
// why --connect cannot work here, empty if it can
|
||||
static std::string unavailable_reason(const common_params & params);
|
||||
|
||||
static std::string resolve_code(const std::string & code);
|
||||
|
||||
// port is the bound one, it differs from params.port with --port 0 or the GCP override
|
||||
bool start(const common_params & params, int port);
|
||||
|
||||
// idempotent, also called by the destructor
|
||||
void stop();
|
||||
|
||||
private:
|
||||
std::unique_ptr<common_subproc> proc;
|
||||
std::thread log_thread;
|
||||
std::atomic<bool> stopping{false}; // tells the log thread the exit is expected
|
||||
};
|
||||
Reference in new issue
Block a user