Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seanmayer/demeter-service
Implementing SpringAI using the OpenAI chat model, also testing out Kotlin for fun :)
https://github.com/seanmayer/demeter-service
kotlin openai spring spring-boot
Last synced: 2 days ago
JSON representation
Implementing SpringAI using the OpenAI chat model, also testing out Kotlin for fun :)
- Host: GitHub
- URL: https://github.com/seanmayer/demeter-service
- Owner: seanmayer
- License: apache-2.0
- Created: 2024-04-06T13:53:39.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-09-07T18:24:58.000Z (2 months ago)
- Last Synced: 2024-09-07T19:39:23.645Z (2 months ago)
- Topics: kotlin, openai, spring, spring-boot
- Language: Kotlin
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
git clone https://github.com/seanmayer/demeter-service.git
```
2. Navigate into the cloned repository
```bash
cd demeter-service
```
3. Install the dependencies
```bash
mvn install
```
4. Run the application
```bash
mvn spring-boot:run
```## Running the tests
To run the tests, use the following command:
```bash
mvn test
```## Built With
- [Kotlin](https://kotlinlang.org/)
- [Java](https://www.java.com/)
- [Spring Boot](https://spring.io/projects/spring-boot)
- [Maven](https://maven.apache.org/)## 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
```bash
curl --location 'http://localhost:8080/api/openai?prompt=Tell%20me%20a%20joke' \
--header 'Content-Type: application/json'
```
## LicenseThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.