Creates an object used to expose a component for use by the LLM.
function exposeComponent<T extends ComponentType<any>>(
component: T,
config: ɵtypes.Prettify<Omit<ExposedComponent<T>, 'component'>>): ExposedComponent<T>;
@param
component
T
@param
config
ɵtypes.Prettify<Omit<ExposedComponent<T>, 'component'>>
@returns
ExposedComponent<T>
Examples
exposeComponent(
CardComponent, // The React component to be exposed.
{ // The exposed component configuration.
name: 'CardComponent',
description: 'Show a card with children components to the user',
children: 'any',
props: {
title: s.string('The title of the card'),
description: s.streaming.string('The description of the card'),
},
},
});