Skip to content

GeneratedText

Namespace: Vercel.AI.Provider

public class GeneratedText : GeneratedContent

Generated text.

Inheritance: object → GeneratedContent

Derived: AnthropicText, GoogleText, HuggingFaceText, OpenAIText

View source

GeneratedText(string, IReadOnlyList<Citation>?, JsonElement?)

Section titled “GeneratedText(string, IReadOnlyList<Citation>?, JsonElement?)”
public GeneratedText(string text, IReadOnlyList<Citation>? citations = null, JsonElement? providerMetadata = null)

Creates text content.

Parameters

Name Type Description
text string
citations IReadOnlyList<Citation>
providerMetadata JsonElement?

View source

public IReadOnlyList<Citation>? Citations { get; }

References supporting this text, or null when the provider sent none. They are separate from the retrieved GeneratedSource parts.

Value: IReadOnlyList<Citation>

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata for this text, keyed by provider name, such as the message itemId.

Value: JsonElement?

View source

public string Text { get; }

Generated text.

Value: string

View source

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