Skip to content

Commit 42cf59c

Browse files
committed
Rename supportsLanguage() to languageAvailable()
Follows similar renames to the writing assistance and translation APIs. See webmachinelearning/writing-assistance-apis#7.
1 parent 3358d7f commit 42cf59c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Note that regardless of the return value of `available`, `create()` might also f
336336
The capabilities API also contains other information about the model:
337337

338338
* `defaultTemperature`, `maxTemperature`, `defaultTopK`, and `maxTopK` properties giving information about the model's sampling parameters.
339-
* `supportsLanguage(languageTag)`, which returns `"no"`, `"after-download"`, or `"readily"` to indicate whether the model supports conversing in a given human language.
339+
* `languageAvailable(languageTag)`, which returns `"no"`, `"after-download"`, or `"readily"` to indicate whether the model supports conversing in a given human language.
340340

341341
### Download progress
342342

@@ -424,14 +424,13 @@ interface AILanguageModel : EventTarget {
424424
[Exposed=(Window,Worker), SecureContext]
425425
interface AILanguageModelCapabilities {
426426
readonly attribute AICapabilityAvailability available;
427+
AICapabilityAvailability languageAvailable(DOMString languageTag);
427428
428429
// Always null if available === "no"
429430
readonly attribute unsigned long? defaultTopK;
430431
readonly attribute unsigned long? maxTopK;
431432
readonly attribute float? defaultTemperature;
432433
readonly attribute float? maxTemperature;
433-
434-
AICapabilityAvailability supportsLanguage(DOMString languageTag);
435434
};
436435
437436
dictionary AILanguageModelCreateOptions {

0 commit comments

Comments
 (0)