tandem_firebase_ai 0.1.0
tandem_firebase_ai: ^0.1.0 copied to clipboard
Connect Tandem screens to Firebase AI Logic without an agent server.
example/example.md
The Firebase order example
uses an existing Tandem screen. Configure Firebase and App Check, then create
one connection outside build:
final connection = FirebaseConnection(
firebase: FirebaseAI.googleAI(),
model: model,
instructions:
'Help the user prepare their order. '
'Describe the result after each change. '
'Only place an order when the user asks you to.',
);
Pass it to TandemScope.connected. The scope still reads the same surface and
uses the same approval UI:
child: TandemScope.connected(
surface: (context) => context.read<OrderCubit>(),
connection: connection,
approvals: const .fromState(),
The screen's methods are the model's tools. Tandem sends their results back to
the model after execution or a user decision. The app supplies the chat through
the scope's child.