AssistDesk Worker - Developer Guidelines

Setup

To use the AssistDesk Worker, you need to install the dependencies and configure the environment variables.

Install Dependencies

Install the required dependencies using npm:


  npm install
  

Configure Environment Variables

Set the following environment variables. Refer to sample.env for example values:

Start the Worker

Once the dependencies are installed and the environment variables are configured, start the worker using the following command:


  npm start
  

Usage

The AssistDesk Worker automatically subscribes to relevant channels on the LiveServer and handles incoming messages. It uses the Ollama API to generate responses and sends them back to the AssistDesk server.

Extending Chatbot Features

To extend the chatbot's capabilities, you can modify the following:

Ollama Request Template

Customize the OLLAMA_REQUEST_TEMPLATE environment variable to provide specific instructions or context to the Ollama API. This allows you to fine-tune the chatbot's behavior and responses.

Chat Context

Modify the convertToChatContext function in ollama.ts to include additional information or context that the chatbot should consider when generating responses. This could include user profiles, past conversations, or specific knowledge bases.

Message Handling

Extend the processMessage function in worker.ts to handle different message types or formats. This allows you to integrate new features like image recognition, sentiment analysis, or other advanced functionalities.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This software is proprietary and is the property of New Modern Technology. All rights reserved.