lite library

A lightweight entry point for Genkit.

Use this library for simple scripts or applications that need to perform generation tasks (using generate or generateStream) without setting up the full Genkit framework or reflection server.

This is useful for quick prototyping or simple LLM interactions.

Extension Types

FinishReason
Role

Functions

generate<C>({String? prompt, List<Message>? messages, required Model<C> model, C? config, List<Tool>? tools, String? toolChoice, bool? returnToolRequests, int? maxTurns, SchemanticType? outputSchema, String? outputFormat, bool? outputConstrained, String? outputInstructions, bool? outputNoInstructions, String? outputContentType, Map<String, dynamic>? context, StreamingCallback<GenerateResponseChunk>? onChunk}) Future<GenerateResponseHelper>
generateStream<C>({required Model<C> model, String? prompt, List<Message>? messages, C? config, List<Tool>? tools, String? toolChoice, bool? returnToolRequests, int? maxTurns, SchemanticType? outputSchema, String? outputFormat, bool? outputConstrained, String? outputInstructions, bool? outputNoInstructions, String? outputContentType, Map<String, dynamic>? context}) ActionStream<GenerateResponseChunk, GenerateResponseHelper>