Versions in this module Expand all Collapse all v0 v0.2.2 Apr 12, 2024 v0.2.1 Mar 24, 2024 Changes in this version + const HuggingFaceForward + const ModelScopeForward + type BranchTag struct + Name string + TargetCommit string + type EachRevision struct + Revision string + type Forward interface + DownloadFile func(context.Context, ...Option) ([]byte, error) + Files func(context.Context, ...Option) ([]string, error) + Revisions func(context.Context, ...Option) (Revision, error) + Summary func(context.Context, ...Option) (string, error) + func NewForward(forwardType string, opts ...Option) (Forward, error) + func NewHuggingFace(opts ...Option) Forward + func NewModelScope(opts ...Option) Forward + type HuggingFace struct + func (h *HuggingFace) DownloadFile(ctx context.Context, opts ...Option) ([]byte, error) + func (h *HuggingFace) Files(ctx context.Context, opts ...Option) ([]string, error) + func (h *HuggingFace) Revisions(ctx context.Context, opts ...Option) (Revision, error) + func (h *HuggingFace) Summary(ctx context.Context, opts ...Option) (string, error) + type Model struct + Author string + ID string + ModelID string + SHA string + Siblings []Sibling + type ModelRevision struct + Branches []ModelTagBranch + Tags []ModelTagBranch + type ModelScope struct + func (m *ModelScope) DownloadFile(ctx context.Context, opts ...Option) ([]byte, error) + func (m *ModelScope) Files(ctx context.Context, opts ...Option) ([]string, error) + func (m *ModelScope) Revisions(ctx context.Context, opts ...Option) (Revision, error) + func (m *ModelScope) Summary(ctx context.Context, opts ...Option) (string, error) + type ModelScopeRevision struct + Code int + Data ModelScopeRevisionData + Message string + Success bool + type ModelScopeRevisionData struct + RevisionMap RevisionMap + type ModelScopeSummary struct + Code int + Data ModelScopeSummaryData + Message string + Success bool + type ModelScopeSummaryData struct + Name string + ReadMeContent string + type ModelTagBranch struct + Name string + Ref string + TargetCommit string + type Option func(*option) + func WithBaseURL(url string) Option + func WithDownloadFile(fn string) Option + func WithHFToken(hfToken string) Option + func WithModelID(modelID string) Option + func WithRevision(revision string) Option + func WithTransport(tp *http.Transport) Option + type Revision struct + Branches []BranchTag + Tags []BranchTag + type RevisionMap struct + Branches []EachRevision + Tags []EachRevision + type Sibling struct + RFileName string