blob: bf353493f34dfbc78827a4dfd3cc164bfece2abe [file]
import 'package:genkit/genkit.dart';
import 'package:genkit_firebase_ai/genkit_firebase_ai.dart';
/// Normalized result returned by one provider model turn.
class AgentConversationResponse {
const AgentConversationResponse({
required this.messages,
required this.text,
});
/// Updated conversation messages to reuse as model context for the next turn.
final List<Message> messages;
/// Final text shown as the assistant reply for the completed turn.
final String text;
}
/// Lower-level contract used by the coordinator to talk to a model backend.
abstract interface class AgentConversationModel {
/// Generates exactly one model turn without executing requested tools.
Future<AgentConversationResponse> generateTurn({
required List<Message> messages,
required List<Tool<dynamic, dynamic>> tools,
GeminiOptions? config,
});
}