class RubyLLM::AgUI::Input::Parser
Decodes and validates one request body.
Kept separate from Input so the value object stays immutable and every failure message stays in one place.
Constants
- MAX_NESTING
Public Class Methods
new(raw, max_bytes:, strict:, logger:)
click to toggle source
# File lib/ruby_llm/ag_ui/input.rb, line 126 def initialize(raw, max_bytes:, strict:, logger:) @raw = raw @max_bytes = max_bytes || RubyLLM::AgUI.config.max_input_bytes @strict = strict @logger = logger || RubyLLM::AgUI.config.logger @warnings = [] @parts = PartBuilder.new end
Public Instance Methods
parse()
click to toggle source
# File lib/ruby_llm/ag_ui/input.rb, line 135 def parse document = strip_unknown_members(decode(read_body)) validate_common(document) build(document) end