shipwithjev

Catalog / Tools & apps

0036GitHub

jev-spring-boot-starter

Jev as a Spring Boot 4 starter, over Spring MVC and RestClient.

Dan Vega’s starter adds the configuration, the client and the typed calls, so a Spring application can ask Jev a question without any glue code.

danvega/jev-spring-boot-starterREADME ↗
# Jev Spring Boot Starter

Ask typed questions with [TypeSafe Jev](https://docs.typesafe.ai/introduction) from a Spring MVC application.
Add one dependency, set an API key, and inject `JevClient`.

**Spring Boot 4.0+ · Java 17+ · Spring MVC · RestClient · Jackson 3**

This is an independent community project. Version `0.1.0-SNAPSHOT` is a local development version and is not published to Maven Central.

## Get started

First, build and install the starter from this repository:

```sh
./mvnw clean install
```

Add it to an existing Spring Boot 4 MVC application:

```xml
<dependency>
    <groupId>dev.danvega</groupId>
    <artifactId>jev-spring-boot-starter</artifactId>
    <version>0.1.0-SNAPSHOT</version>
</dependency>
```

Your application supplies `spring-boot-starter-webmvc`. The Jev starter supplies
`spring-boot-starter-restclient`; it does not start a web server itself.

Set the key:

```sh
export TYPESAFE_API_KEY=your-key
```

Inject the client into a service:

```java
import dev.danvega.jev.JevClient;
import dev.danvega.jev.Question;
import org.springframework.stereotype.Service;
import java.util.Map;

@Service
public class TicketService {
    private final JevClient jev;

    public TicketService(JevClient jev) {
        this.jev = jev;
    }

    public String route(String message) {
        var response = jev.evaluate(message, Map.of(
                "team", Question.choice("Which team should handle this?",
                        "billing", "integrations", "support")));

        return response.choice("team").choice();
    }
}
```

No enable annotation or component scanning configuration is needed. The starter activates
in servlet applications, supplies one `JevClient`, and backs off when you provide your own.
It makes no HTTP calls during startup. A missing 

Also filed under Tools & apps

  1. 0616

    Jevstiller: distill Jev calls into a local model

    A self-hosted proxy that trains a local model on Jev's answers. It served 72% of Banking77 locally at 15 ms, with a 2% audit and a bound on disagreement.

    tomerglick57 · Tools & apps · 15 ms local

  2. 0611

    Scruple: code checks for what linters miss

    Semantic-aware linting with System One models: rules you can state in a sentence, checked against your code by Jev.

    @nalexpeae · Tools & apps

  3. 0606

    Algolia-style Postgres search with a Jev reranker

    Typo tolerance, typeahead, barcodes and facet counts in plain Postgres SQL, plus an optional Jev step that asks one question per top-10 result.

    @alex_forman1 · Tools & apps

  4. 0604

    Virtual Closet: outfits from closet videos

    built a virtual closet & outfit generator from raw closet videos. classification + semantic search thanks to jev 🥰. clueless closet dreams finally coming to life

    @maitreemervana · Tools & apps