Liking cljdoc? Tell your friends :D

llm.sdk.providers.bedrock.image

Bedrock image-generation adapter (Titan Image Generator + Stability SD3 / SDXL). All use bedrock-runtime /model/{id}/invoke with SigV4. Each model has a different body shape:

amazon.titan-image-generator-v1 / -v2:0 {:taskType "TEXT_IMAGE" :textToImageParams {:text "..."} :imageGenerationConfig {:numberOfImages N :width W :height H :cfgScale 8 :seed 0}} response {:images ["b64", ...]}

stability.stable-diffusion-xl-v1 {:text_prompts [{:text "..." :weight 1.0}] :cfg_scale N :seed N :steps 30} response {:artifacts [{:base64 "..."}]}

We dispatch on a substring match against the model id and route to the matching builder/parser pair.

Bedrock image-generation adapter (Titan Image Generator + Stability
SD3 / SDXL). All use bedrock-runtime /model/{id}/invoke with SigV4.
Each model has a different body shape:

  amazon.titan-image-generator-v1 / -v2:0
    {:taskType "TEXT_IMAGE"
     :textToImageParams {:text "..."}
     :imageGenerationConfig {:numberOfImages N :width W :height H :cfgScale 8 :seed 0}}
    response {:images ["b64", ...]}

  stability.stable-diffusion-xl-v1
    {:text_prompts [{:text "..." :weight 1.0}]
     :cfg_scale N :seed N :steps 30}
    response {:artifacts [{:base64 "..."}]}

We dispatch on a substring match against the model id and route to
the matching builder/parser pair.
raw docstring

build-image-request-bedrockclj

(build-image-request-bedrock _profile request)
source

make-transportclj

(make-transport)
source

parse-image-error-bedrockclj

(parse-image-error-bedrock _profile status body)
source

parse-image-response-bedrockclj

(parse-image-response-bedrock _profile raw)
source

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