Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
/ L.EIC028_CPD_PRJ02 Public archive

Multi-user terminal chat app with AI-powered rooms, local LLM integration, and LAN support

Notifications You must be signed in to change notification settings

YZ1GO/L.EIC028_CPD_PRJ02

Repository files navigation

Setup

Before running the chat, ensure all necessary settings are configured in config.json.

Example:

{
  "SOCKET_HOST" : "localhost",
  "SOCKET_PORT" : "8008",
  "LLM_URL" : "http://127.0.0.1:1234",
  "MODEL" : "deepseek-r1"
}

Local LLM

To enable AI-powered rooms, it is recommended to run a local LLM server using LM Studio to power all the AI features.

Getting Started

Server

To start the chat server, run:

./gradlew server

Client

To connect as a client, run:

./gradlew client

Authentication

By default, the following accounts are available for login:

Username Password
alice 123
bob 123
joao 123
maria 123

To add more accounts, modify the user list.

Commands

In case of any trouble, use /help :)

Authentication Commands

Command Description
/login <username> <password> Login user
/register <username> <password> Register user

In-Lobby Commands

Command Description
/join <roomname> Join an existing room.
/create <roomname> [1] Create a new room (use 1 to create an AI-powered room).
/room list List the existing rooms.
/logout Disconnect from the server.
/room list Show available chat rooms.

In-Room Commands

Command Description
/join <roomname> Switch to an existing room.
/create <roomname> [1] Create and join a new room (use 1 to create an AI-powered room).
/info Show current room information
/leave Back to lobby

AI-Powered Rooms

If you're in an AI-powered room, interact with the AI bot using:

/ai <message>

Example:

/ai Resume the chat

LAN Setup

Chat Between Machines on the Same Network.

Server Configuration

Open your config.json. and change the host to allow external connections:

{
  "SOCKET_HOST" : "0.0.0.0",
  "SOCKET_PORT" : "8008",
  "LLM_URL" : "http://127.0.0.1:1234",
  "MODEL" : "deepseek-r1"
}
  • SOCKET_HOST: "0.0.0.0" binds the server to all network interfaces, allowing LAN access.

Run these commands on the server's host machine to get its local IP address:

  • Linux:

    hostname -I
  • MacOS

    ipconfig getifaddr en0    # for WIFI
    ipconfig getifaddr en1    # for Ethernet
  • Windows

    ipconfig

Client Configuration

On any other device on the same Wi-Fi or LAN, update the config.json to use the server’s IP address:

{
  "SOCKET_HOST" : "Replace with the server's IP",
  "SOCKET_PORT" : "8008",
  "LLM_URL" : "http://127.0.0.1:1234",
  "MODEL" : "deepseek-r1"
}

About

Multi-user terminal chat app with AI-powered rooms, local LLM integration, and LAN support

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages