run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
35.38k stars 4.98k forks source link

[Bug]: Workflow.run and Workflow.run_step return str. They should return Any #15624

Open gabayben opened 2 weeks ago

gabayben commented 2 weeks ago

Bug Description

The run and run_step methods in Workflow return str. That is inaccurate and can lead to false error reporting in the code editor. They should return Any.

Version

0.11.1

Steps to Reproduce

Nothing to reproduce. Just change the return annotations.

Relevant Logs/Tracbacks

No response

dosubot[bot] commented 2 weeks ago

Yes, the return type of the Workflow.run method should be changed from str to Any in version 0.11.1. The method currently returns session._retval, which is not guaranteed to be a string [1].

To continue talking to Dosu, mention @dosu.