Huggingface.js documentation

인터페이스: CommitEditFileParams

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

인터페이스: CommitEditFileParams

…

originalContent이 xet 기반 파일의 downloadFile에서来的时候, 변경되지 않은 부분은 다운로드되지도 다시 업로드되지도 않습니다. 수정된 바이트 범위(그리고 해당 청크 경계 주변)만 전송됩니다. 버킷으로 업로드할 경우, 변경되지 않은 데이터를 전혀 다운로드하지 않고도 이 과정이 완전히 원격으로 수행됩니다.

Example

const original = await downloadFile({ repo: "buckets/me/repo", path: "model.gguf" });
await uploadFile({
  repo: "buckets/me/repo",
  file: {
    path: "model.gguf",
    originalContent: original,
    edits: [{ start: 0, end: 100, content: new Blob([patchedHeader]) }],
  },
});

속성

수정

• edits: { content: Blob ; end: number ; start: number }[]

정의 위치

packages/hub/src/lib/upload-file.ts:29


It seems the content you intended to translate is missing. Please provide the text you would like me to translate into Korean.

• originalContent: Blob

예를 들어 downloadFile이 반환한 파일의 현재 내용

정의 위치

packages/hub/src/lib/upload-file.ts:28


path

• path: string

정의 위치

packages/hub/src/lib/upload-file.ts:26

Update on GitHub