A small Java project that allows students to use a local LLM client (DeepSeek) in their own projects without API keys.
It handles browser automation behind the scenes using Playwright so you can send messages to the LLM easily.
- Java 17 or higher
- Maven
- Brave browser installed (Playwright uses it to run DeepSeek locally)
Follow these steps to set up the project locally:
Clone the repo
git clone https://github.com/Haddajii/Simple_LLM.git Enter the project directory
cd Simple_LLM Install locally using Maven
mvn clean install After installing locally, you can use the haddaji_simple_llm function in your Java project.
If you installed the project locally, add this to your pom.xml:
<dependency>
<groupId>com.haddaji</groupId>
<artifactId>Haddaji_Simple_LLM</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>import com.haddaji.HaddajiLLM;
public class Main { public static void main(String[] args) throws Exception { // Send a message to the LLM String response = HaddajiLLM.haddaji_simple_llm("Who is the best player in the world?"); System.out.println(response); // Close the client/browser when done HaddajiLLM.close(); } }
- This project uses Playwright for browser automation. Brave browser must be installed and accessible in your PATH.
- No API key is needed; it works by automating the DeepSeek web interface locally.
- It’s intended for learning, experimenting, and student projects.
This project is released under the MIT License. See the LICENSE file for details.