Namespace: LLama.Native
A safe handle for a LLamaKvCacheView
public class LLamaKvCacheViewSafeHandle : SafeLLamaHandleBase, System.IDisposable
Inheritance Object → CriticalFinalizerObject → SafeHandle → SafeLLamaHandleBase → LLamaKvCacheViewSafeHandle
Implements IDisposable
public bool IsInvalid { get; }
public bool IsClosed { get; }
Initialize a LLamaKvCacheViewSafeHandle which will call llama_kv_cache_view_free when disposed
public LLamaKvCacheViewSafeHandle(SafeLLamaContextHandle ctx, LLamaKvCacheView view)
view LLamaKvCacheView
Allocate a new KV cache view which can be used to inspect the KV cache
public static LLamaKvCacheViewSafeHandle Allocate(SafeLLamaContextHandle ctx, int maxSequences)
maxSequences Int32
The maximum number of sequences visible in this view per cell
protected bool ReleaseHandle()
Update this view
public void Update()
Get the raw KV cache view
public LLamaKvCacheView& GetView()