modeldownloader

package
v0.379.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdapterFilePath

func AdapterFilePath(modelDir, modelID string) (string, error)

AdapterFilePath returns the file path of the adapter.

func ModelFilePath

func ModelFilePath(modelDir, modelID string, format mv1.ModelFormat) (string, error)

ModelFilePath returns the file path of the model.

Types

type D

type D struct {
	// contains filtered or unexported fields
}

D is a downloader.

func New

func New(modelDir string, s3Client s3Client) *D

New returns a new Manager.

func (*D) Download

func (d *D) Download(
	ctx context.Context,
	modelID string,
	srcPath string,
	format mv1.ModelFormat,
	adapterType mv1.AdapterType,
) error

Download downloads the model.

func (*D) DownloadAdapterOfGGUF added in v0.373.0

func (d *D) DownloadAdapterOfGGUF(
	ctx context.Context,
	modelID string,
	resp *mv1.GetModelPathResponse,
) error

DownloadAdapterOfGGUF downloads the adapter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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