Skip to content

Commit

Permalink
fix: Excerpt from the thinking process (#2181)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 authored Feb 9, 2025
1 parent 44dd952 commit 80a700b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/application/flow/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def get_reasoning_content(self, chunk):
self.reasoning_content_is_start = True
self.reasoning_content_chunk = self.all_content[self.reasoning_content_start_tag_len:]
else:
self.reasoning_content_is_end = True
if not self.reasoning_content_is_end:
self.reasoning_content_is_end = True
self.content += self.all_content
return {'content': self.all_content, 'reasoning_content': ''}
else:
if self.reasoning_content_is_start:
self.reasoning_content_chunk += chunk.content
Expand Down

0 comments on commit 80a700b

Please sign in to comment.