struct

AI::Provider::LanguageModel::Source

Inherits JSON::Serializable < Struct < Value < Object

A source used to generate the response.

Constructors

new(source_type : SourceType, id : String, url : String | Nil = nil, media_type : String | Nil = nil, title : String | Nil = nil, filename : String | Nil = nil, provider_metadata : Shared::ProviderMetadata | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new_document(*, id : String, media_type : String, title : String, filename : String | Nil = nil, provider_metadata : Shared::ProviderMetadata | Nil = nil) : Source
Source
new_url(*, id : String, url : String, title : String | Nil = nil, provider_metadata : Shared::ProviderMetadata | Nil = nil) : Source
Source

Instance methods

filename

Filename (for document sources).

Source
id

The ID of the source.

Source
media_type

IANA media type (for document sources).

Source
provider_metadata

Provider-specific metadata.

Source
source_type

The type of source.

Source
title

Title of the source.

Source
type
Source
url

URL (for URL sources).

Source