Skip to content

GeneratedDocumentSource

Namespace: Vercel.AI.Provider

public sealed class GeneratedDocumentSource : GeneratedContent

A document source, such as a retrieved file or a cited document.

Inheritance: object → GeneratedContent

View source

GeneratedDocumentSource(string, string, string, string?, JsonElement?)

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

Creates a document source.

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, such as a file id or a page range.

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