Skip to content

Commit 209ada0

Browse files
authored
Merge pull request #84 from caozhuozi/borrow-gguf-2
config: add languages capability
2 parents d962898 + bcac9fc commit 209ada0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/config.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ The following terms are used in this section:
175175

176176
Whether the model is a reward model.
177177

178+
- **languages** _array of string_, OPTIONAL
179+
180+
What languages can the model speak. Encoded as [ISO 639][iso-639] two letter codes.
181+
178182
## Example
179183

180184
Here is an example model artifact configuration JSON document:
@@ -217,7 +221,8 @@ Here is an example model artifact configuration JSON document:
217221
"reasoning": true,
218222
"toolUsage": false,
219223
"embedding": false,
220-
"reward": false
224+
"reward": false,
225+
"languages": ["en", "zh"]
221226
}
222227
},
223228
"modelfs": {
@@ -233,3 +238,4 @@ Here is an example model artifact configuration JSON document:
233238
[oci-media-type]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#properties
234239
[rfc3339-s5.6]: https://tools.ietf.org/html/rfc3339#section-5.6
235240
[spdx-license-expression]: https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/
241+
[iso-639]: https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes

specs-go/v1/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ type ModelCapabilities struct {
129129

130130
// Reward indicates whether the model is a reward model
131131
Reward *bool `json:"reward,omitempty"`
132+
133+
// Language indicates the languages that the model can speak.
134+
// Encoded as ISO 639 two letter codes. For example, ["en", "fr", "zh"].
135+
Languages []string `json:"languages,omitempty"`
132136
}
133137

134138
// Model defines the basic information of a model.

0 commit comments

Comments
 (0)