Library

A component library: the components the model may use, how to render them, and what the system prompt says about them (port of Library). Start from openuiChatLibrary or openuiLibrary, and restyle or drop components with replacingView and removing.

Properties

Link copied to clipboard

The names of the components, in library order.

Functions

Link copied to clipboard
fun removing(names: Set<String>): Library

A library without the components named names. They are also removed from every slot that takes several types, and groups left empty are dropped. The root component, and a component that is the only type a remaining slot takes, stay.

Link copied to clipboard

A library in which view draws the component named name, which keeps its props, such as to restyle the chat library's buttons. view gets the component's props, and the library's own view of it, ComponentRenderProps.DefaultView, to wrap or restyle. It is the same library when it has no such component, or when the component is data its parent reads.