-
public interface AILocalModelA language model on the device, for answering when your AI agent can't: the person is offline, or the agent reached its usage limit.
AIOnDeviceModel is Gemini Nano through ML Kit. Implement this interface to use another model.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanisAvailable()Whether the model can answer now. abstract Flow<String>reply(String instructions, List<AIConversationTurn> turns)Streams the answer to the last of turns, the person's question. -
-
Method Detail
-
isAvailable
abstract Boolean isAvailable()
Whether the model can answer now.
-
reply
abstract Flow<String> reply(String instructions, List<AIConversationTurn> turns)
Streams the answer to the last of turns, the person's question.
- Parameters:
instructions- How the model should answer: who it is, what it can't do.turns- The conversation so far, oldest first, ending with the person's question.
-
-
-
-