Package-level declarations

Types

Link copied to clipboard

The script of a ScriptedChatModel: each call adds the answer to one request, in order.

Link copied to clipboard

The script of a ScriptedDecisionModel: each call adds the decision for one request, in order.

Link copied to clipboard
class RunRecord<State>(val events: List<GraphEvent<State>>)

What happened in one run of a graph, read from the events of its stream. Get one with record.

Link copied to clipboard

A ChatModel for tests: it gives the answers of its script, in the order they were written, and keeps every request it received. A graph with an agent is tested with it without an API key and without a network.

Link copied to clipboard

A DecisionModel for tests: it gives the decisions of its script, in the order they were written, and keeps every request it received. A graph that is routed by a model is tested with it without an API key.

Functions

Link copied to clipboard
suspend fun <State> Flow<GraphEvent<State>>.record(): RunRecord<State>

Runs the graph of this stream to its end and returns what happened, in a form a test can compare: