Wraps a guided execution session, providing choose/2 and complete/1.
A guided session is started via the guide extension on the client and
walks the user through a multi-step tool selection workflow.
Usage
{:ok, session} = DatagroutConduit.GuidedSession.start(client, goal: "send an email")
session = DatagroutConduit.GuidedSession.choose(session, 0)
{:ok, result} = DatagroutConduit.GuidedSession.complete(session)
Summary
Functions
Make a choice by option index and advance the session.
Complete the session and return the final result.
Returns the current options list.
Start a guided session for the given goal.
Returns the current session status.
Types
@type t() :: %DatagroutConduit.GuidedSession{ client: GenServer.server(), session_id: String.t() | nil, state: DatagroutConduit.Types.GuideState.t() }
Functions
@spec choose(t(), non_neg_integer()) :: {:ok, t()} | {:error, term()}
Make a choice by option index and advance the session.
Returns {:ok, updated_session} or {:error, reason}.
Complete the session and return the final result.
Returns {:ok, result} if the session status is "completed",
or {:error, reason} if the workflow is not yet done.
@spec options(t()) :: [DatagroutConduit.Types.GuideOption.t()]
Returns the current options list.
@spec start( GenServer.server(), keyword() ) :: {:ok, t()} | {:error, term()}
Start a guided session for the given goal.
Options
:goal- Natural language description of the goal (required)
Returns the current session status.