struct
AI::Provider::RerankingModel::Documents
- AI::Provider::RerankingModel::Documents
- Struct
- Value
- Object
Overview
Documents to rerank - either text or JSON objects.
Included Modules
- JSON::Serializable
Defined in:
ai/provider/reranking_model/reranking_model.crConstructors
- .new(pull : JSON::PullParser)
- .new(type : DocumentsType, text_values : Array(String) | Nil = nil, object_values : Array(JSON::Any) | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
-
.objects(values : Array(JSON::Any)) : Documents
Creates object documents.
-
.text(values : Array(String)) : Documents
Creates text documents.
Instance Method Summary
-
#object_values : Array(JSON::Any) | Nil
Object document values (for object type).
-
#text_values : Array(String) | Nil
Text document values (for text type).
-
#type : DocumentsType
The type of documents (text or object).
Constructor Detail
def self.new(type : DocumentsType, text_values : Array(String) | Nil = nil, object_values : Array(JSON::Any) | Nil = nil)
#