Skip to main content
Version: 0.10.0

Function: createLLMChatSession()

createLLMChatSession(config, options?, runtime?): Promise<LLMChatSession>

Defined in: extensions/llm/tasks/llmChatSession.ts:175

Instantiates an LLM chat session using background thread execution.

Parameters

config

LLMModel

Model configuration containing model, tokenizer, and tokenizer config paths.

options?

LLMChatSessionOptions = {}

Custom generation, tool calling, and state options.

runtime?

any

The worklet runtime thread to run native generation on.

Returns

Promise<LLMChatSession>

A promise resolving to the instantiated LLMChatSession session.