Documentation Index
Fetch the complete documentation index at: https://docs.kontext.so/llms.txt
Use this file to discover all available pages before exploring further.
<AdsProvider> props
Your unique publisher token.
Unique identifier that remains the same for the user’s lifetime (used for retargeting and rewarded ads).
Email of the user.
Unique ID of the conversation.
Placement codes enabled for the conversation. Defaults to
['inlineAd'].Character object used in this conversation.
Regulatory object used in this conversation.
Publisher-provided identifier for the user cohort (for A/B testing).
Callback triggered when an event occurs. See Supported events below.
Callback for SDK-internal diagnostic events. Receives
(name, data?) — useful when investigating preload/session behaviour during integration. Off by default.useAds() hook
Returns addMessage, a forwarder that always routes to the current session. If <AdsProvider> swaps the session (e.g. publisherToken change), the next call hits the new one automatically.
(message: Message, options?: AddMessageOptions) => void — register a new chat message with the SDK. The next preload is scheduled automatically.AddMessageOptions currently exposes one flag:Message shape
Unique ID of the message.
Role of the message (
user or assistant).Message text.
Timestamp when the message was created.
<InlineAd> props
Unique ID of the message this ad belongs to.
Placement code provided during onboarding. Defaults to
'inlineAd'.Theme of the ad, e.g.
light or dark.Render-prop function that lets you wrap the ad iframe in your own markup. The function receives the rendered ad as a React node:
<ErrorBoundary>
<InlineAd> is wrapped in an internal ErrorBoundary so a broken ad never crashes the host app. The component is also exported in case you want to wrap your own logic: