Sha256: 5bf783cebf87a91cb9abe77db446767cc0a27e0b493dcc52b58cd0dc6756fc10

Contents?: true

Size: 363 Bytes

Versions: 9

Compression:

Stored size: 363 Bytes

Contents

# frozen_string_literal: true

module NanoBot
  module Logic
    module Cohere
      module Tokens
        def self.apply_policies!(_cartridge, payload)
          if payload[:chat_history]
            payload[:chat_history] = payload[:chat_history].map { |message| message.except(:_meta) }
          end

          payload
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
nano-bots-3.4.0 logic/providers/cohere/tokens.rb
nano-bots-3.3.0 logic/providers/cohere/tokens.rb
nano-bots-3.2.0 logic/providers/cohere/tokens.rb
nano-bots-3.0.1 logic/providers/cohere/tokens.rb
nano-bots-3.0.0 logic/providers/cohere/tokens.rb
nano-bots-2.5.1 logic/providers/cohere/tokens.rb
nano-bots-2.5.0 logic/providers/cohere/tokens.rb
nano-bots-2.4.1 logic/providers/cohere/tokens.rb
nano-bots-2.4.0 logic/providers/cohere/tokens.rb