AiAnswer

fun AiAnswer(modifier: Modifier = Modifier, style: AiAnswerStyle = LocalAiAnswerStyle.current, state: AiAnswerState = AiAnswerState.Default, title: @Composable () -> Unit? = null, content: @Composable () -> Unit? = null, actionsStart: ButtonGroupScope.() -> Unit? = null, actionsEnd: ButtonGroupScope.() -> Unit? = null, suggestions: @Composable FlowRowScope.() -> Unit? = null, loading: @Composable AiAnswerLoadingScope.() -> Unit? = null, error: @Composable AiAnswerErrorScope.() -> Unit? = null, motion: Motion<AiAnswerMotionStyle> = rememberAiAnswerMotion(state = state))

Компонент для отображения LLM-ответа, загрузки или ошибки.

AiAnswer не парсит markdown, citations, streaming chunks и не владеет data model ответа. Потребитель передаёт нужный renderer через content, действия через actionsStart/actionsEnd, а suggestions через suggestions.

Parameters

modifier

модификатор.

state

семантическое состояние компонента.

title

optional title-slot для AiAnswerState.Default.

content

optional content-slot для AiAnswerState.Default.

actionsStart

стартовые действия внутри отдельного com.sdds.compose.uikit.ButtonGroup.

actionsEnd

конечные действия внутри отдельного com.sdds.compose.uikit.ButtonGroup.

suggestions

suggestions внутри com.sdds.compose.uikit.ChipGroup.

loading

custom loading-slot; при отсутствии используется AiAnswerLoading.

error

custom error-slot; при отсутствии используется AiAnswerError.

style

стиль компонента.

motion

motion компонента.