summaryrefslogtreecommitdiff
path: root/logic/providers/cohere/tokens.rb
blob: f7d3f55beb585ca72808a74bdb02300bd83825d5 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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