diff options
author | icebaker <icebaker@proton.me> | 2023-12-07 20:38:49 -0300 |
---|---|---|
committer | icebaker <icebaker@proton.me> | 2023-12-07 20:38:49 -0300 |
commit | 9d9702b39db67ab66894e5483a267a05ea0f6a2d (patch) | |
tree | 165e52d98ade38c10eb7de91120208f0293a140c /components | |
parent | 6a6b154f0453875d09bbf86127c475a2b9020aa7 (diff) |
adding tools medatada
Diffstat (limited to 'components')
-rw-r--r-- | components/providers/openai.rb | 2 | ||||
-rw-r--r-- | components/stream.rb | 4 |
2 files changed, 3 insertions, 3 deletions
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) |