langchain_community.utilities.dalle_image_generator.DallEAPIWrapper¶
class langchain_community.utilities.dalle_image_generator.DallEAPIWrapper[source]¶
Bases: BaseModel
Wrapper for OpenAI’s DALL-E Image Generator.
https://platform.openai.com/docs/guides/images/generations?context=node
Usage instructions:
pip install openai
save your OPENAI_API_KEY in an environment variable
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param default_headers: Optional[Mapping[str, str]] = None¶
param default_query: Optional[Mapping[str, object]] = None¶
param http_client: Optional[Any] = None¶
Optional httpx.Client.
param max_retries: int = 2¶
Maximum number of retries to make when generating.
param model_kwargs: Dict[str, Any] [Optional]¶
param model_name: str = 'dall-e-2' (alias 'model')¶
param n: int = 1¶
Number of images to generate
param openai_api_base: Optional[str] = None (alias 'base_url')¶
Base URL path for API requests, leave blank if not using a proxy or service
emulator.
param openai_api_key: Optional[str] = None (alias 'api_key')¶
Automatically inferred from env var OPENAI_API_KEY if not provided.
param openai_organization: Optional[str] = None (alias 'organization')¶
Automatically inferred from env var OPENAI_ORG_ID if not provided.
param openai_proxy: Optional[str] = None¶
param quality: Optional[str] = 'standard'¶
Quality of the image that will be generated
param request_timeout: Optional[Union[float, Tuple[float, float], Any]] = None (alias 'timeout')¶