parser

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrModelNotFound = errors.New("no Modelfile or safetensors files found")

Functions

This section is empty.

Types

type Command

type Command struct {
	Name string
	Args string
}

func (Command) String

func (c Command) String() string

type Modelfile

type Modelfile struct {
	Commands []Command
}

func ParseFile

func ParseFile(r io.Reader) (*Modelfile, error)

func (Modelfile) CreateRequest

func (f Modelfile) CreateRequest(relativeDir string) (*api.CreateRequest, error)

CreateRequest creates a new *api.CreateRequest from an existing Modelfile

func (Modelfile) String

func (f Modelfile) String() string

type ParserError

type ParserError struct {
	LineNumber int
	Msg        string
}

func (*ParserError) Error

func (e *ParserError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL