Documentation
¶
Index ¶
- Constants
- Variables
- type Context
- func (c *Context) AllMetadata() (map[string]any, error)
- func (c *Context) Architecture() string
- func (c *Context) ChatTemplate() string
- func (c *Context) Close() error
- func (c *Context) Description() string
- func (c *Context) MetaCount() int
- func (c *Context) MetaKey(index int) (string, error)
- func (c *Context) MetaValue(key string) (any, error)
- func (c *Context) Name() string
Constants ¶
View Source
const (
// FileExtension is the file extension for GGUF model files
FileExtension = ".gguf"
)
Variables ¶
View Source
var ( ErrInvalidContext = llama.ErrInvalidContext ErrInvalidArgument = llama.ErrInvalidArgument ErrKeyNotFound = llama.ErrKeyNotFound ErrIndexOutOfRange = llama.ErrIndexOutOfRange ErrTypeMismatch = llama.ErrTypeMismatch ErrOpenFailed = llama.ErrOpenFailed )
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context represents a GGUF file context for reading metadata
func Open ¶
Open opens a GGUF file and returns a Context for reading metadata. The caller must call Close() when done.
func (*Context) AllMetadata ¶
AllMetadata returns all key-value pairs as a map
func (*Context) Architecture ¶
Architecture returns the model architecture, or empty string if not found
func (*Context) ChatTemplate ¶
ChatTemplate returns the chat template, or empty string if not found
func (*Context) Description ¶
Description returns the model description, or empty string if not found
Click to show internal directories.
Click to hide internal directories.