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

Method sample

llama_cpp/_internals.py:857–858  ·  view source on GitHub ↗
(self, ctx: LlamaContext, idx: int = -1)

Source from the content-addressed store, hash-verified

855 return llama_cpp.llama_sampler_get_seed(self.sampler)
856
857 def sample(self, ctx: LlamaContext, idx: int = -1) -> int:
858 return llama_cpp.llama_sampler_sample(self.sampler, ctx.ctx, idx)
859
860 def accept(self, token: int):
861 llama_cpp.llama_sampler_accept(self.sampler, token)

Callers 1

test_real_modelFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_real_modelFunction · 0.76