npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-jhipster-llm

v0.0.2

Published

JHipster Blueprint for Generating LLM Code

Downloads

12

Readme

JHipster LLM

A Blueprint for adapting JHipster / Spring Boot applications to LLM (Large Language Model)

Introduction

This is a tool for quickly and easily generating Spring Boot application code using the LLM. For code generation, it utilizes JHipster, which can output various variations of Spring Boot application code. The code generation for LLM is achieved by using the Blueprint feature, which extends JHipster's code generation capabilities.

This tool outputs the following code:

  • Code for a Spring Boot application server, including the development environment such as build tools (a feature of JHipster)
  • Code for an OpenAI API compatible server
  • Code using the LLM library supported by Spring AI. Currently, it supports the following:
  • Download of the selected LLM model
  • Introduction of a Chat UI client

In the near future, we plan to support:

  • Other LLM libraries of Spring AI
  • RAG support using VectorDB
  • Langchain for Java support
  • Other Chat UI support

Prerequisites

  • Java 17 or later
  • Node.js 20 or later
  • Docker is required for running Ollama

Installation

The following command will install the code generator:

npm install -g generator-jhipster-llm

Usage

If you want to create the simplest application, execute the following command. After executing the command, you will be prompted with a series of questions to configure the code generation for the LLM-enabled Spring Boot application.

mkdir myLlmApp
cd myLlmApp
jhipster-llm generate-sample sample.jdl # This is for maven. For gradle, please use 'sample_gradle.jdl' instead.

(Note: Currently, only the minimal JHipster application configuration written in .blueprint/generate-sample/templates/samples/sample.jdl is supported. We plan to support various other configurations in the future.)

Answer the following questions. By default, local llama.cpp and mistral 7B are selected.

  • Which LLM library do you want to use?
  • Would you like to use a LLM model?

Execute the following to start Spring Boot. The necessary LLM model will be downloaded at startup.

./mvnw

After starting, access the following URL. The chat application will be displayed. http://localhost:8080/chat-ui/index.html

When you open the BetterChatGPT screen, open the API menu,check Use custom API endpoint, and enter http://localhost:8080/api/llm/v1/chat/completions in the API Endpoint.

Try typing something. Congratulations if you get a response! Enjoy building applications with LLM and Java!

Note when choosing Ollama

Ollama runs on Docker. ./mvnw before executing the following command: various services, including Ollama, will be started by Docker.

npm run services:up