class

OpenAI::TokenCountsBody

Inherits JSON::Serializable < Reference < Object

Constructors

new(model : TokenCountsBodyModel | Nil = nil, input : TokenCountsBodyInput | Nil = nil, previous_response_id : TokenCountsBodyPreviousResponseId | Nil = nil, tools : TokenCountsBodyTools | Nil = nil, text : TokenCountsBodyText | Nil = nil, reasoning : TokenCountsBodyReasoning | Nil = nil, truncation : TruncationEnum | Nil = nil, instructions : TokenCountsBodyInstructions | Nil = nil, conversation : TokenCountsBodyConversation | Nil = nil, tool_choice : TokenCountsBodyToolChoice | Nil = nil, parallel_tool_calls : TokenCountsBodyParallelToolCalls | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

conversation
Source
conversation=(conversation : TokenCountsBodyConversation | Nil)
Source
input
Source
input=(input : TokenCountsBodyInput | Nil)
Source
instructions
Source
instructions=(instructions : TokenCountsBodyInstructions | Nil)
Source
model
Source
model=(model : TokenCountsBodyModel | Nil)
Source
parallel_tool_calls
Source
parallel_tool_calls=(parallel_tool_calls : TokenCountsBodyParallelToolCalls | Nil)
Source
previous_response_id
Source
previous_response_id=(previous_response_id : TokenCountsBodyPreviousResponseId | Nil)
Source
reasoning
Source
reasoning=(reasoning : TokenCountsBodyReasoning | Nil)
Source
text
Source
text=(text : TokenCountsBodyText | Nil)
Source
tool_choice
Source
tool_choice=(tool_choice : TokenCountsBodyToolChoice | Nil)
Source
tools
Source
tools=(tools : TokenCountsBodyTools | Nil)
Source
truncation

The truncation strategy to use for the model response. - auto: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - disabled (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.

Source
truncation=(truncation : TruncationEnum | Nil)

The truncation strategy to use for the model response. - auto: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - disabled (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.

Source