Java SDK

HELM 内核的 Java 客户端 — 类型化异常和拒绝处理。

Java SDK

Preview — the SDK is functional and published with Maven coordinates, but the surface is still marked preview.

You may not need the SDK. Any HTTP client pointing to localhost:8080 works — see the Quickstart. The SDK adds typed Java bindings.

The Java SDK ships in-repo at sdk/java/.

Install

mvn dependency:get -Dartifact=ai.mindburn.helm:helm:0.1.0

Usage

import labs.mindburn.helm.HelmClient;

var helm = new HelmClient("http://localhost:8080");

try {
    var response = helm.chatCompletions(req);
    System.out.println(response.getChoices().get(0).getMessage().getContent());
} catch (HelmApiException e) {
    System.out.println("Denied: " + e.getReasonCode()); // DENY_TOOL_NOT_FOUND
}

Next steps