struct

Crig::Completion::Request::CompletionRequestBuilder

Inherits Struct < Value < Object

Constructors

from_prompt(prompt : Crig::Completion::Message | String) : self
Source
new(prompt : Crig::Completion::Message, request_model : String | Nil = nil, preamble : String | Nil = nil, chat_history : Array(Crig::Completion::Message) = [] of Crig::Completion::Message, documents : Array(Document) = [] of Document, tools : Array(Crig::Completion::ToolDefinition) = [] of Crig::Completion::ToolDefinition, provider_tools : Array(ProviderToolDefinition) = [] of ProviderToolDefinition, temperature : Float64 | Nil = nil, max_tokens : Int64 | Nil = nil, tool_choice : Crig::Completion::ToolChoice | Nil = nil, additional_params : JSON::Any | Nil = nil, output_schema : JSON::Any | Nil = nil)
Source

Instance methods

additional_params(value : JSON::Any) : self
Source
additional_params
Source
additional_params_opt(value : JSON::Any | Nil) : self
Source
build
Source
chat_history
Source
document(value : Document) : self
Source
documents(values : Array(Document)) : self
Source
documents
Source
max_tokens(value : Int64) : self
Source
max_tokens
Source
max_tokens_opt(value : Int64 | Nil) : self
Source
message(value : Crig::Completion::Message) : self
Source
messages(values : Array(Crig::Completion::Message)) : self
Source
model(value : String) : self
Source
model_opt(value : String | Nil) : self
Source
output_schema(value : JSON::Any) : self
Source
output_schema
Source
output_schema_opt(value : JSON::Any | Nil) : self
Source
preamble(value : String) : self
Source
preamble
Source
prompt
Source
provider_tool(value : ProviderToolDefinition) : self
Source
provider_tools(values : Array(ProviderToolDefinition)) : self
Source
provider_tools
Source
request_model
Source
send(model)
Source
send_async(model)
Source
stream(model)
Source
stream_async(model)
Source
temperature(value : Float64) : self
Source
temperature
Source
temperature_opt(value : Float64 | Nil) : self
Source
tool_choice(value : Crig::Completion::ToolChoice) : self
Source
tool_choice
Source
tools
Source
without_preamble
Source