Interface Model
- All Known Subinterfaces:
StreamingModel
- All Known Implementing Classes:
OpenAIModel
public interface Model
This interface is used for when a backend dose not supports streaming responses, otherwise use
StreamingModel-
Method Summary
Modifier and TypeMethodDescriptionqurryModel(ChatObject obj, List<Tool> tools) Sends the given chat context to the model and requests the next response.singleFire(Message msg) Sends a single, standalone message to the model, without any prior conversation context.singleFire(Message msg, List<Tool> tools) Sends a single, standalone message to the model with tool support, without any prior conversation context.
-
Method Details
-
qurryModel
Sends the given chat context to the model and requests the next response.- Parameters:
obj- the chat context, containing the conversation history to send to the modeltools- the tools available to the model for this request, or an empty list if none- Returns:
- a future resolving to the model's reply as a
Message
-
singleFire
Sends a single, standalone message to the model, without any prior conversation context.- Parameters:
msg- the message to send- Returns:
- a future resolving to the model's reply as a
Message
-
singleFire
Sends a single, standalone message to the model with tool support, without any prior conversation context.- Parameters:
msg- the message to sendtools- the tools available to the model for this request- Returns:
- a future resolving to the model's reply as a
Message
-
getToolSerializer
ToolSerializer getToolSerializer()- Returns:
- this backend's
ToolSerializer, used to convertTools into the JSON shape this backend expects. Each backend instance owns its own — this is not shared across the JVM.
-