mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
refactor: Modify reasoning content removal method to update partial_response_content directly
This commit is contained in:
parent
cddc67ad69
commit
08401aff26
2 changed files with 10 additions and 10 deletions
|
@ -59,6 +59,7 @@ class TestReasoning(unittest.TestCase):
|
|||
self.assertIn(main_content, output)
|
||||
|
||||
# Verify that partial_response_content only contains the main content
|
||||
coder.remove_reasoning_content()
|
||||
self.assertEqual(coder.partial_response_content.strip(), main_content.strip())
|
||||
|
||||
# Ensure proper order: reasoning first, then main content
|
||||
|
@ -168,12 +169,10 @@ class TestReasoning(unittest.TestCase):
|
|||
)
|
||||
|
||||
# Verify that partial_response_content only contains the main content
|
||||
coder.remove_reasoning_content()
|
||||
expected_content = "Final answer after reasoning"
|
||||
self.assertEqual(coder.partial_response_content.strip(), expected_content)
|
||||
|
||||
# Verify that partial_response_content only contains the main content
|
||||
self.assertEqual(coder.partial_response_content.strip(), "Final answer after reasoning")
|
||||
|
||||
def test_send_with_think_tags(self):
|
||||
"""Test that <think> tags are properly processed and formatted."""
|
||||
# Setup IO with no pretty
|
||||
|
@ -240,6 +239,7 @@ class TestReasoning(unittest.TestCase):
|
|||
)
|
||||
|
||||
# Verify that partial_response_content only contains the main content
|
||||
coder.remove_reasoning_content()
|
||||
self.assertEqual(coder.partial_response_content.strip(), main_content.strip())
|
||||
|
||||
def test_send_with_think_tags_stream(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue