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

Method prev_str

llama_cpp/_internals.py:626–627  ·  view source on GitHub ↗
(self, ctx_main: LlamaContext, n: int)

Source from the content-addressed store, hash-verified

624 return None
625
626 def prev_str(self, ctx_main: LlamaContext, n: int) -> str:
627 return ctx_main.model.detokenize(self.prev[-n:]).decode("utf-8")
628
629 def sample(
630 self,

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.45
detokenizeMethod · 0.45

Tested by

no test coverage detected