Skip to content

Commit e6d666d

Browse files
committed
config: add languages capability
Signed-off-by: caozhuozi <[email protected]>
1 parent e68cd26 commit e6d666d

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
@@ -144,6 +144,10 @@ The following terms are used in this section:
144144

145145
Whether the model can use external tools or APIs to perform tasks.
146146

147+
- **languages** _array of string_, OPTIONAL
148+
149+
What languages can the model speak. Encoded as [ISO 639][iso-639] two letter codes.
150+
147151
## Example
148152

149153
Here is an example model artifact configuration JSON document:
@@ -184,7 +188,8 @@ Here is an example model artifact configuration JSON document:
184188
],
185189
"knowledgeCutoff": "2024-05-21T00:00:00Z",
186190
"reasoning": true,
187-
"toolUsage": false
191+
"toolUsage": false,
192+
"languages": ["en", "zh"]
188193
}
189194
},
190195
"modelfs": {
@@ -200,3 +205,4 @@ Here is an example model artifact configuration JSON document:
200205
[oci-media-type]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#properties
201206
[rfc3339-s5.6]: https://tools.ietf.org/html/rfc3339#section-5.6
202207
[spdx-license-expression]: https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/
208+
[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
@@ -123,6 +123,10 @@ type ModelCapabilities struct {
123123
// ToolUsage indicates whether the model can use external tools
124124
// such as a calculator, a search engine, etc.
125125
ToolUsage *bool `json:"toolUsage,omitempty"`
126+
127+
// Language indicates the languages that the model can speak.
128+
// Encoded as ISO 639 two letter codes. For example, ["en", "fr", "zh"].
129+
Languages []string `json:"languages,omitempty"`
126130
}
127131

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

0 commit comments

Comments
 (0)