-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[CHORE] Update ef schemas with some optional types for attrs #5918
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
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
83d3f52 to
eda7a7b
Compare
|
Make several embedding-function schema fields nullable Updates 7 JSON schema files under Key Changes• Changed property Affected Areas• This summary was automatically generated by @propel-code-bot |
| "query_config": { | ||
| "type": [ | ||
| "object", | ||
| "null" | ||
| ], | ||
| "description": "Parameter query_config for the jina embedding function" | ||
| } |
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.
[Security] The new query_config field in jina.json has type ["object", "null"] but doesn't specify the structure of the object. JSON Schema requires either:
- An
additionalPropertiesconstraint - A
propertiesdefinition - Both
Without this, any arbitrary object structure would be valid, which likely isn't the intent. Define the expected structure:
"query_config": {
"type": ["object", "null"],
"description": "Parameter query_config for the jina embedding function",
"additionalProperties": false,
"properties": {
// Define expected properties here
}
}Context for Agents
The new `query_config` field in `jina.json` has type `["object", "null"]` but doesn't specify the structure of the object. JSON Schema requires either:
- An `additionalProperties` constraint
- A `properties` definition
- Both
Without this, any arbitrary object structure would be valid, which likely isn't the intent. Define the expected structure:
```json
"query_config": {
"type": ["object", "null"],
"description": "Parameter query_config for the jina embedding function",
"additionalProperties": false,
"properties": {
// Define expected properties here
}
}
```
File: schemas/embedding_functions/jina.json
Line: 64
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
pytestfor python,yarn testfor js,cargo testfor rustMigration plan
Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?
Observability plan
What is the plan to instrument and monitor this change?
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?