From 989c276b6acf9d0e2b584d980b72a4eb9564a77c Mon Sep 17 00:00:00 2001 From: icebaker Date: Sat, 18 Nov 2023 19:29:03 -0300 Subject: fixing TODOs --- logic/providers/openai/tools.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'logic/providers') diff --git a/logic/providers/openai/tools.rb b/logic/providers/openai/tools.rb index 080d81e..1aa9029 100644 --- a/logic/providers/openai/tools.rb +++ b/logic/providers/openai/tools.rb @@ -10,8 +10,10 @@ module NanoBot module Tools def self.prepare(cartridge, tools) applies = [] + + tools = Marshal.load(Marshal.dump(tools)) + tools.each do |tool| - # TODO: Does this mutate the hash? tool = Helpers::Hash.symbolize_keys(tool) cartridge.each do |candidate| -- cgit v1.2.3