GenAI.Provider.OpenAI.Image
(Noizu Labs, GenAI Wrapper v0.3.2)
Copy Markdown
OpenAI image-generation provider (gpt-image-1) — a SYNC media provider (ADR-016 / ede43647).
Declares text -> image (sync) and runs POST /v1/images/generations, returning the
base64 image in the shared {:ok, %{data, mime, meta}} contract. No-key requests fast-fail
with {:error, :missing_api_key} before any network call.
Image-INPUT (image+text -> image edits) is the follow-up increment: that path introduces
the per-provider encoder_protocol ImageContent clause (dmitri N1) reused by vision +
edit; this module is the text->image cut.
Summary
Functions
Callback implementation for GenAI.InferenceProviderBehaviour.chat/7.
Return config_key inference provide application config stored under :genai entry
Obtain map of effective settings: settings, model_settings, provider_settings, config_settings, etc.
Prepare endpoint and method to make inference call to
Prepare request headers
Prepare request body to be passed to inference call.
Build and run inference thread
Callback implementation for GenAI.InferenceProviderBehaviour.standardize_model/1.
Build and run inference thread in streaming mode
Functions
chat(model, messages, tools, hyper_parameters, provider_settings \\ [], context \\ nil, options \\ nil)
Callback implementation for GenAI.InferenceProviderBehaviour.chat/7.
Return config_key inference provide application config stored under :genai entry
Obtain map of effective settings: settings, model_settings, provider_settings, config_settings, etc.
Prepare endpoint and method to make inference call to
Prepare request headers
Prepare request body to be passed to inference call.
Build and run inference thread
Callback implementation for GenAI.InferenceProviderBehaviour.standardize_model/1.
Build and run inference thread in streaming mode