mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
feat: add support for both reasoning and reasoning_content fields
This commit is contained in:
parent
a405063385
commit
a37d6e86df
1 changed files with 11 additions and 2 deletions
|
@ -1782,12 +1782,21 @@ class Coder:
|
||||||
reasoning_content = chunk.choices[0].delta.reasoning_content
|
reasoning_content = chunk.choices[0].delta.reasoning_content
|
||||||
if reasoning_content:
|
if reasoning_content:
|
||||||
if not self.got_reasoning_content:
|
if not self.got_reasoning_content:
|
||||||
text += f"<{REASONING_TAG}>\n\n"
|
text += f"<{self.reasoning_tag_name}>\n\n"
|
||||||
text += reasoning_content
|
text += reasoning_content
|
||||||
self.got_reasoning_content = True
|
self.got_reasoning_content = True
|
||||||
received_content = True
|
received_content = True
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
try:
|
||||||
|
reasoning_content = chunk.choices[0].delta.reasoning
|
||||||
|
if reasoning_content:
|
||||||
|
if not self.got_reasoning_content:
|
||||||
|
text += f"<{self.reasoning_tag_name}>\n\n"
|
||||||
|
text += reasoning_content
|
||||||
|
self.got_reasoning_content = True
|
||||||
|
received_content = True
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
content = chunk.choices[0].delta.content
|
content = chunk.choices[0].delta.content
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue