genkit 0.9.0  genkit: ^0.9.0 copied to clipboard
genkit: ^0.9.0 copied to clipboard
A type-safe Dart client library for calling Google Genkit flows with streaming support, authentication, and comprehensive error handling.
0.9.0 #
- Made fromResponseandfromStreamChunkoptional indefineRemoteAction. If not provided, the response and stream chunks will bedynamicobjects decoded from JSON, instead of requiring a typed conversion function.
0.8.0 #
- 
BREAKING CHANGE: The .stream()method now returns anActionStreaminstead of aFlowStreamResponserecord.ActionStreamis aStreamthat provides two ways to access the flow's final, non-streamed response:- onResult: A- Futurethat completes with the result. This is the recommended approach. It will complete with a- GenkitExceptionif the stream terminates with an error or is cancelled.
- result: A synchronous getter that should only be used after the stream is fully consumed. It will throw a- GenkitExceptionif the stream is not consumed, terminates with an error or is cancelled.
 Migration: Code that previously looked like this: final (:stream, :response) = myAction.stream(input: ...); await for (final chunk in stream) { // ... } final finalResult = await response;Should be updated to use onResult:final stream = myAction.stream(input: ...); await for (final chunk in stream) { // ... } final finalResult = await stream.onResult; // or final finalResult = stream.result;
0.7.0 #
- BREAKING CHANGE: The package has been renamed from package:genkit/genkit.darttopackage:genkit/client.dart. You will need to update your import statements.
- BREAKING CHANGE: The responsefuture returned by the.stream()method is now nullable (Future<O?>). This change supports improved error handling and cancellation.
- Improved Error Handling: Errors occurring on the server during a stream are now thrown by the streamitself. This allows you to catch exceptions directly within atry/catchblock surrounding anawait forloop.
0.6.0 #
- Added standard Genkit data classes for working with generative models, including GenerateResponse,Message, andParttypes.
- Added helper getters like .textand.mediafor easier data extraction.
0.5.1 #
- README cleanup
0.5.0 #
- Enhanced type-safe client: Added comprehensive generics support for type-safe operations
- Streaming support: Implemented real-time data streaming with Server-Sent Events (SSE)
- Improved error handling: Introduced GenkitExceptionwith detailed error information and HTTP status codes
- Authentication support: Added support for custom headers including Firebase Auth integration
- Better integration: Enhanced compatibility with json_serializablefor object serialization
- Comprehensive documentation: Added detailed API documentation and usage examples
- Platform support: Full cross-platform support for iOS, Android, Web, Windows, macOS, and Linux
- Testing improvements: Added comprehensive unit and integration tests
0.0.1 #
- Initial version.