Skip to content

Community Spring Boot and Spring AI building blocks for conversations between humans and artificial intelligence.

License

Notifications You must be signed in to change notification settings

pacphi/spring-ai-converse

Repository files navigation

Spring AI Converse

GA Github Action CI Workflow Status Known Vulnerabilities

Community Spring Boot and Spring AI building blocks for conversations between humans and artificial intelligence.

Background

As a Spring Boot and Spring AI developer, I want to consume libraries that make it convenient to add capabilities to my application(s) as for the following

Use-cases:

Getting started

Start with:

  • A Github account
  • One or more of a(n)
  • An LLM provider
    • e.g., HuggingFace, Gemini, Ollama, or OpenAI

Prerequisites

  • Git CLI (2.43.0 or better)
  • Github CLI (2.65.0 or better)
  • httpie CLI (3.2.2 or better)
  • Java SDK (21 or better)
  • Maven (3.9.9 or better)
  • an LLM provider account (if using public cloud or commercially hosted models)

How to clone

with Git CLI

git clone https://github.com/pacphi/spring-ai-converse

with Github CLI

gh repo clone pacphi/spring-ai-converse

How to build

Open a terminal shell, then execute:

cd spring-ai-converse
mvn clean install

How to consume

If you want to incorporate any of the starters as dependencies in your own projects, you would:

Add dependency

Maven

<dependency>
    <groupId>me.pacphi</groupId>
    <artifactId>spring-boot-elevenlabs-starter</artifactId>
    <version>{release-version}</version>
</dependency>

Gradle

implementation 'me.pacphi:spring-boot-elevenlabs-starter:{release-version}'

Replace occurrences of {release-version} above with a valid artifact release version number

Add configuration

Following Spring Boot conventions, you would add a stanza like this to your:

application.properties

spring.elevenlabs.enabled=true
spring.elevenlabs.api-key=${ELEVENLABS_API_KEY:}
# Consult https://api.elevenlabs.io/v1/voices for a list of all the available voices
spring.elevenlabs.defaults.voiceId=Xb7hH8MSUJpSbSDYk0k2

application.yml

spring:
  elevenlabs:
    enabled: true
    api-key: ${ELEVENLABS_API_KEY:}
    defaults:
      # Consult https://api.elevenlabs.io/v1/voices for a list of all the available voices
      voiceId: Xb7hH8MSUJpSbSDYk0k2

Each dependency you add will require a similar stanza where you will typically: activate the capability, specify an API key (if required), and tune other associated configuration.

Consult the playground module's configuration for alternative dependencies and configuration that are available to add.

Configuration will be found in labeled spring.config.activate.on-profile sections of the pom.xml file.

How to run

There's a sample application in the playground module.

About

Community Spring Boot and Spring AI building blocks for conversations between humans and artificial intelligence.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages