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

Function rcli_get_context_info

src/api/rcli_api.cpp:2930–2949  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2928}
2929
2930void rcli_get_context_info(RCLIHandle handle, int* out_prompt_tokens, int* out_ctx_size) {
2931 if (!handle) return;
2932 auto* engine = static_cast<RCLIEngine*>(handle);
2933 if (!engine->initialized) return;
2934
2935 if (out_prompt_tokens) *out_prompt_tokens = engine->ctx_main_prompt_tokens;
2936
2937 if (out_ctx_size) {
2938 if (engine->pipeline.using_metalrt()) {
2939 int mrt_ctx = engine->pipeline.metalrt_llm().context_size();
2940 if (mrt_ctx <= 0) {
2941 int llm_ctx = engine->pipeline.llm().context_size();
2942 mrt_ctx = llm_ctx > 0 ? llm_ctx : 4096;
2943 }
2944 *out_ctx_size = mrt_ctx;
2945 } else {
2946 *out_ctx_size = engine->pipeline.llm().context_size();
2947 }
2948 }
2949}
2950
2951// =============================================================================
2952// VLM (Vision Language Model)

Callers 6

runMethod · 0.85
stop_recordingMethod · 0.85
build_models_panelMethod · 0.85
process_inputMethod · 0.85
refresh_ctx_gaugeMethod · 0.85
test_auto_compactFunction · 0.85

Calls 2

using_metalrtMethod · 0.80
context_sizeMethod · 0.45

Tested by 1

test_auto_compactFunction · 0.68