Skip to content

Implementing SpringAI using the OpenAI chat model, also testing out Kotlin for fun :)

License

Notifications You must be signed in to change notification settings

seanmayer/demeter-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demeter Service

Demeter Service is a Spring Boot application written in Kotlin and Java, built with Maven.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Java 17
  • Maven
  • IntelliJ IDEA 2024.1 or any preferred IDE

Installing

  1. Clone the repository
git clone https://github.com/seanmayer/demeter-service.git
  1. Navigate into the cloned repository
cd demeter-service
  1. Install the dependencies
mvn install
  1. Run the application
mvn spring-boot:run

Running the tests

To run the tests, use the following command:

mvn test

Built With

application.properties

OpenAI API key is required to run the application.

spring.ai.openai.api-key=${SPRING_AI_OPENAI_API_KEY}

Example Requests

Create a new message

curl --location 'http://localhost:8080/api/openai?prompt=Tell%20me%20a%20joke' \
--header 'Content-Type: application/json'

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

Implementing SpringAI using the OpenAI chat model, also testing out Kotlin for fun :)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages