MapGptCompose

Constructors

Link copied to clipboard
constructor()

Default constructor is used in the Compose Preview. You should get the instance through the Dash.mapGptCompose property.

Properties

Link copied to clipboard
Link copied to clipboard
val chatItems: StateFlow<List<ChatItem>>
Link copied to clipboard
val isAvailable: StateFlow<Boolean>
Link copied to clipboard
val sessionError: StateFlow<Throwable?>
Link copied to clipboard
val sessionState: StateFlow<SessionState>

Functions

Link copied to clipboard
fun attachContent(composeView: ComposeView, content: @Composable () -> Unit): MapGptDetachableUI

Apply the Mapbox styles to the provided ComposeView. This is often needed to use the Mapbox Compose components.

Link copied to clipboard
fun ChatBubbleView(modifier: Modifier = Modifier)
Link copied to clipboard
fun KeyboardModeButton(modifier: Modifier, onClick: () -> Unit)

Default UI used for opening the keyboard mode.

Link copied to clipboard
fun KeyboardModeExpanded(modifier: Modifier, onCloseClick: () -> Unit)

Default UI for the MapGPT chat with the keyboard feature.

Link copied to clipboard

Function to handle the user selecting a card from the keyboard mode.

Link copied to clipboard
suspend fun onSendClicked(message: String)

Function to send a message through the keyboard mode.

Link copied to clipboard
fun PreviewTheme(content: @Composable () -> Unit)

Function that can be used to preview components.