mirror of
https://git.mirrors.martin98.com/https://github.com/bytedance/deer-flow
synced 2025-08-18 02:35:57 +08:00
fix: use "json_mode"
This commit is contained in:
parent
7497857b71
commit
19d8a59def
@ -19,12 +19,12 @@ def script_writer_node(state: PodcastState):
|
|||||||
logger.info("Generating script for podcast...")
|
logger.info("Generating script for podcast...")
|
||||||
model = get_llm_by_type(
|
model = get_llm_by_type(
|
||||||
AGENT_LLM_MAP["podcast_script_writer"]
|
AGENT_LLM_MAP["podcast_script_writer"]
|
||||||
).with_structured_output(Script)
|
).with_structured_output(Script, method="json_mode")
|
||||||
script = model.invoke(
|
script = model.invoke(
|
||||||
[
|
[
|
||||||
SystemMessage(content=get_prompt_template("podcast_script_writer")),
|
SystemMessage(content=get_prompt_template("podcast_script_writer")),
|
||||||
HumanMessage(content=state["input"]),
|
HumanMessage(content=state["input"]),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
logging.info(script)
|
print(script)
|
||||||
return {"script": script, "audio_chunks": []}
|
return {"script": script, "audio_chunks": []}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user