@sendbird/chat-ai-widget
Advanced tools
Changelog
[1.8.3] (Oct 10, 2024)
Changelog
[1.8.2] (Sep 19, 2024)
Changelog
[1.8.1] (Sep 12, 2024)
Changelog
[1.8.0] (Sep 12, 2024)
locale
option to support multiple languages for welcome messages and suggested replies. If not specified, the browser's default language will be used. (support for multilingual settings will be available in the dashboard).interface MealFunctionCallResponse {
meals: { strYoutube: string; strMeal: string; strMealThumb: string }[];
}
function isMealsResponse(response: unknown): response is MealFunctionCallResponse {
return !!response && typeof response === 'object' && 'meals' in response && Array.isArray(response.meals);
}
const App = () => {
return (
<ChatAiWidget
tools={{
functionCall: {
carouselAdapter({ response }) {
if (isMealsResponse(response)) {
return response.meals.map((it) => ({
title: it.strMeal, // Carousel card title
featured_image: it.strMealThumb, // Carousel card image
url: it.strYoutube, // URL to open when the carousel card is clicked
}));
}
return [];
},
},
}}
/>
);
};
Changelog
[1.7.10] (Aug 29, 2024)