Description
After UFO complete all the request actions and the logs shows Task is Completed. Then it starts summarizing and saving the execution flow as experience, but it failed with below error:
Exception has occurred: UnboundLocalError (note: full exception trace is shown but execution is paused at: run_module_as_main)
cannot access local variable 'summary' where it is not associated with a value
File "E:\Repos\UFO\ufo\experience\summarizer.py", line 98, in get_summary
return summary, cost
^^^^^^^
File "E:\Repos\UFO\ufo\experience\summarizer.py", line 110, in get_summary_list
summary, cost = self.get_summary(prompt)
^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Repos\UFO\ufo\module\basic.py", line 566, in experience_saver
summaries, cost = summarizer.get_summary_list(experience)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Repos\UFO\ufo\module\sessions\session.py", line 186, in run
self.experience_saver()
File "E:\Repos\UFO\ufo\module\client.py", line 28, in run_all
session.run()
File "E:\Repos\UFO\ufo\ufo.py", line 69, in main
clients.run_all()
File "E:\Repos\UFO\ufo_main.py", line 7, in
ufo.main()
File "C:\Users\userprofile\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 88, in _run_code
exec(code, run_globals)
File "C:\Users\userprofile\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 198, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
UnboundLocalError: cannot access local variable 'summary' where it is not associated with a value