Skip to content

DocumentSourceStreamPart

Namespace: Vercel.AI.Provider

public sealed class DocumentSourceStreamPart : LanguageModelStreamPart

A retrieved document, such as a file a search tool returned.

Inheritance: object → LanguageModelStreamPart

View source

DocumentSourceStreamPart(string, string, string, string?, JsonElement?)

Section titled “DocumentSourceStreamPart(string, string, string, string?, JsonElement?)”
public DocumentSourceStreamPart(string id, string mediaType, string title, string? filename = null, JsonElement? providerMetadata = null)

Creates a document source part.

Parameters

Name Type Description
id string
mediaType string
title string
filename string
providerMetadata JsonElement?

View source

public string? Filename { get; }

Optional file name.

Value: string

View source

public string Id { get; }

Source id.

Value: string

View source

public string MediaType { get; }

IANA media type of the document.

Value: string

View source

public JsonElement? ProviderMetadata { get; }

Provider-specific source metadata.

Value: JsonElement?

View source

public string Title { get; }

Document title.

Value: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product