AIClientToolRunner
Runs the client tool calls addressed to this device, each once.
Give it each AI reply's steps as they update. It runs a call when the call has its own id, awaits this person and this install, the runner has a tool of that name and the call has not run here before, then hands the result to send. A result that could not be sent is sent again on a later update, without running the tool again.
The runner is confined to the main thread: call run from it, and pass a scope that runs on it, such as a viewModelScope or rememberCoroutineScope().
val runner = AIClientToolRunner(userId, AIClientIdentity.installId(context), listOf(LocationTool()), scope)
runner.run(parts) { call, result -> backend.send(result, call, message) }Parameters
The person signed in on this device.
This install, from AIClientIdentity.installId.
The tools this device can run. When two share a name, the first is used.
Where tools run and results are sent.
Properties
Functions
Runs the calls among parts that await this device, and sends their results.