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

Commit 6e16d8d

Browse files
committed
FIX: should properly be checking for empty
1 parent f1cf272 commit 6e16d8d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/ai_helper/assistant.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def generate_prompt(
134134
json_summary_schema_key = bot.persona.response_format&.first.to_h
135135
helper_chunk = partial.read_buffered_property(json_summary_schema_key["key"]&.to_sym)
136136

137-
if helper_chunk.present?
137+
if !helper_chunk.nil? && !helper_chunk.empty?
138138
helper_response << helper_chunk
139139
block.call(helper_chunk) if block
140140
end

lib/summarization/fold_content.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def fold(items, user, &on_partial_blk)
118118
partial_summary =
119119
partial.read_buffered_property(json_summary_schema_key["key"]&.to_sym)
120120

121-
if partial_summary.present?
121+
if !partial_summary.nil? && !partial_summary.empty?
122122
summary << partial_summary
123123
on_partial_blk.call(partial_summary) if on_partial_blk
124124
end

0 commit comments

Comments
 (0)