From 9d9702b39db67ab66894e5483a267a05ea0f6a2d Mon Sep 17 00:00:00 2001 From: icebaker Date: Thu, 7 Dec 2023 20:38:49 -0300 Subject: adding tools medatada --- components/providers/openai.rb | 2 +- components/stream.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/providers/openai.rb b/components/providers/openai.rb index 87f2bc5..6384181 100644 --- a/components/providers/openai.rb +++ b/components/providers/openai.rb @@ -49,7 +49,7 @@ module NanoBot end end - %i[instruction backdrop directive].each do |key| + %i[backdrop directive].each do |key| next unless input[:behavior][key] messages.prepend( diff --git a/components/stream.rb b/components/stream.rb index 347eb87..73da8b0 100644 --- a/components/stream.rb +++ b/components/stream.rb @@ -13,9 +13,9 @@ module NanoBot @accumulated = "#{@accumulated.force_encoding('UTF-8')}#{args.first.force_encoding('UTF-8')}" end - @callback.call(@accumulated, args.first, false) + @callback.call(@accumulated, args.first, false, args[1]) end - super + super(args.first) end def callback=(block) -- cgit v1.2.3