using System.Runtime.InteropServices; namespace LLama.Native; /// /// Override a key/value pair in the llama model metadata (llama_model_kv_override) /// [StructLayout(LayoutKind.Explicit)] public unsafe struct LLamaModelMetadataOverride { /// /// Key to override /// [FieldOffset(0)] public fixed byte key[128]; /// /// Type of value /// [FieldOffset(128)] public LLamaModelKvOverrideType Tag; /// /// Value, **must** only be used if Tag == LLAMA_KV_OVERRIDE_INT /// [FieldOffset(132)] public long IntValue; /// /// Value, **must** only be used if Tag == LLAMA_KV_OVERRIDE_FLOAT /// [FieldOffset(132)] public double FloatValue; /// /// Value, **must** only be used if Tag == LLAMA_KV_OVERRIDE_BOOL /// [FieldOffset(132)] public int BoolValue; } /// /// Specifies what type of value is being overridden by LLamaModelKvOverride /// public enum LLamaModelKvOverrideType { /// /// Overriding an int value /// LLAMA_KV_OVERRIDE_INT = 0, /// /// Overriding a float value /// LLAMA_KV_OVERRIDE_FLOAT = 1, /// /// Overriding a bool value /// LLAMA_KV_OVERRIDE_BOOL = 2, }