Package org.springframework.ai.decision
Interface DecisionModel
- All Superinterfaces:
Model<DecisionPrompt,DecisionResponse>
- All Known Implementing Classes:
OllamaDecisionModel,OpenAiDecisionModel,SystemOneDecisionModel
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A model that answers typed questions about an input instead of generating text. Each
answer carries the probabilities the model assigned, so that the application decides
what to do with them.
- Since:
- 2.1.0
- Author:
- Thomas Vitale
-
Method Summary
Modifier and TypeMethodDescriptiondefault DecisionResponsecall(String text, Map<String, ? extends DecisionQuestion> questions) Ask the given questions about a text, with the model's default options.call(DecisionPrompt prompt) Executes a method call to the AI model.default DecisionResponsecall(DecisionInput input, Map<String, ? extends DecisionQuestion> questions) Ask the given questions about an input, with the model's default options.
-
Method Details
-
call
Description copied from interface:ModelExecutes a method call to the AI model.- 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
-
call
Ask the given questions about a text, with the model's default options. -
call
default DecisionResponse call(DecisionInput input, Map<String, ? extends DecisionQuestion> questions) Ask the given questions about an input, with the model's default options.
-