Package org.springframework.ai.systemone
Class SystemOneDecisionModel
java.lang.Object
org.springframework.ai.systemone.SystemOneDecisionModel
- All Implemented Interfaces:
DecisionModel,Model<DecisionPrompt,DecisionResponse>
A
DecisionModel backed by any server of the /v1/systemone protocol,
such as the hosted System One service, Laya or Ollama, through the
SystemOneClient. A YesNoQuestion is asked as a noul, a
ChoiceQuestion as a choice and a ScoreQuestion as a
score, and the answers come back with the probabilities and confidence the
server reports.
The connection belongs to the SystemOneClient. The model takes the model name,
defaulting to the client's default model, and the provider name recorded in
observations, which is systemone unless the client points at a particular
server.
- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe provider name recorded in observations unless another one is configured. -
Method Summary
Modifier and TypeMethodDescriptionbuilder(SystemOneClient systemOneClient) call(DecisionPrompt prompt) Executes a method call to the AI model.The default options, with the model name applied.The provider name recorded in observations.mutate()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.decision.DecisionModel
call, call
-
Field Details
-
DEFAULT_PROVIDER
The provider name recorded in observations unless another one is configured.
-
-
Method Details
-
builder
-
call
Description copied from interface:ModelExecutes a method call to the AI model.- Specified by:
callin interfaceDecisionModel- Specified by:
callin interfaceModel<DecisionPrompt,DecisionResponse> - Parameters:
prompt- the request object to be sent to the AI model- Returns:
- the response from the AI model
-
getOptions
The default options, with the model name applied. -
getProvider
The provider name recorded in observations. -
mutate
-