Dive into apps
User apps are stored in a directory. The files that comprise the application program include YAML files, Python code, environment variables, authentication tokens, and other static resources(such as word embeddings).
The directory also contains data generated during the program's execution
your_apps_dir/ .evn .tokens your_app_1.yaml your_app_2.yaml memories/ embeddings/ static/ helpers.py
- .env The file contains environment variable settings, such as OPENAI_API_KEY.
- .token The file contains authentication information for users and permissions, used for API authentication.
- your_app_*.yaml The file defines the application, and a folder can contain multiple applications.
- memories The folder is automatically generated during program execution and is used to store data generated by the program.
- embeddings The folder is used to store text embedding data, and the application performs similarity searches during runtime.
- static The folder stores static resources required by the application.
- helpers.py is a collection of custom Python functions that can be invoked in the application. You can define multiple pypthon files and functions of any complexity.
Set environment variables
The last column is for user permissions. "write" indicates that the user has write permission. Executing an application requires write permission, otherwise the user only has read permission.
The ".tokens" file is not necessary. If there is no ".tokens" file in the application folder, it means that authentication is not required and all users can read and write anonymously.
Chatbot applications typically need to save conversation context data. We refer to this data as "memories." You can also implement your own memory storage method. Aify is a highly scalable framework.
The "embeddings" directory contains some CSV files that store word embeddings. It is used to retrieve data based on similarity during program execution, allowing the application to dynamically utilize external data. Similarly, you can also implement your own embedding retrieval method.
Helper functions is a collection of custom Python functions that can be invoked in the application. You can define multiple pypthon files and functions of any complexity.
This can be used to enable communication between applications and external systems. For example, it allows for real-time access to a search engine's interface to retrieve data.