MCPcopy
hub / github.com/z-lab/dflash / _make_response

Function _make_response

dflash/model_mlx.py:413–426  ·  view source on GitHub ↗
(
    text,
    tokens,
    accepted,
    prompt_size,
    prompt_tps,
    n,
    tic,
    finish_reason=None,
)

Source from the content-addressed store, hash-verified

411
412
413def _make_response(
414 text,
415 tokens,
416 accepted,
417 prompt_size,
418 prompt_tps,
419 n,
420 tic,
421 finish_reason=None,
422):
423 return GenerationResponse(
424 text, tokens, accepted, prompt_size, prompt_tps,
425 n, n / (time.perf_counter() - tic), mx.get_peak_memory() / 1e9, finish_reason,
426 )
427
428
429def stream_generate(

Callers 1

stream_generateFunction · 0.85

Calls 1

GenerationResponseClass · 0.85

Tested by

no test coverage detected