Skip to content
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

Add constrained decoding support #99

Closed
wants to merge 6 commits into from

Conversation

emilypgoogle
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@rlazo rlazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some tests to ensure the data is being decoded correctly?

@emilypgoogle
Copy link
Collaborator Author

None of the types added are decoded, they're only ever sent from the client to the server, which is why they're in client/Types.kt. As far as I can tell, we have no tests for types that are strictly encoded.

@rlazo
Copy link
Collaborator

rlazo commented Mar 28, 2024

None

https://github.com/google/generative-ai-android/blob/40f496e47d96e85474e58b210690ffb61c907116/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt#L76 we have tests that verify that we send well formed requests. You can add a simple one that makes sure the field is correctly encoded in json when included

Base automatically changed from davidmotson.auto_function_split to main April 2, 2024 15:27
@emilypgoogle emilypgoogle deleted the ep/auto-function-constrained-decoding branch April 2, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants