Creates an object used to expose a component for use by the LLM.
API
export declare function exposeComponent<
T extends ComponentType <any>,
>(
component: T,
config: ɵtypes.Prettify <
Omit <
ExposedComponent <T>,
"component"
>
>,
): ExposedComponent <T>;exposeComponent
@paramcomponent:T@typeTComponentType<any>@returnsExamples
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'),
},
},
});