Are you an LLM? You can read better optimized documentation at /threads.md for this page in Markdown format
Liminal Threads beta
Thread
Overview
A thread is a container of several properties:
- A option of a system instruction.
- A list of model-agnostic messages. The messages can be of varying role and content part types.
- A set of enabled tool kits with which the model can perform tool-calling.
- A pubsub with which we can subscribe to conversation events such as messaging.
L.thread
L.thread
isolates the target effect with a new thread containing an empty message list and no system instruction nor tools.
ts
L.thread(conversation)
L.branch
L.branch
isolates the target effect with a new thread containing a copy of parent's messages, tools and system instruction.
ts
Effect.gen(function*() {
yield* L.user`...`
yield* L.assistant
yield* conversation.pipe(L.branch)
})