Huggingface.js documentation

Interface: CommitParams

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Interface: CommitParams

Properties

abortSignal

Optional abortSignal: AbortSignal

Defined in

hub/src/lib/commit.ts:83


branch

Optional branch: string

Default

"main"

Defined in

hub/src/lib/commit.ts:63


credentials

Optional credentials: Credentials

Defined in

hub/src/lib/commit.ts:61


description

Optional description: string

Defined in

hub/src/lib/commit.ts:58


fetch

Optional fetch: (input: URL | RequestInfo, init?: RequestInit) => Promise\<Response>(input: string | URL | Request, init?: RequestInit) => Promise\<Response>

Custom fetch function to use instead of the default one, for example to use a proxy or edit headers.

Type declaration

▸ (input, init?): Promise\<Response>

Parameters
Name Type
input URL | RequestInfo
init? RequestInit
Returns

Promise\<Response>

▸ (input, init?): Promise\<Response>

Parameters
Name Type
input string | URL | Request
init? RequestInit
Returns

Promise\<Response>

Defined in

hub/src/lib/commit.ts:82


hubUrl

Optional hubUrl: string

Defined in

hub/src/lib/commit.ts:72


isPullRequest

Optional isPullRequest: boolean

Defined in

hub/src/lib/commit.ts:71


operations

operations: CommitOperation[]

Defined in

hub/src/lib/commit.ts:60


parentCommit

Optional parentCommit: string

Parent commit. Optional

  • When opening a PR: will use parentCommit as the parent commit
  • When committing on a branch: Will make sure that there were no intermediate commits

Defined in

hub/src/lib/commit.ts:70


repo

repo: RepoDesignation

Defined in

hub/src/lib/commit.ts:59


title

title: string

Defined in

hub/src/lib/commit.ts:57


useWebWorkers

Optional useWebWorkers: boolean | { minSize?: number ; poolSize?: number }

Whether to use web workers to compute SHA256 hashes.

We load hash-wasm from a CDN inside the web worker. Not sure how to do otherwise and still have a “clean” bundle.

Defined in

hub/src/lib/commit.ts:78