-
Notifications
You must be signed in to change notification settings - Fork 666
Add Firebase AI KSP Processor #7523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
davidmotson
wants to merge
62
commits into
main
Choose a base branch
from
davidmotson.firebase-ai-ksp-processor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 33 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
2b57549
add KSP processor for Firebase AI
8643046
add the code
811122b
Update firebase-ai-ksp-processor/src/main/kotlin/com/google/firebase/…
davidmotson 0d5d3f7
Update firebase-ai-ksp-processor/src/main/kotlin/com/google/firebase/…
davidmotson e7a1ab8
Update firebase-ai-ksp-processor/README.md
davidmotson 54e9466
Update firebase-ai-ksp-processor/src/main/kotlin/com/google/firebase/…
davidmotson 368c2ec
add generated annotation to generated class
bf2aa4d
improve file formatting and indentation
94a2e45
move annotations to firebase-ai, and rename the artifact
d7ff3d4
fix imports in schema processor and update firebase-ai/api.txt
da74532
format
534022a
Merge branch 'main' into davidmotson.firebase-ai-ksp-processor
davidmotson d32ec1f
format
8624f43
update readme for new artifact name
334f3a3
Add support for enum schema
8ffa303
added JsonSchema type and altered schema generator to output it
74eece1
introduced new auto function declaration type and auto function calling
23969d5
Merge branch 'main' into davidmotson.firebase-ai-ksp-processor
davidmotson 5de85e9
update api.txt and schema generation type safety
b9a59d3
format
fb93399
format, add documentation, and generate api.txt file
a6493b1
add AutoFunctionDeclaration documentation
67d3c26
fix tests
45a26e8
Merge branch 'main' into davidmotson.firebase-ai-ksp-processor
davidmotson fe5255a
bump version and add changelog
db689c4
fix major version bumps and formatting
fe0b47b
fix ksp-processor readme
eaf7671
update api.txt
2e2a6b1
add description to generable, and restrict guide to fields only
08a6918
minor ksp processor formatting
ad10143
add response json schema param to generationConfig
6892a1e
update api.txt
e94e207
add GenerateObjectResponse and generateObject api
e2564e1
Fixes for comments
b918b98
update lang level to 9 for the @Generated annotation
e8fcda9
Merge branch 'main' into davidmotson.firebase-ai-ksp-processor
59812c5
fix tests
d1a959e
format and java version fix
17e1b22
Add Function generation capability to ksp processor (#7591)
davidmotson d23e4ed
Split schema/function generation into several files, and fix bug in a…
426f0f9
add tests, fix text and thought history, and swap the default output …
5708df3
fix tests for JsonObject -> FunctionResponsePart change
ef96551
add normalization and method to improve user experience
35da073
Add to
0d39cd2
swap the ksp processor to use firebase-java library
5f76005
add generateObject test
130144a
add support for multi-modal function responses
5626e80
add KSP tests for symbol processor
6f0cf18
pin compilation to 2.0.21 using a newer compiler
275d686
Merge branch 'main' into davidmotson.firebase-ai-ksp-processor
dae27da
format
ec61d37
remove ksp processor compile test, fix firebase-ai-tests and add prop…
b4201f4
Merge branch 'main' into davidmotson.firebase-ai-ksp-processor
davidmotson e93b821
update api.txt file
02e7ea1
format ksp processor
7a4ef9e
Add ksp processor test app
e3a6b60
fix copyright failure
b9816a0
format test app
25e343e
fix testapp build and test
a755974
hide Tool annotation
bd5ad75
format tests
d85bf93
re-add missing constructors for imagepart and inlinedatapart
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| To build run `./gradlew :publishToMavenLocal` | ||
|
|
||
| To integrate: add the following to your app's gradle file: | ||
|
|
||
| ```kotlin | ||
| plugins { | ||
| id("com.google.devtools.ksp") | ||
| } | ||
| dependencies { | ||
| implementation("com.google.firebase:firebase-ai:<latest_version>") | ||
| ksp("com.google.firebase:firebase-ai-processor:1.0.0") | ||
| } | ||
| ``` | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
davidmotson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * Copyright 2025 Google LLC | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| plugins { | ||
| kotlin("jvm") | ||
| id("java-library") | ||
| id("maven-publish") | ||
| } | ||
|
|
||
| dependencies { | ||
| testImplementation(kotlin("test")) | ||
| implementation(libs.symbol.processing.api) | ||
| implementation(libs.kotlinpoet.ksp) | ||
| } | ||
|
|
||
| tasks.test { useJUnitPlatform() } | ||
|
|
||
| kotlin { jvmToolchain(21) } | ||
davidmotson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| publishing { | ||
| publications { | ||
| create<MavenPublication>("mavenKotlin") { | ||
| from(components["kotlin"]) | ||
| groupId = "com.google.firebase" | ||
| artifactId = "firebase-ai-processor" | ||
| version = "1.0.0" | ||
| } | ||
| } | ||
| repositories { | ||
| maven { url = uri("m2/") } | ||
| mavenLocal() | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| kotlin.code.style=official |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.