Skip to content

GeneratedSource

Namespace: Vercel.AI.Provider

public sealed class GeneratedSource : GeneratedContent

A URL source cited by the model.

Inheritance: object → GeneratedContent

View source

GeneratedSource(string, string, string?, JsonElement?)

Section titled “GeneratedSource(string, string, string?, JsonElement?)”
public GeneratedSource(string id, string url, string? title, JsonElement? providerMetadata = null)

Creates a source.

Parameters

Name Type Description
id string
url string
title string
providerMetadata JsonElement?

View source

public string Id { get; }

Source id. Search results keep the provider result id so citations can be correlated.

Value: string

View source

public JsonElement? ProviderMetadata { get; }

Provider-specific source metadata, such as a snippet or search-result id.

Value: JsonElement?

View source

public string? Title { get; }

Optional title.

Value: string

View source

public string Url { get; }

Source URL.

Value: string

View source

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