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:84


branch

Optional branch: string

Default

"main"

Defined in

hub/src/lib/commit.ts:64


credentials

Optional credentials: Credentials

Defined in

hub/src/lib/commit.ts:62


description

Optional description: string

Defined in

hub/src/lib/commit.ts:59


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:83


hubUrl

Optional hubUrl: string

Defined in

hub/src/lib/commit.ts:73


isPullRequest

Optional isPullRequest: boolean

Defined in

hub/src/lib/commit.ts:72


operations

operations: CommitOperation[]

Defined in

hub/src/lib/commit.ts:61


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:71


repo

repo: RepoDesignation

Defined in

hub/src/lib/commit.ts:60


title

title: string

Defined in

hub/src/lib/commit.ts:58


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:79

< > Update on GitHub