Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

PersistedArtifactRef.md

169 lines2.0 KB

Defined in: packages/ai/src/types.ts:2406

Properties

artifactId

artifactId: string;

Defined in: packages/ai/src/types.ts:2408


createdAt

createdAt: string;

Defined in: packages/ai/src/types.ts:2414


mimeType

mimeType: string;

Defined in: packages/ai/src/types.ts:2412


name

name: string;

Defined in: packages/ai/src/types.ts:2411


role

role: PersistedArtifactRole;

Defined in: packages/ai/src/types.ts:2407


runId

runId: string;

Defined in: packages/ai/src/types.ts:2410


size

size: number;

Defined in: packages/ai/src/types.ts:2413


source

source: object;

Defined in: packages/ai/src/types.ts:2430

activity

activity: PersistedArtifactActivity;

expiresAt?

optional expiresAt?: string;

jobId?

optional jobId?: string;

mediaType?

optional mediaType?: "json" | "image" | "audio" | "video" | "document";

model

model: string;

path

path: string;

provider

provider: string;

sourceUrl?

optional sourceUrl?: string;

Defined in: packages/ai/src/types.ts:2421

Where these bytes were fetched FROM — the provider's original result URL, or a caller-supplied prompt URL when allowInputUrl opted that in. Usually expiring, and provenance only: serve from PersistedArtifactRef.url instead.


threadId

threadId: string;

Defined in: packages/ai/src/types.ts:2409


url?

optional url?: string;

Defined in: packages/ai/src/types.ts:2429

Durable app-origin URL that serves this artifact's persisted bytes (your GET route around retrieveArtifact / retrieveBlob). Stamped by withGenerationPersistence's artifactUrl option, so clients render and restore durable media from your own origin rather than the provider's expiring link.