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

Commit ca6b87a

Browse files
committed
o1 and o1 mini support streaming now, remove hack
1 parent e933f38 commit ca6b87a

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

lib/completions/endpoints/open_ai.rb

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,6 @@ def provider_id
2727
AiApiAuditLog::Provider::OpenAI
2828
end
2929

30-
def perform_completion!(
31-
dialect,
32-
user,
33-
model_params = {},
34-
feature_name: nil,
35-
feature_context: nil,
36-
partial_tool_calls: false,
37-
&blk
38-
)
39-
@disable_native_tools = dialect.disable_native_tools?
40-
if dialect.respond_to?(:is_gpt_o?) && dialect.is_gpt_o? && block_given?
41-
# we need to disable streaming and simulate it
42-
blk.call "", lambda { |*| }
43-
response = super(dialect, user, model_params, feature_name: feature_name, &nil)
44-
45-
response = [response] if !response.is_a?(Array)
46-
response.each { |item| blk.call item, lambda { |*| } }
47-
else
48-
super
49-
end
50-
end
51-
5230
private
5331

5432
def model_uri

0 commit comments

Comments
 (0)