turn.svelte.ts

Declarations
#

5 declarations

view source

create_turn_from_part
#

turn.svelte.ts view source

(part: PartUnion, role: string, json: Partial<OmitStrict<{ id: string & $brand<"Uuid">; created: string & $brand<"Datetime">; updated: string & $brand<"Datetime">; ... 5 more ...; error_message?: string | undefined; }, "role" | "part_ids">>): Turn

part

role

type string

json

type Partial<OmitStrict<{ id: string & $brand<"Uuid">; created: string & $brand<"Datetime">; updated: string & $brand<"Datetime">; part_ids: (string & $brand<"Uuid">)[]; ... 4 more ...; error_message?: string | undefined; }, "role" | "part_ids">>

returns

Turn

create_turn_from_parts
#

turn.svelte.ts view source

(parts: PartUnion[], role: string, json: Partial<OmitStrict<{ id: string & $brand<"Uuid">; created: string & $brand<"Datetime">; updated: string & $brand<"Datetime">; ... 5 more ...; error_message?: string | undefined; }, "role" | "part_ids">>): Turn

parts

type PartUnion[]

role

type string

json

type Partial<OmitStrict<{ id: string & $brand<"Uuid">; created: string & $brand<"Datetime">; updated: string & $brand<"Datetime">; part_ids: (string & $brand<"Uuid">)[]; ... 4 more ...; error_message?: string | undefined; }, "role" | "part_ids">>

returns

Turn

create_turn_from_text
#

turn.svelte.ts view source

(content: string, role: string, json: Partial<OmitStrict<{ id: string & $brand<"Uuid">; created: string & $brand<"Datetime">; updated: string & $brand<"Datetime">; part_ids: (string & $brand<...>)[]; ... 4 more ...; error_message?: string | undefined; }, "role" | "part_ids">>, app: Frontend): Turn

content

type string

role

type string

json

type Partial<OmitStrict<{ id: string & $brand<"Uuid">; created: string & $brand<"Datetime">; updated: string & $brand<"Datetime">; part_ids: (string & $brand<"Uuid">)[]; ... 4 more ...; error_message?: string | undefined; }, "role" | "part_ids">>

app

returns

Turn

Turn
#

turn.svelte.ts view source

Turn represents a conversation turn (like A2A Message). Contextualizes parts within a conversation, providing role, metadata, and ordering.

inheritance

extends:
  • Cell<typeof TurnJson>

part_ids

type Array<Uuid>

thread_id

type Uuid | null | undefined

role

type CompletionRole

request

type CompletionRequest | undefined

response

type CompletionResponse | undefined

error_message

type string | undefined

parts

type Array<PartUnion>

readonly

length

type number

readonly

token_count

type number

readonly

raw_content

type string | null | undefined

readonly

is_content_loaded

type boolean

readonly

is_content_empty

type boolean

readonly

pending

type boolean

readonly

constructor

type new (options: TurnOptions): Turn

options

set_part

type (part: PartUnion): void

part
returns void

add_part

type (part: PartUnion): void

part
returns void

remove_part

type (part_id: string & $brand<"Uuid">): boolean

part_id
type string & $brand<"Uuid">
returns boolean

TurnOptions
#

Depends on
#

Imported by
#