Skip to content
0

katanakit-js / useCreateSession

Function: useCreateSession() ​

ts
function useCreateSession(channel?): Promise<string>;

Defined in: src/core/services/assistant.service.ts:283

Creates a new conversation session.

Parameters ​

ParameterTypeDescription
channel?stringOptional free-form channel tag (e.g. "rest").

Returns ​

Promise<string>

The new session id.

Example ​

ts
const sessionId = await useCreateSession("rest");

Released under the MIT License.