mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
feat: Add reasoning content indicators in response handling
This commit is contained in:
parent
539859f1ab
commit
c2e7b533d3
1 changed files with 3 additions and 1 deletions
|
@ -1758,6 +1758,8 @@ class Coder:
|
||||||
try:
|
try:
|
||||||
text = chunk.choices[0].delta.reasoning_content
|
text = chunk.choices[0].delta.reasoning_content
|
||||||
if text:
|
if text:
|
||||||
|
if not self.got_reasoning_content:
|
||||||
|
self.partial_response_content += "> Thinking ...\n\n"
|
||||||
self.got_reasoning_content = True
|
self.got_reasoning_content = True
|
||||||
self.partial_response_content += text
|
self.partial_response_content += text
|
||||||
received_content = True
|
received_content = True
|
||||||
|
@ -1768,7 +1770,7 @@ class Coder:
|
||||||
text = chunk.choices[0].delta.content
|
text = chunk.choices[0].delta.content
|
||||||
if text:
|
if text:
|
||||||
if self.got_reasoning_content and not self.ended_reasoning_content:
|
if self.got_reasoning_content and not self.ended_reasoning_content:
|
||||||
tag = f"\n\n> Done thinking ...\n\n------\n\n</{REASONING_TAG}>\n\n"
|
tag = f"\n\n> ... done thinking.\n\n------\n\n</{REASONING_TAG}>\n\n"
|
||||||
self.partial_response_content += tag
|
self.partial_response_content += tag
|
||||||
self.ended_reasoning_content = True
|
self.ended_reasoning_content = True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue