Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion schemas/embedding_functions/cloudflare_workers_ai.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"description": "The environment variable name that contains your API key for the Cloudflare Workers AI API"
},
"gateway_id": {
"type": "string",
"type": [
"string",
"null"
],
"description": "The ID of the Cloudflare AI Gateway to use for a more customized solution"
}
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/embedding_functions/huggingface_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"description": "The URL of the HuggingFace Embedding Server"
},
"api_key_env_var": {
"type": "string",
"type": [
"string",
"null"
],
"description": "The environment variable name that contains your API key for the HuggingFace API"
}
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/embedding_functions/instructor.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"description": "Parameter device for the instructor embedding function"
},
"instruction": {
"type": "string",
"type": [
"string",
"null"
],
"description": "Parameter instruction for the instructor embedding function"
}
},
Expand Down
37 changes: 31 additions & 6 deletions schemas/embedding_functions/jina.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,53 @@
"description": "Parameter api_key_env_var for the jina embedding function"
},
"task": {
"type": "string",
"type": [
"string",
"null"
],
"description": "Parameter task for the jina embedding function"
},
"late_chunking": {
"type": "boolean",
"type": [
"boolean",
"null"
],
"description": "Parameter late_chunking for the jina embedding function"
},
"truncate": {
"type": "boolean",
"type": [
"boolean",
"null"
],
"description": "Parameter truncate for the jina embedding function"
},
"dimensions": {
"type": "integer",
"type": [
"integer",
"null"
],
"description": "Parameter dimensions for the jina embedding function"
},
"embedding_type": {
"type": "string",
"type": [
"string",
"null"
],
"description": "Parameter embedding_type for the jina embedding function"
},
"normalized": {
"type": "boolean",
"type": [
"boolean",
"null"
],
"description": "Parameter normalized for the jina embedding function"
},
"query_config": {
"type": [
"object",
"null"
],
"description": "Parameter query_config for the jina embedding function"
}
Comment on lines +58 to 64
Copy link
Contributor

Choose a reason for hiding this comment

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

Important

[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 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:

"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

},
"required": [
Expand Down
5 changes: 4 additions & 1 deletion schemas/embedding_functions/onnx_mini_lm_l6_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"type": "object",
"properties": {
"preferred_providers": {
"type": "array",
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/embedding_functions/open_clip.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"description": "Parameter checkpoint for the open_clip embedding function"
},
"device": {
"type": "string",
"type": [
"string",
"null"
],
"description": "Parameter device for the open_clip embedding function"
}
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/embedding_functions/voyageai.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"description": "Parameter api_key_env_var for the voyageai embedding function"
},
"input_type": {
"type": "string",
"type": [
"string",
"null"
],
"description": "Parameter input_type for the voyageai embedding function"
},
"truncation": {
Expand Down
Loading