mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-20 05:22:47 -04:00
[gallery] add JSON schema for gallery model specification (#7890)
Add JSON Schema for gallery model specification Signed-off-by: devmanishofficial <devmanishofficial@gmail.com>
This commit is contained in:
1 parent
e6ba26c3e7
commit
1642b39cb8
2 files changed
+93
No files matched your search
@@ -78,6 +78,20 @@ LOCALAI_IMAGE_TAG=test LOCALAI_IMAGE=local-ai-aio make run-e2e-aio
|
||||
|
||||
We are welcome the contribution of the documents, please open new PR or create a new issue. The documentation is available under `docs/` https://github.com/mudler/LocalAI/tree/master/docs
|
||||
|
||||
### Gallery YAML Schema
|
||||
|
||||
LocalAI provides a JSON Schema for gallery model YAML files at:
|
||||
|
||||
`core/schema/gallery-model.schema.json`
|
||||
|
||||
This schema mirrors the internal gallery model configuration and can be used by editors (such as VS Code) to enable autocomplete, validation, and inline documentation when creating or modifying gallery files.
|
||||
|
||||
To use it with the YAML language server, add the following comment at the top of a gallery YAML file:
|
||||
|
||||
```yaml
|
||||
# yaml-language-server: $schema=../core/schema/gallery-model.schema.json
|
||||
```
|
||||
|
||||
## Community and Communication
|
||||
|
||||
- You can reach out via the Github issue tracker.
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://raw.githubusercontent.com/mudler/LocalAI/main/schemas/gallery.model.schema.json",
|
||||
"title": "LocalAI Gallery Model Spec",
|
||||
"description": "Schema for LocalAI gallery model YAML files",
|
||||
"type": "object",
|
||||
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Model name"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "Human-readable description of the model"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string",
|
||||
"description": "Optional icon reference or URL"
|
||||
},
|
||||
"license": {
|
||||
"type": "string",
|
||||
"description": "Model license identifier or text"
|
||||
},
|
||||
"urls": {
|
||||
"type": "array",
|
||||
"description": "URLs pointing to remote model configuration",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
},
|
||||
"config_file": {
|
||||
"type": "string",
|
||||
"description": "Inline YAML configuration that will be written to the model config file"
|
||||
},
|
||||
"files": {
|
||||
"type": "array",
|
||||
"description": "Files to download and install for this model",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["filename", "uri"],
|
||||
"properties": {
|
||||
"filename": {
|
||||
"type": "string"
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string",
|
||||
"description": "Optional SHA256 checksum for file verification"
|
||||
},
|
||||
"uri": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"prompt_templates": {
|
||||
"type": "array",
|
||||
"description": "Prompt templates written as .tmpl files",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["name", "content"],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in new issue
Block a user