GeneratedDocumentSource
Namespace: Vercel.AI.Provider
public sealed class GeneratedDocumentSource : GeneratedContentA document source, such as a retrieved file or a cited document.
Inheritance: object → GeneratedContent
Constructors
Section titled “Constructors”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? |
Properties
Section titled “Properties”Filename
Section titled “Filename”public string? Filename { get; }Optional file name.
Value: string
public string Id { get; }Source id.
Value: string
MediaType
Section titled “MediaType”public string MediaType { get; }IANA media type of the document.
Value: string
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; }Provider-specific source metadata, such as a file id or a page range.
Value: JsonElement?
public string Title { get; }Document title.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product