conversationForTest function
Conversation
conversationForTest(
- ConversationHandle handle, {
- ConversationConfig? config,
- bool engineClosed()?,
- Set<
void Function()> ? engineCloseListeners,
A conversation over handle, for tests that drive it with a fake; a test
calls engineCloseListeners as an engine's close would.
Implementation
Conversation conversationForTest(
ConversationHandle handle, {
ConversationConfig? config,
bool Function()? engineClosed,
Set<void Function()>? engineCloseListeners,
}) => Conversation._(
handle,
config: config ?? ConversationConfig(),
thinkingTokenBudgetCapsNothing: () {},
engineClosed: engineClosed ?? () => false,
engineCloseListeners: engineCloseListeners ?? {},
);