add action node example

This commit is contained in:
geekan 2024-02-01 15:43:50 +08:00
parent b2de082227
commit 9ecdccd836

View file

@ -37,6 +37,7 @@ async def generate_novel():
instruction = (
"Write a novel named 'Harry Potter in The Lord of the Rings'. "
"Fill the empty nodes with your own ideas. Be creative! Use your own words!"
"I will tip you $100,000 if you write a good novel."
)
novel_node = await ActionNode.from_pydantic(Novel).fill(context=instruction, llm=LLM())
chap_node = await ActionNode.from_pydantic(Chapter).fill(