MCPcopy Index your code
hub / github.com/abetlen/llama-cpp-python / detokenize

Function detokenize

llama_cpp/server/app.py:591–597  ·  view source on GitHub ↗
(
    body: DetokenizeInputRequest,
    llama_proxy: LlamaProxy = Depends(get_llama_proxy),
)

Source from the content-addressed store, hash-verified

589 tags=[extras_tag],
590)
591async def detokenize(
592 body: DetokenizeInputRequest,
593 llama_proxy: LlamaProxy = Depends(get_llama_proxy),
594) -> DetokenizeInputResponse:
595 text = llama_proxy(body.model).detokenize(body.tokens).decode("utf-8")
596
597 return DetokenizeInputResponse(text=text)

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.45
detokenizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…