Interface: LeuriaOptions
Defined in: packages/client/src/leuria.ts:37
Properties
autoDetect?
optionalautoDetect?:boolean
Defined in: packages/client/src/leuria.ts:45
Detect providers at creation, again when the page regains focus (the
visitor may have started the engine meanwhile), and every watchMs
while the page is visible. Default true.
closeOnUnload?
optionalcloseOnUnload?:boolean
Defined in: packages/client/src/leuria.ts:59
End provider sessions when the page goes away. Default true.
fallback?
optionalfallback?:"ask"|"auto"
Defined in: packages/client/src/leuria.ts:67
When the visitor's own AI (bridge()) isn't ready: ask (default)
proposes it first, and the providers after it answer only once the
visitor picks one (ai.chooseInstead(id), for this page only); auto
uses them at once. A site that doesn't want to propose Leuria doesn't
declare bridge().
middleware?
optionalmiddleware?:ToolMiddleware[]
Defined in: packages/client/src/leuria.ts:57
Wrap every tool call of every conversation: observe, redact, block. Runs before each conversation's own middleware.
providers
providers:
Provider[]
Defined in: packages/client/src/leuria.ts:39
Providers in order of preference.
watchMs?
optionalwatchMs?:number
Defined in: packages/client/src/leuria.ts:52
While the page is visible, look again this often (ms) so it follows what the visitor does in Leuria: disconnecting the site, changing its AI or model. Cheap: one local request per provider. 0 turns it off. Default 5000.