[Feature] add 'function (tool)' supports the processing of generator return formats.
Closed this issue · 2 comments
MaxKB Version
2.0.2
Please describe your needs or suggestions for improvements
Add 'function (tool)' supports the processing of generator return formats.
In large model application-related functions, such as the PPT translation function, each text box in the PPT needs to be processed by calling the large model for translation. Usually, the complete execution time is relatively long, and it is necessary to output the processing progress in stages. Therefore, the function needs to support the capability of multiple returns.
Please describe the solution you suggest
In the current return configuration of functions, add a new option: "Return Type". Among the options, the "generator" type can be selected. It is sufficient to receive and process the function return results through a for loop polling.
Additional Information
This is a requirement from enterprise users. Currently, this function is not available, and the enterprise version does not support secondary development, which affects its usage.
感谢反馈,当前工具是在沙箱运行的,无法实现流式输出。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Thanks for feedback, the current tool is running in a sandbox and cannot achieve streaming output.