summaryrefslogtreecommitdiff
path: root/logic/providers/ollama/tokens.rb
diff options
context:
space:
mode:
Diffstat (limited to 'logic/providers/ollama/tokens.rb')
-rw-r--r--logic/providers/ollama/tokens.rb14
1 files changed, 14 insertions, 0 deletions
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