diff --git a/src/docs/src/AI.md b/src/docs/src/AI.md index 2dc13433d..14de4758c 100644 --- a/src/docs/src/AI.md +++ b/src/docs/src/AI.md @@ -7,8 +7,6 @@ The Puter.js AI feature allows you to integrate artificial intelligence capabili You can use AI models from various providers to perform tasks such as chat, text-to-image, image-to-text, text-to-video, and text-to-speech conversion. And with the [User-Pays Model](/user-pays-model/), you don't have to set up your own API keys and top up credits, because users cover their own AI costs. -Chat supports cancellation through an `AbortSignal`; see [chat()](/AI/chat/#stopping-a-stream). [listModels()](/AI/listModels/) caches successful catalogues for 60 seconds and rejects failed requests. - ## Features
diff --git a/src/docs/src/AI/listModels.md b/src/docs/src/AI/listModels.md index aee2df70a..2077b6961 100644 --- a/src/docs/src/AI/listModels.md +++ b/src/docs/src/AI/listModels.md @@ -20,17 +20,6 @@ A string containing the provider you want to list the models for. ## Return value -Successful results are cached for 60 seconds per SDK instance, provider, API origin -and authentication token. Concurrent identical calls share one request. Each call -receives an independent copy of the result. Provider filtering happens on the server; -older servers are filtered locally. The SDK falls back to the legacy driver only -when the endpoint is unavailable (404 or 501). - -Network and server failures reject the promise; they do not resolve to an empty -catalogue. Network failures use `{ message, code: "network_error" }`, invalid -catalogue responses use `invalid_response`, idle timeouts use `request_timeout`, -and server errors pass through unchanged. - Resolves to an array of model objects. Each object always contains `id` and `provider`, and may include fields such as `name`, `aliases`, `context`, `max_tokens`, and a `cost` object (`currency`, `tokens`, `input` and `output` costs in cents). Additional provider-specific capability fields may also be present. Example model entry: @@ -54,6 +43,13 @@ Example model entry: ] ``` +Network and server failures reject the promise; they do not resolve to an empty +catalogue. Network failures use `{ message, code: "network_error" }`, invalid +catalogue responses use `invalid_response`, idle timeouts use `request_timeout`, +and server errors pass through unchanged. + +
Successful results are cached for 60 seconds per provider.
+ ## Model variants Some models have variants. A variant is the same model with a different price, rate limit, or speed. The variant is a suffix on the model ID, separated by a colon.