diff options
Diffstat (limited to 'logic/providers')
-rw-r--r-- | logic/providers/maritaca/tokens.rb | 14 | ||||
-rw-r--r-- | logic/providers/ollama/tokens.rb | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/logic/providers/maritaca/tokens.rb b/logic/providers/maritaca/tokens.rb new file mode 100644 index 0000000..1ae2219 --- /dev/null +++ b/logic/providers/maritaca/tokens.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module NanoBot + module Logic + module Maritaca + module Tokens + def self.apply_policies!(_cartridge, payload) + payload[:messages] = payload[:messages].map { |message| message.except(:_meta) } + payload + end + end + end + end +end diff --git a/logic/providers/ollama/tokens.rb b/logic/providers/ollama/tokens.rb new file mode 100644 index 0000000..45500fb --- /dev/null +++ b/logic/providers/ollama/tokens.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module NanoBot + module Logic + module Ollama + module Tokens + def self.apply_policies!(_cartridge, payload) + payload[:messages] = payload[:messages].map { |message| message.except(:_meta) } + payload + end + end + end + end +end |