We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bd0adc commit 7eceebfCopy full SHA for 7eceebf
lib/llm/providers/openai.rb
@@ -30,14 +30,11 @@ def complete(message, **params)
30
params = DEFAULT_PARAMS.merge(params)
31
body = {messages: messages.map(&:to_h)}.merge!(params)
32
req = preflight(req, body)
33
- puts req.body
34
if params[:stream]
35
Fiber.new do
36
@http.request(req) do |res|
37
res.read_body do |chunk|
38
chunk.scan(/^data:(.+)$/).each do |match|
39
- break if match[0].strip == "[DONE]"
40
- next if match[0].strip.empty?
41
Fiber.yield Response::Chunk.new(match[0], self).extend(response_parser)
42
end
43
0 commit comments