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,7 +1782,16 @@ class Coder:
|
|||
reasoning_content = chunk.choices[0].delta.reasoning_content
|
||||
if 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
|
||||
self.got_reasoning_content = True
|
||||
received_content = True
|
||||
except AttributeError:
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue