MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / readProps

Function readProps

graph-ui/src/llm/sidecar.ts:215–233  ·  view source on GitHub ↗
(payload: unknown)

Source from the content-addressed store, hash-verified

213 * anderen wegzuwerfen.
214 */
215export function readProps(payload: unknown): SidecarFacts {
216 const props = asRecord(payload);
217 const modelPath = asString(props['model_path']) || asString(props['model_alias']);
218 const settings = asRecord(props['default_generation_settings']);
219 const facts: SidecarFacts = {
220 model: modelDisplayName(modelPath),
221 modelPath,
222 quantization: asString(props['model_ftype']),
223 };
224 const contextTokens = asNumber(settings['n_ctx']);
225 if (contextTokens !== undefined) {
226 facts.contextTokens = contextTokens;
227 }
228 const slots = asNumber(props['total_slots']);
229 if (slots !== undefined) {
230 facts.slots = slots;
231 }
232 return facts;
233}
234
235/**
236 * Die Betriebsart aus `/props` lesen.

Callers 2

sidecar.test.tsFile · 0.90
probeSidecarFunction · 0.85

Calls 4

asStringFunction · 0.85
modelDisplayNameFunction · 0.85
asRecordFunction · 0.70
asNumberFunction · 0.70

Tested by

no test coverage detected