struct

AI::Provider::RerankingModel::Documents

Inherits JSON::Serializable < Struct < Value < Object

Documents to rerank - either text or JSON objects.

Constructors

new(type : DocumentsType, text_values : Array(String) | Nil = nil, object_values : Array(JSON::Any) | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
objects(values : Array(JSON::Any)) : Documents

Creates object documents.

Source
text(values : Array(String)) : Documents

Creates text documents.

Source

Instance methods

object_values

Object document values (for object type).

Source
text_values

Text document values (for text type).

Source
type

The type of documents (text or object).

Source