createInteraction method

Future<GeminiInteraction> createInteraction(
  1. CreateInteractionRequest request
)

Creates an interaction (Interactions API, steps schema).

Sent with the Api-Revision header that selects the steps schema (JS INTERACTIONS_API_REVISION).

Implementation

Future<GeminiInteraction> createInteraction(
  CreateInteractionRequest request,
) async {
  final res = await _call('POST', interactionsPath, request.json, const {
    'Api-Revision': interactionsApiRevision,
  });
  return GeminiInteraction.fromJson(res);
}