Skip to content
Merged
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
8 changes: 7 additions & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ The following terms are used in this section:

Whether the model is a reward model.

- **languages** _array of string_, OPTIONAL

What languages can the model speak. Encoded as [ISO 639][iso-639] two letter codes.

## Example

Here is an example model artifact configuration JSON document:
Expand Down Expand Up @@ -217,7 +221,8 @@ Here is an example model artifact configuration JSON document:
"reasoning": true,
"toolUsage": false,
"embedding": false,
"reward": false
"reward": false,
"languages": ["en", "zh"]
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The languages field is introduced in the documentation with an example, but the corresponding changes in the Go structs (specs-go/v1/config.go) and JSON schema (schema/config-schema.json) are missing. This discrepancy will lead to inconsistencies and validation failures. The languages field should be added to the ModelCapabilities struct in specs-go/v1/config.go. The JSON schema (schema/config-schema.json) needs to be updated to include the capabilities object in ModelConfig and the languages property within it. New test cases should be added to schema/config_test.go to validate the languages field, including valid and invalid examples.

}
},
"modelfs": {
Expand All @@ -233,3 +238,4 @@ Here is an example model artifact configuration JSON document:
[oci-media-type]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#properties
[rfc3339-s5.6]: https://tools.ietf.org/html/rfc3339#section-5.6
[spdx-license-expression]: https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/
[iso-639]: https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Consider updating the link to point to the ISO 639-1 or IETF BCP 47 language tags to align with the language code format being used.

4 changes: 4 additions & 0 deletions specs-go/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ type ModelCapabilities struct {

// Reward indicates whether the model is a reward model
Reward *bool `json:"reward,omitempty"`

// Language indicates the languages that the model can speak.
// Encoded as ISO 639 two letter codes. For example, ["en", "fr", "zh"].
Languages []string `json:"languages,omitempty"`
}

// Model defines the basic information of a model.
Expand Down
Loading