Liking cljdoc? Tell your friends :D

llm.sdk.request

Request preprocessing applied by llm.sdk/complete before the provider transport sees the request. Currently: drop+warn for canonical request fields the provider doesn't support.

The supported-params set lives on the profile as :profile/supported-params. When set, any canonical droppable field present in the request but absent from the set is removed before the transport builds the body, and one warning is emitted per call.

When :profile/supported-params is NOT set on a profile, requests pass through unchanged — providers opt in to the drop+warn behaviour by populating the set.

Request preprocessing applied by llm.sdk/complete before the provider
transport sees the request. Currently: drop+warn for canonical
request fields the provider doesn't support.

The supported-params set lives on the profile as
:profile/supported-params. When set, any canonical droppable field
present in the request but absent from the set is removed before
the transport builds the body, and one warning is emitted per call.

When :profile/supported-params is NOT set on a profile, requests
pass through unchanged — providers opt in to the drop+warn
behaviour by populating the set.
raw docstring

*warn-fn*clj

Function invoked with a single warning string for each apply-supported-params call that drops at least one field. Defaults to writing to err on its own line; override (binding-style) to route through your logger of choice.

Function invoked with a single warning string for each
apply-supported-params call that drops at least one field. Defaults
to writing to *err* on its own line; override (binding-style) to
route through your logger of choice.
sourceraw docstring

apply-supported-paramsclj

(apply-supported-params profile request)

If the profile carries :profile/supported-params, drop any canonical droppable field present in the request but not in the set. Emits one warning summarising every dropped field. Returns the (possibly mutated) request.

If the profile carries :profile/supported-params, drop any canonical
droppable field present in the request but not in the set. Emits
one warning summarising every dropped field. Returns the (possibly
mutated) request.
sourceraw docstring

droppable-canonical-fieldsclj

Canonical request fields that may meaningfully be dropped before reaching a provider. :request/model and :request/messages are not in this set — they're required and validated upstream. Free-form fields (:request/metadata, :request/provider-options) are also not here since callers may have provider-specific payloads inside them.

Canonical request fields that may meaningfully be dropped before
reaching a provider. :request/model and :request/messages are not
in this set — they're required and validated upstream. Free-form
fields (:request/metadata, :request/provider-options) are also not
here since callers may have provider-specific payloads inside them.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close