MCPcopy Create free account
hub / github.com/RunanywhereAI/RCLI / rcli_create

Function rcli_create

src/api/rcli_api.cpp:184–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184RCLIHandle rcli_create(const char* config_json) {
185 auto* engine = new (std::nothrow) RCLIEngine();
186 if (!engine) return nullptr;
187
188 if (config_json && config_json[0]) {
189 std::string cfg(config_json);
190 std::string dir = config_get_string(cfg, "models_dir");
191 if (!dir.empty()) engine->models_dir = dir;
192 std::string prompt = config_get_string(cfg, "system_prompt");
193 if (!prompt.empty()) engine->config_system_prompt = prompt;
194 std::string eng = config_get_string(cfg, "engine");
195 if (!eng.empty()) engine->config_engine_override = eng;
196 engine->config_gpu_layers = config_get_int(cfg, "gpu_layers", -1);
197 engine->config_ctx_size = config_get_int(cfg, "ctx_size", -1);
198 }
199
200 engine->actions.register_defaults();
201
202 return static_cast<RCLIHandle>(engine);
203}
204
205void rcli_destroy(RCLIHandle handle) {
206 if (!handle) return;

Callers 15

create_and_init_engineFunction · 0.85
cmd_interactiveFunction · 0.85
cmd_listenFunction · 0.85
cmd_mic_testFunction · 0.85
cmd_askFunction · 0.85
cmd_vlmFunction · 0.85
cmd_cameraFunction · 0.85
cmd_screenFunction · 0.85
cmd_ragFunction · 0.85
mainFunction · 0.85
test_apiFunction · 0.85
test_use_casesFunction · 0.85

Calls 4

config_get_stringFunction · 0.85
config_get_intFunction · 0.85
emptyMethod · 0.80
register_defaultsMethod · 0.45

Tested by 6

test_apiFunction · 0.68
test_use_casesFunction · 0.68
test_actions_api_e2eFunction · 0.68
test_personality_apiFunction · 0.68
test_voice_benchFunction · 0.68
test_auto_compactFunction · 0.68