File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -791,7 +791,7 @@ def free_wrapper(sampler: llama_cpp.llama_sampler_p):
791791 self .sampler = llama_cpp .llama_sampler_init (ctypes .pointer (sampler_i ), None )
792792
793793 def get_sampler (self ) -> llama_cpp .llama_sampler_p :
794- return ctypes . pointer ( self .sampler )
794+ return self .sampler
795795
796796
797797class LlamaSampler :
@@ -998,7 +998,7 @@ def add_custom(
998998 self ._add_sampler (sampler )
999999 # NOTE: Must remove custom samplers before free or llama.cpp will try to free them
10001000 self .custom_samplers .append (
1001- ( llama_cpp .llama_sampler_chain_n (self .sampler ) - 1 , custom_sampler )
1001+ [ llama_cpp .llama_sampler_chain_n (self .sampler ) - 1 , custom_sampler ]
10021002 )
10031003
10041004 def _add_sampler (self , sampler : llama_cpp .llama_sampler_p ):
You can’t perform that action at this time.
0 commit comments