Introduction

Accumulation, Fusion, and Iteration

XWorker is a Java implementation of the dynamic model. The dynamic model is a model-based programming approach, where the model is structured data that can be added to, modified, and run at any time. It is suitable for dynamic systems whose functionality can be modified at runtime.

Because the functionality of a dynamic system can change, from a long-term perspective, XWorker's key features are accumulation, fusion, and iteration.

Using XWorker

  • Using Models
    XWorker has built-in models that can be used to write web, desktop, network, game and AI applications.
       
  • Encapsulation model
    Dynamic model is a high-level programming method, which is suitable for encapsulating already written functions into structured data, using them conveniently and quickly through models, and continuing programming based on them.
       
  • Human-computer collaboration
    Models are structured data, and AI can also participate in building models. XWorker is also being built into a human-computer collaboration platform.

Install XWorker

Environmental requirements

  • Java 17+ operating environment (need to be installed and environment variables configured in advance)

Installation steps

1. Prepare the directory

mkdir xworker
cd xworker

2.Download the core package

wget https://www.xworker.org/files/xworker-2.0.4-SNAPSHOT.jar
# or
curl https://www.xworker.org/files/xworker-2.0.4-SNAPSHOT.jar --output xworker-2.0.4-SNAPSHOT.jar

You can also download https://www.xworker.org/files/xworker-2.0.4-SNAPSHOT.jar through your browser and save it to the xworker directory.

3. Execute the installation program

java -jar xworker-2.0.4-SNAPSHOT.jar

4. Installation option configuration

When the console displays the following options:

1: swt_java11

2: swt_java17

3: explorer

4: web

5: exit

Enter 2 and press Enter (select Java17 version installation)

5. Start the main program

# Windows
swt.cmd

# Linux/macOS
./swt.sh

Notes

1. The first installation will download about 210MB of dependency packages (the specific speed depends on the network)

2. After the installation is complete, the following structure will be automatically created:

xworker/
├── config/
├── databases/
├── lib/
├── os/
├── projects/
├── webroot/
├── work/
├── dml.cmd (sh)
├── dml.conf.cmd (sh)
├── example.cmd (sh)
├── setupevn.cmd (sh)
├── swt.cmd (sh)
└── pom.xml

3. If there is a file permission problem (Linux/macOS):

chmod +x dml.sh
chmod +x dml.conf.sh
chmod +x swt.sh

1. Open AI Assistant

2. Open the default chat service configuration model

3. Configure the default service

When you first open the model, there is only the root node. You can set it up as follows:

  1. Click the Add child button below to add a ChatService node.
  2. Click the ChatService node and add a DefaultJsonChatService node.
  3. Edit DefaultJsonChatService, such as the url, apiKey, and model assigned by the AI ​​provider.

DefaultJosnChatService should be compatible with OpenAI.

Join us

    XWorker is open source and complies with the Apache 2.0 license agreement. XWorker welcomes you to join, QQ group 312989786. xworker

 

Copyright ©  2007-2019 XWorker.org  版权所有  沪ICP备08000575号