Open aliasal opened 5 months ago
workflow.add_conditional_edges(source ='critique', path =lambda x: "accept" if x['critique'] is None else "revise", path_map ={"accept": "design", "revise": "write"})
workflow.add_conditional_edges(source ='critique', path =lambda x: "accept" if x['critique'] is None else "revise", path_map ={"accept": "design", "revise": "write"})
this worked for me :)
UPDATE: After checking latest documentation of langgraph API, I modified the langgraph_agent like so:
workflow.add_conditional_edges( source='critique', path=lambda x: "design" if x['critique'] is None else "write" )
hope this works for all!
Thanks - this worked for me :)
Hi I installed the software in a virtual environment, python 3.11, win10, 64bit
When I click on the "produce newspaper " button nothing happens but a short "hick" of the page. The console shows the following error:
File "C:\Users\Arnd\Desktop 3\gpt-newspaper\gpt-newspaper\backend\langgraph_agent.py", line 39, in run workflow.add_conditional_edges(start_key='critique', TypeError: Graph.add_conditional_edges() got an unexpected keyword argument 'start_key'
Deleting this keyword and the next two ('condition' and 'conditional_edge_mapping') solved the problem.
You should mention to rename .env.dist to .env after the github cloning.
Thanks for this great project.