Download tools/server/server-tools.h from echodict/llama.cpp: direct link, hf CLI and curl.
- Browser
- Download file 623 Bytes
-
https://huggingface.co/datasets/echodict/llama.cpp/resolve/main/tools/server/server-tools.h
- Command line
-
hf download hf://datasets/echodict/llama.cpp/tools/server/server-tools.h
-
curl -L -o server-tools.h https://huggingface.co/datasets/echodict/llama.cpp/resolve/main/tools/server/server-tools.h
623 Bytes
| struct server_tool { | |
| std::string name; | |
| std::string display_name; | |
| bool permission_write = false; | |
| virtual ~server_tool() = default; | |
| virtual json get_definition() = 0; | |
| virtual json invoke(json params) = 0; | |
| json to_json(); | |
| }; | |
| struct server_tools { | |
| std::vector<std::unique_ptr<server_tool>> tools; | |
| void setup(const std::vector<std::string> & enabled_tools); | |
| json invoke(const std::string & name, const json & params); | |
| server_http_context::handler_t handle_get; | |
| server_http_context::handler_t handle_post; | |
| }; | |