diff options
author | icebaker <113217272+icebaker@users.noreply.github.com> | 2023-12-29 16:59:59 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-29 16:59:59 -0300 |
commit | 678f21d70cc5d6f41aa8f1ab80f70d28ec8f7647 (patch) | |
tree | 2b82791436be0b031d3a06609bda8afce4784f4a /logic/providers | |
parent | 91c635366bab160b81b2c1690234f97040d0d60b (diff) | |
parent | 56dcecfdbaf10c90527b65f03b19a94f2f4d8a05 (diff) |
Merge pull request #13 from icebaker/ib-cohere
Adding support to Cohere
Diffstat (limited to 'logic/providers')
-rw-r--r-- | logic/providers/cohere/tokens.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/logic/providers/cohere/tokens.rb b/logic/providers/cohere/tokens.rb new file mode 100644 index 0000000..f7d3f55 --- /dev/null +++ b/logic/providers/cohere/tokens.rb @@ -0,0 +1,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 |