| from flow_modules.Tachi67.AbstractBossFlowModule import AbstractBossFlow | |
| class JarvisFlow(AbstractBossFlow): | |
| """JarvisFlow is a flow module for the boss Jarvis. It inherits from AbstractBossFlow. ( | |
| https://huggingface.co/Tachi67/AbstractBossFlowModule/tree/main). Jarvis is a general purpose agent empowered by | |
| multiple large language models and tools including a code interpreter, to take task commands in natural language, | |
| and make plans, write and run code in an interactive fashion to finish the task. | |
| The highlight of Jarvis is that it integrates 17 large language models, each of them prompted differently to achieve | |
| seamless inter-model communication and model-user interaction. The structure of Jarvis ensures that it is much more | |
| robust, flexible and memory-efficient than previous agents empowered by one single model. | |
| What's more, Jarvis integrates modules to allow for llm's memory management, ensuring persisted mid-long term memory | |
| and efficient short-term memory management, making its life duration much longer than single-modeled agents, | |
| and more powerful, in that it is able to accumulate important knowledge e.g. code library. Jarvis can also take | |
| response from the user and the environment (e.g. code execution result), and spontaneously re-plan and re-execute | |
| to make the execution more robust and reliable. | |
| *Configuration Parameters*: | |
| - `memory_files` (dict): mem_name-memfile_path pairs. mem_name is the name of the memory (plan, logs, code_library), | |
| and memfile_path is the path to the corresponding memory file. Configure this either in the .yaml file, or override | |
| the `memory_files` entry when running the flow. | |
| - `subflows_config` (dict): configs for subflows. | |
| - `MemoryReading`: Module used to read in memory (https://huggingface.co/Tachi67/MemoryReadingFlowModule), output interface | |
| configured so that it outputs the neeed memory. | |
| - `Planner`: Module used to interactively write plans for Jarvis, the planner is implemented in the JarvisFlow. | |
| - `CtrlExMem`: Module used to execute the plan in a controller-executor manner, and update the memory. It is implemented | |
| in the JarvisFlow. | |
| **The code interpreter of Jarvis (https://huggingface.co/Tachi67/InterpreterFlowModule) relies on open-interpreter (https://github.com/KillianLucas/open-interpreter) | |
| We are extracting the specific code from open-interpreter because the litellm version of open-interpreter is not compatible with that of the current version of aiflows(v.0.1.7).** | |
| """ | |
| pass |