class Multiwoven::Integrations::Source::Anthropic::Client
def run_model_stream(connection_config, payload)
def run_model_stream(connection_config, payload) send_streaming_request( url: ANTHROPIC_URL, http_method: HTTP_POST, payload: JSON.parse(payload), headers: build_headers(connection_config, streaming: true), config: connection_config[:config] ) do |chunk| process_streaming_response(chunk) { |message| yield message if block_given? } end rescue StandardError => e handle_exception(e, { context: "ANTHROPIC:RUN_STREAM_MODEL:EXCEPTION", type: "error" }) end