-module(starflow@state). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([new/1]). -export_type([state/1, stop_reason/0, usage/0, response/0, message/0, content/0, image_source/0]). -type state(IVV) :: {state, list(message()), usage(), IVV}. -type stop_reason() :: end_turn | max_tokens | stop_sequence | tool_use. -type usage() :: {usage, integer(), gleam@option:option(integer()), gleam@option:option(integer()), integer()}. -type response() :: {response, binary(), list(content()), binary(), gleam@option:option(stop_reason()), usage()}. -type message() :: {message, binary(), list(content())}. -type content() :: {text_content, binary()} | {image_content, image_source()} | {tool_content, binary(), binary(), gleam@dynamic:dynamic_()}. -type image_source() :: {base64_image, binary(), binary()}. -file("/home/ethanthoma/projects/flow/src/starflow/state.gleam", 46). -spec new(IVW) -> state(IVW). new(Any) -> Usage = {usage, 0, none, none, 0}, {state, [], Usage, Any}.