-
Notifications
You must be signed in to change notification settings - Fork 930
feat(ai): Schema title
, maximum
, minimum
, and propertyOrdering
#9047
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 16742c9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Vertex AI Mock Responses Check
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (84,761 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
packages/ai/src/types/schema.ts
Outdated
/** Optional. The items of the property. */ | ||
items?: T; | ||
/** Optional. Map of `Schema` objects. */ | ||
properties?: { | ||
[k: string]: T; | ||
}; | ||
/** | ||
* A hint to the gemini model, suggesting the order in which the keys should appear in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gemini capitalized. Actually is this only for Gemini models?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's only for Gemini models, but just in case i'll reword this to simply 'A hint suggesting the order in which the keys should appear in the generated JSON string.'
Adds new properties to
SchemaShared
;title
,maximum
,minimum
, andpropertyOrdering
. I added these properties to the unit tests.The unit tests in
schema-builder.test.ts
were refactored to perform smaller property comparisons instead of direct large object comparisons. I found that this makes tests easier to read, and less brittle to failures from small unrelated changes to the large test objects.