DLLM Desktop

DLLM Desktop is the front end of the DLLM Desktop application. It provides a chat-based, conversational interface for applications managed in a local DLLM workspace.

Source

Setup workspace

DLLM Desktop works with a local workspace in ~/.dllmapp. If the folder does not already exist, Desktop creates it automatically. The workspace stores user data, profiles, application registrations, source repositories, and application logs.

By default, Desktop creates the profilename profile. Its important folders and files include:

~/.dllmapp/
├── user_profile.json
└── profiles/
    └── profilename/
        ├── appinfo.json
        ├── boot-*.json
        ├── repositories/
        └── docker/
            └── logs/
PathPurpose
~/.dllmappThe root of the local workspace.
~/.dllmapp/user_profile.jsonStores user data.
~/.dllmapp/profilesThe root folder for local profiles.
~/.dllmapp/profiles/profilenameThe default profile folder.
~/.dllmapp/profiles/profilename/appinfo.jsonApplication data generated by the profile bootloader.
~/.dllmapp/profiles/profilename/boot-*.jsonRegistration files for managed applications.
~/.dllmapp/profiles/profilename/repositoriesSource repositories for managed applications.
~/.dllmapp/profiles/profilename/docker/logsLogs for all managed applications.

Select a profile

Set DLLM_PROFILE_NAME to load a profile other than the default:

export DLLM_PROFILE_NAME=profilename

Use the profile name that matches the folder under ~/.dllmapp/profiles.

Managed applications

Managed applications are configured in the profile's boot-*.json files. Desktop loads every configuration file that matches this pattern and merges the configuration before running the profile bootloader.

The initial setup includes a boot.json template. When adding an application, create a new boot-*.json file and add its registration to the applications array. Keeping application registrations in separate files makes each application easier to manage independently.

Configuration example

{
  "apptemplates": {
    "__EXAMPLE__": {
      "url": ""
    },
    "chattemplate": {
      "url": "[email protected]:dronelabourlm/chatapptemplate.git",
      "branch": "v0.1"
    }
  },
  "applications": [
    {
      "name": "__EXAMPLE__",
      "enabled": true,
      "gitrepository": "[email protected]:projectgroup/project.git",
      "gitbranch": "main",
      "launcher": "conda",
      "launcher_command": "python",
      "launcher_args": [
        "-m",
        "mainmodule"
      ],
      "env": {
        "OPENAI_API_KEY": "",
        "GOOGLE_API_KEY": "",
        "USER_PROFILE_FILE": ""
      }
    }
  ]
}

The apptemplates object defines available application templates. The chattemplate entry points to the chattemplate repository and its v0.1 branch.

Each object in applications registers one managed application. It specifies the repository and branch to use, how to launch the application, and any environment variables required at runtime. Entries named **EXAMPLE** are placeholders to replace with your own application details.

FieldPurpose
enabledControls whether the bootloader starts the application.
gitrepository and gitbranchIdentify the application source repository and branch.
launcherSelects the application launcher. The currently supported value is conda.
launcher_commandSelects the application command. The currently supported value is python.
launcher_argsDefine the arguments passed to the command.
envSupplies environment variables to the application process.

chattemplate uses the supported conda launcher with a Python command.

How the bootloader manages applications

Desktop runs the profile bootloader periodically. On each cycle, it reads the merged boot-*.json configuration, starts applications whose enabled value is true, and checks their repositories for updates with git pull. When an application has updated source, the bootloader restarts it.

The bootloader then creates appinfo.json. DLLM Desktop reads this file to load information about the managed applications.

Local backend

Desktop starts dllmprofiles.py as its local backend. The Python server listens on port 26001 and enables Desktop to work with the local workspace and its managed applications.

The server source is part of App Hub.