JLlmClient
org.llm4s.javaapi.JLlmClient
final class JLlmClient extends AutoCloseable
Java-friendly wrapper around LLMClient.
The underlying Scala client returns Result[Completion]; this wrapper unwraps the content string and surfaces it as LlmResult so Java callers never import any Scala types.
Obtain instances via Llm4s.createDefaultClient or Llm4s.createClient.
LlmResult<String> r = client.complete("What is 2+2?");
r.ifSuccess(System.out::println).ifFailure(e -> System.err.println(e.getMessage()));
Attributes
- Graph
-
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
Members list
In this article