feat: 引入deepseek结构化输出
This commit is contained in:
@@ -58,7 +58,8 @@ class ProcessMemoirSegmentsImageEnqueueTest(unittest.TestCase):
|
||||
get_state_mock.return_value = SimpleNamespace(current_stage="childhood", slots={})
|
||||
update_slot_mock.return_value = SimpleNamespace(current_stage="childhood", slots={})
|
||||
llm = Mock()
|
||||
llm.invoke.side_effect = [
|
||||
bound_llm = Mock()
|
||||
bound_llm.invoke.side_effect = [
|
||||
SimpleNamespace(
|
||||
content="""```json
|
||||
{
|
||||
@@ -69,8 +70,12 @@ class ProcessMemoirSegmentsImageEnqueueTest(unittest.TestCase):
|
||||
}
|
||||
```"""
|
||||
),
|
||||
SimpleNamespace(content='{"paragraphs":[{"content":"新的章节正文","image_description":"南方小镇的青石板路"}]}'),
|
||||
]
|
||||
llm.bind.return_value = bound_llm
|
||||
llm.invoke.side_effect = [
|
||||
SimpleNamespace(content="childhood"),
|
||||
SimpleNamespace(content="童年的门前"),
|
||||
SimpleNamespace(content="新的章节正文\n\n{{IMAGE:南方小镇的青石板路}}"),
|
||||
]
|
||||
get_llm_mock.return_value = llm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user