google-gemini / generative-ai-dart

The official Dart library for the Google Gemini API
https://ai.google.dev/gemini-api/docs/get-started/tutorial?lang=dart
Apache License 2.0
571 stars 115 forks source link

Add support for code execution #202

Closed natebosch closed 3 months ago

natebosch commented 3 months ago

Add CodeExecutionResult and ExecutableCode which are new Part subtypes that the model may reply with when code execution is enabled. Add CodeExecution configuration class as a marker to enable code execution. In the future additional configuration parameters may be added

Add the standardized samples for code execution through the model and a chat.

Add tests for forwarding configuration and parsing.

Bump version and prepare to publish.