firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

[Firebase AI] Add `Generable` macro for schema generation

Open andrewheard opened this issue 2 weeks ago • 1 comments

WIP - Currently only includes scaffolding types, not the macro itself.

Initial Implementation TODOs:

  • [x] Add scaffolding for Generable protocols and types that align with Foundation Models.
  • [x] Add manually written output that the macro should produce and verify that it compiles.
  • [ ] Serialize GenerationSchema in JSON Schema format.
  • [ ] Implement a basic Generable macro that produces the equivalent of the manually written code.
  • [x] Implement value(...) methods in GeneratedContent to expose generated values.
  • [ ] Implement storage and serializing of GenerationGuide values in GenerationSchema.
  • [ ] Add a Guide "macro" and use it in the Generable macro to handle GenerationGuide annotations.
  • [ ] Add an equivalent of LanguageModelSession.Response with Gemini-specific additions (e.g., thoughtSummary).

#no-changelog

andrewheard avatar Nov 24 '25 02:11 andrewheard