OpenAITextToImageExecutionSettings Class
Request settings for OpenAI text to image services.
Initialize the prompt execution settings.
Constructor
OpenAITextToImageExecutionSettings(service_id: str | None = None, *, extension_data: dict[str, Any] = None, function_choice_behavior: FunctionChoiceBehavior | None = None, prompt: str | None = None, ai_model_id: str | None = None, size: ImageSize | None = None, quality: str | None = None, style: str | None = None)
Parameters
Name | Description |
---|---|
service_id
|
The service ID to use for the request. Default value: None
|
kwargs
Required
|
Additional keyword arguments, these are attempted to parse into the keys of the specific prompt execution settings. |
Keyword-Only Parameters
Name | Description |
---|---|
extension_data
Required
|
|
function_choice_behavior
Required
|
|
prompt
Required
|
|
ai_model_id
Required
|
|
size
Required
|
|
quality
Required
|
|
style
Required
|
|
Methods
check_prompt |
Check that the prompt is not empty. |
check_size |
Check that the requested image size is valid. |
prepare_settings_dict |
Prepare the settings dictionary for the OpenAI API. |
check_prompt
Check that the prompt is not empty.
check_prompt() -> OpenAITextToImageExecutionSettings
check_size
Check that the requested image size is valid.
check_size() -> OpenAITextToImageExecutionSettings
prepare_settings_dict
Prepare the settings dictionary for the OpenAI API.
prepare_settings_dict(**kwargs) -> dict[str, Any]
Attributes
ai_model_id
ai_model_id: str | None
prompt
prompt: str | None
quality
quality: str | None
size
size: ImageSize | None
style
style: str | None