Versions in this module Expand all Collapse all v0 v0.1.0 Aug 1, 2026 Changes in this version + const DefaultBaseURL + var ErrNotFound = errors.New("huggingface: not found") + var ErrRateLimited = errors.New("huggingface: rate limited") + type Client struct + func New(opts ...Option) *Client + func (c *Client) Model(ctx context.Context, id string) (ModelInfo, error) + func (c *Client) Search(ctx context.Context, opts SearchOptions) ([]ModelInfo, error) + func (c *Client) SearchPage(ctx context.Context, opts SearchOptions) ([]ModelInfo, string, error) + type Gated string + func (g *Gated) UnmarshalJSON(b []byte) error + func (g Gated) IsGated() bool + type ModelInfo struct + Author string + CreatedAt time.Time + Downloads int + Gated Gated + ID string + LastModified time.Time + LibraryName string + Likes int + PipelineTag string + SHA string + Safetensors *Safetensors + Tags []string + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithUserAgent(ua string) Option + type Safetensors struct + Parameters map[string]int64 + Total int64 + func (s *Safetensors) DominantDtype() string + type SearchOptions struct + Author string + Cursor string + Direction int + Expand []string + Filter string + Full bool + Limit int + PipelineTag string + Search string + Sort string