Skip to main content

SourcingChat

Drop-in sourcing chat. Pass chatId for an existing chat, or leave it empty to create one on the first message. Replace slots to render the same session with your own pieces.

ICU nurses in Texas

Ready

Who are you looking for?

Describe the person in your own words.

Enter to search · Shift+Enter for a new line

Search on this page is answered with sample candidates.

Example
import { SourcingChat, SourcingClient, SourcingProvider } from '@search-engine-sdk/react';
import '@search-engine-sdk/react/styles.css';

const client = new SourcingClient({ baseUrl: '/api/v2' });

export function SourcingPanel() {
return (
<SourcingProvider client={client}>
<SourcingChat title="ICU nurses in Texas" theme="light" />
</SourcingProvider>
);
}

Props​

PropType
chatIdstringExisting chat. Omit to create one on the first send.
titlestringTitle stored with the chat when the SDK allocates an id.
theme'light' | 'dark' | 'system'Default system, from prefers-color-scheme.
tokensThemeTokensReplaces built-in colors, radius, and font. Inline values win over light and dark presets.
classNamestringAdded on the root element.
classes{ root?, body?, thread?, side? }Host classes on those elements.
slotsSourcingChatSlotsReplaces a view and keeps the same session.
onChatCreated(chat) => voidFires with { id, title } when the SDK allocates an id locally.
onNewSearch(text) => voidHandles a separate-search suggestion. Required to show that action with a controlled chatId.
onReview(candidateId, 'like' | 'dislike') => voidHost handler for candidate feedback.
onSnapshot(snapshot) => voidEvery controller snapshot.
onError(error: Error) => voidA failed turn. message is the banner text.

slots replaces a view and keeps the same session. The names are Header, Transcript, Message, Progress, QuickReplies, Composer, Filters, Candidates, Empty, and Error.

useSourcingClient() throws when SourcingProvider is missing. Give the panel a bounded height. The transcript and the results list scroll inside it.