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

Commit 4075260

Browse files
committed
lint
1 parent 6f66f4b commit 4075260

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/completions/endpoints/hugging_face.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,16 @@ def decode(response_raw)
7575

7676
def decode_chunk(chunk)
7777
@json_decoder ||= JsonStreamDecoder.new
78-
(@json_decoder << chunk).map do |parsed|
79-
text = parsed.dig(:choices, 0, :delta, :content)
80-
if text.to_s.empty?
81-
nil
82-
else
83-
text
78+
(@json_decoder << chunk)
79+
.map do |parsed|
80+
text = parsed.dig(:choices, 0, :delta, :content)
81+
if text.to_s.empty?
82+
nil
83+
else
84+
text
85+
end
8486
end
85-
end.compact
87+
.compact
8688
end
8789
end
8890
end

0 commit comments

Comments
 (0)