Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit f2c879a

Browse files
committed
fix o1 xml tool support
1 parent c806ab6 commit f2c879a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/completions/endpoints/open_ai.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def perform_completion!(
4141
# we need to disable streaming and simulate it
4242
blk.call "", lambda { |*| }
4343
response = super(dialect, user, model_params, feature_name: feature_name, &nil)
44-
blk.call response, lambda { |*| }
44+
45+
response = [response] if !response.is_a?(Array)
46+
response.each { |item| blk.call item, lambda { |*| } }
4547
else
4648
super
4749
end

0 commit comments

Comments
 (0)