LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmithsandboxFileChunk
Interface●Since v0.13

FileChunk

Bytes returned by a ranged read, and where they sit in the file.

Copy
interface FileChunk

Properties

View source on GitHub
property
content: Uint8Array
property
etag: string
property
last_modified: string
property
partial: boolean
property
start: number
property
total_bytes: number
property
unchanged: boolean

The bytes returned. Empty when unchanged is true.

Validator for the version these bytes came from. Pass it as ifRange on the next chunk so a rewrite restarts the read instead of splicing two versions together.

HTTP-date of the last modification.

True when the server answered 206 with only part of the file. A false here after a ranged request means the file changed and the server sent it whole -- restart from zero.

Offset of the first byte returned.

The file's full size, or undefined when the server did not report it.

True when the caller passed ifNoneMatch and the file still matches it. No bytes are returned.