<commit_before>module RubyAMI
  class Action
    attr_reader :name, :headers, :action_id

    attr_accessor :state

    CAUSAL_EVENT_NAMES = %w[queuestatus sippeers iaxpeers parkedcalls dahdishowchannels coreshowchannels
                            dbget status agents konferencelist] unless defined? CAUSAL_EVENT_NAMES

    def initialize(name, headers = {}, &block)
      @name       = name.to_s.downcase.freeze
      @headers    = headers.freeze
      @action_id  = RubyAMI.new_uuid
      @response   = FutureResource.new
      @response_callback = block
      @state      = :new
      @events     = []
      @event_lock = Mutex.new
    end

    [:new, :sent, :complete].each do |state|
      define_method("#{state}?") { @state == state }
    end

    def replies_with_action_id?<commit_msg>Update lib/ruby_ami/action.rb<commit_after>module RubyAMI
  class Action
    attr_reader :name, :headers, :action_id

    attr_accessor :state

    CAUSAL_EVENT_NAMES = %w[queuestatus sippeers iaxpeers parkedcalls dahdishowchannels coreshowchannels
                            dbget status agents konferencelist confbridgelist confbridgelistrooms] unless defined? CAUSAL_EVENT_NAMES

    def initialize(name, headers = {}, &block)
      @name       = name.to_s.downcase.freeze
      @headers    = headers.freeze
      @action_id  = RubyAMI.new_uuid
      @response   = FutureResource.new
      @response_callback = block
      @state      = :new
      @events     = []
      @event_lock = Mutex.new
    end

    [:new, :sent, :complete].each do |state|
      define_method("#{state}?") { @state == state }
    end

    def replies_with_action_id?
{'fraction_non_alphanumeric': 0.08957952468007313, 'fraction_numerical': 0.0, 'mean_word_length': 2.689887640449438, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2449113', 'n_tokens_mistral': 532, 'n_tokens_neox': 516, 'n_words': 112}