Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func DefaultClient ¶
func DefaultClient() *Client
func NewClient ¶
func NewClient(api *api.CivitaiClient) *Client
func (*Client) ModelDownloadByID ¶
func (c *Client) ModelDownloadByID(ctx context.Context, modelID, targetDir string, opts ...*ModelDownloadOption) error
ModelDownloadByID 下载指定 modelID 的模型文件 - 所有版本
type ModelDownloadOption ¶
type ModelDownloadOption struct { DownloadBatchSize uint32 // DownloadTimeoutSec is the timeout for downloading a file in seconds. DownloadTimeoutSec uint32 // VersionIDList is a list of version id to download. If empty, download all versions. VersionIDList []int64 // VersionNameList is a list of version name to download. If empty, download all versions. VersionNameList []string // FileIDList is a list of file id to download. If empty, download all files. FileIDList []int64 // FileNameList is a list of file name to download. If empty, download all files. FileNameList []string }
Click to show internal directories.
Click to hide internal directories.