Citation
Namespace: Vercel.AI.Provider
public sealed class CitationA reference that supports generated text: the source it points at, plus the optional range of the text it supports and the cited passage. It is not a second copy of the retrieved sources.
Inheritance: object
Constructors
Section titled “Constructors”Citation(GeneratedDocumentSource, int?, int?, string?)
Section titled “Citation(GeneratedDocumentSource, int?, int?, string?)”public Citation(GeneratedDocumentSource source, int? startIndex = null, int? endIndex = null, string? citedText = null)Creates a citation for a document source.
Parameters
| Name | Type | Description |
|---|---|---|
source |
GeneratedDocumentSource | |
startIndex |
int? | |
endIndex |
int? | |
citedText |
string |
Citation(GeneratedSource, int?, int?, string?)
Section titled “Citation(GeneratedSource, int?, int?, string?)”public Citation(GeneratedSource source, int? startIndex = null, int? endIndex = null, string? citedText = null)Creates a citation for a URL source.
Parameters
| Name | Type | Description |
|---|---|---|
source |
GeneratedSource | |
startIndex |
int? | |
endIndex |
int? | |
citedText |
string |
Properties
Section titled “Properties”CitedText
Section titled “CitedText”public string? CitedText { get; }The supporting passage from the source, when the provider supplied one.
Value: string
EndIndex
Section titled “EndIndex”public int? EndIndex { get; }Exclusive end offset in the containing generated text, when the provider supplied one.
Value: int?
Source
Section titled “Source”public GeneratedContent Source { get; }The referenced source: a GeneratedSource (URL) or a GeneratedDocumentSource.
Value: GeneratedContent
StartIndex
Section titled “StartIndex”public int? StartIndex { get; }Start offset in the containing generated text, when the provider supplied one.
Value: int?
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product