recrwplay / spring-ai-starter-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Neo4j Spring AI Starter Kit

This kit provides a Spring backend service connected to OpenAI and Neo4j for powering GenAI projects. The Neo4j interface leverages Vector Indexes alongside a retrieval Cypher query to provide more accurate results.

Requirements

Configuration

  1. Update the application.properties file with your Neo4j and OpenAI credentials

The application.properties file contains read-only access credentials to a publicly hosted Neo4j instance with public EDGAR SEC data.

If you would like to load your own instance with a subset of this information. Copy, paste, and run the edgar_import.cypher in a Neo4j browser connected to your instance.

Database Setup

If you would like to load your own instance with a subset of this information. Add your own OpenAI key to the Cypher code in the edgar_import.cypher file and run it in your instance's Neo4j browser.

For more information on how this load script works, see this notebook.

Usage

./mvnw spring-boot:run

A Rest API should now be running on your local port 8080/api/chat.

Testing

After the server is running, a curl command can be triggered to test the endpoint:

curl "http://localhost:8080/api/chat?question=How%20many%20forms%20are%20there%3F"

Feedback

Please provide feedback and report bugs as GitHub issues

Contributing

Want to improve this kit? See the contributing guide

Learn More

At Neo4j GraphAcademy, we offer a wide range of courses completely free of charge, including several related to LLMs with Neo4j.

About

License:Apache License 2.0


Languages

Language:Cypher 54.2%Language:Java 45.8%