in rbi/lib/anthropic/resources/beta/messages.rbi [59:355]
def create(
max_tokens:,
messages:,
model:,
metadata: nil,
stop_sequences: nil,
system_: nil,
temperature: nil,
thinking: nil,
tool_choice: nil,
tools: nil,
top_k: nil,
top_p: nil,
betas: nil,
stream: false,
request_options: {}
); end
sig do
params(
max_tokens: Integer,
messages: T::Array[T.any(Anthropic::Models::Beta::BetaMessageParam, Anthropic::Internal::AnyHash)],
model: T.any(Anthropic::Models::Model::OrSymbol, String),
metadata: T.any(Anthropic::Models::Beta::BetaMetadata, Anthropic::Internal::AnyHash),
stop_sequences: T::Array[String],
system_: T.any(String, T::Array[T.any(Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Internal::AnyHash)]),
temperature: Float,
thinking: T.any(
Anthropic::Models::Beta::BetaThinkingConfigEnabled,
Anthropic::Internal::AnyHash,
Anthropic::Models::Beta::BetaThinkingConfigDisabled
),
tool_choice: T.any(
Anthropic::Models::Beta::BetaToolChoiceAuto,
Anthropic::Internal::AnyHash,
Anthropic::Models::Beta::BetaToolChoiceAny,
Anthropic::Models::Beta::BetaToolChoiceTool,
Anthropic::Models::Beta::BetaToolChoiceNone
),
tools: T::Array[
T.any(
Anthropic::Models::Beta::BetaTool,
Anthropic::Internal::AnyHash,
Anthropic::Models::Beta::BetaToolComputerUse20241022,
Anthropic::Models::Beta::BetaToolBash20241022,
Anthropic::Models::Beta::BetaToolTextEditor20241022,
Anthropic::Models::Beta::BetaToolComputerUse20250124,
Anthropic::Models::Beta::BetaToolBash20250124,
Anthropic::Models::Beta::BetaToolTextEditor20250124
)
],
top_k: Integer,
top_p: Float,
betas: T::Array[T.any(String, Anthropic::Models::AnthropicBeta::OrSymbol)],
stream: T.noreturn,
request_options: T.nilable(T.any(Anthropic::RequestOptions, Anthropic::Internal::AnyHash))
)
.returns(
Anthropic::Internal::Stream[
T.any(
Anthropic::Models::Beta::BetaRawMessageStartEvent,
Anthropic::Models::Beta::BetaRawMessageDeltaEvent,
Anthropic::Models::Beta::BetaRawMessageStopEvent,
Anthropic::Models::Beta::BetaRawContentBlockStartEvent,
Anthropic::Models::Beta::BetaRawContentBlockDeltaEvent,
Anthropic::Models::Beta::BetaRawContentBlockStopEvent
)
]
)
end