OpenUIRenderer
constructor(library: Library = openuiChatLibrary, instructions: String? = null, onError: (error: OpenUIError, messageId: String) -> Unit? = null)
Parameters
library
The library the agent writes with, the chat library by default. Restyle or drop its components with Library.replacingView and Library.removing.
instructions
What the agent's model is told before OpenUI's own instructions, such as which answers to write as UI and when to use the app's components.
onError
Receives each problem with a reply's program, such as one the parser can't read or a tool that failed, with the reply's message id, once the reply is complete. Without it, the problems go to the log.