Interface: NarrationContextType
Interface representing the content and operations for narration.
Properties
getContent()
getContent: (
id
) =>string
Retrieves the content associated with the given ID. This could be the already- generated content, or it could be new content streaming in.
Parameters
• id: string
The unique identifier for the content.
Returns
string
The content as a string.
Defined in
isLoading()
isLoading: (
id
) =>boolean
Checks if the content associated with the given ID is currently loading.
Parameters
• id: string
The unique identifier for the content.
Returns
boolean
A boolean indicating whether the content is loading.
Defined in
regenerateContent()
regenerateContent: (
id
) =>Promise
<void
>
Regenerates the content associated with the given ID.
Parameters
• id: string
The unique identifier for the content.
Returns
Promise
<void
>
A promise that resolves when the content has been regenerated.
Defined in
saveExample()?
optional
saveExample: (example
) =>Promise
<boolean
>
Saves an example content.
Parameters
• example: any
The example content to be saved.
Returns
Promise
<boolean
>
A promise that resolves to a boolean indicating whether the save was successful.