create

in rbi/lib/anthropic/resources/messages.rbi [53:342]


      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,
        
        
        stream: false,
        request_options: {}
      ); end
      
      
      
      
      
      
      
      
      
      sig do
        params(
          max_tokens: Integer,
          messages: T::Array[T.any(Anthropic::Models::MessageParam, Anthropic::Internal::AnyHash)],
          model: T.any(Anthropic::Models::Model::OrSymbol, String),
          metadata: T.any(Anthropic::Models::Metadata, Anthropic::Internal::AnyHash),
          stop_sequences: T::Array[String],
          system_: T.any(String, T::Array[T.any(Anthropic::Models::TextBlockParam, Anthropic::Internal::AnyHash)]),
          temperature: Float,
          thinking: T.any(
            Anthropic::Models::ThinkingConfigEnabled,
            Anthropic::Internal::AnyHash,
            Anthropic::Models::ThinkingConfigDisabled
          ),
          tool_choice: T.any(
            Anthropic::Models::ToolChoiceAuto,
            Anthropic::Internal::AnyHash,
            Anthropic::Models::ToolChoiceAny,
            Anthropic::Models::ToolChoiceTool,
            Anthropic::Models::ToolChoiceNone
          ),
          tools: T::Array[
            T.any(
              Anthropic::Models::Tool,
              Anthropic::Internal::AnyHash,
              Anthropic::Models::ToolBash20250124,
              Anthropic::Models::ToolTextEditor20250124
            )
          ],
          top_k: Integer,
          top_p: Float,
          stream: T.noreturn,
          request_options: T.nilable(T.any(Anthropic::RequestOptions, Anthropic::Internal::AnyHash))
        )
          .returns(
            Anthropic::Internal::Stream[
              T.any(
                Anthropic::Models::RawMessageStartEvent,
                Anthropic::Models::RawMessageDeltaEvent,
                Anthropic::Models::RawMessageStopEvent,
                Anthropic::Models::RawContentBlockStartEvent,
                Anthropic::Models::RawContentBlockDeltaEvent,
                Anthropic::Models::RawContentBlockStopEvent
              )
            ]
          )
      end