Class TypeSafeDecisionModel

java.lang.Object
dev.langchain4j.model.typesafe.TypeSafeDecisionModel
All Implemented Interfaces:
DecisionModel

@Experimental public class TypeSafeDecisionModel extends Object implements DecisionModel
A DecisionModel backed by the TypeSafe System One API (POST /v1/systemone), which serves decision models such as Jev.

Other servers that implement the same API (for example OpenRouter, or self-hosted open models) can be used by setting TypeSafeDecisionModel.TypeSafeDecisionModelBuilder.baseUrl(String) and, if they serve it at another path, TypeSafeDecisionModel.TypeSafeDecisionModelBuilder.apiPath(String).

DecisionModel model = TypeSafeDecisionModel.builder()
        .apiKey(System.getenv("TYPESAFE_API_KEY"))
        .modelName("jev-latest")
        .build();
The input can be text, named fields (sent as a JSON object), a list of text contents, or a conversation (sent as a JSON transcript, {"messages": [...]}); images are not supported and throw an UnsupportedFeatureException.
Since:
1.21.0