Dependencies and configuration¶
Most Flou projects will need to install 3rd party Python packages to use in their Networks of Agents. As the orchestration engine runs inside Docker, Flou automatically handles the installation of the dependencies.
Adding dependencies to a Flou project¶
- Create a
requirements.txtfile in the same folder as yourapp.py - Add any package you wish to install
- Restart the Flou Engine
flou compose restart engine - Upon initialization the engine installs any new dependencies present in
requirements.txt
Using environment variables¶
For different environments, project settings and 3rd party packages configuration you might need to set environment variables.
- Create a
.envfile in the same folder as yourapp.py -
Add pairs of
KEY=valuedefining your environment variables, one per line. Variable names must be written in caps. For example in the case of OpenAI API you can set: -
Inside your python scripts you can:
Modifying Flou's settings¶
Flou's own settings can be overridden by .env files. For example you can set
APP_NAME to modify the project's name that will appear in the Studio.
You can see all the available settings in flou/conf.py.
For nested configs use __ (double underscore), for example DATABASE__NAME.
Executor settings¶
Max retries¶
- Type: Int
- Default: 1
- Description: You can set the maximum amount of retries for a certain
execution by setting
EXECUTOR__MAX_RETRIES. Each retry will be done with a jittery exponential backoff. For more information see Celery's documentation.