View source: R/createImagePrompt_v2.R
createImagePrompt_v2 | R Documentation |
Generates optimal prompts for creating images using the OpenAI API. Given a base prompt, image attributes, and model parameters, it generates the optimal prompts for image creation. This is an experimental function.
createImagePrompt_v2(
Base_prompt = "",
removed_from_image = "",
stable_diffusion = "N/A",
Model = "gpt-4o-mini",
len = 1000
)
Base_prompt |
A string. This is the base prompt that forms the basis for the generated prompts. |
removed_from_image |
A string. This is an attribute that should be removed from the image. |
stable_diffusion |
A string. This parameter is used to control the stability of the diffusion process. |
Model |
A string. This is the model used for generating the prompts. Default is "gpt-4o-mini". |
len |
An integer. This is the maximum length of the generated prompts. Must be between 1 and 1000. Default is 1000. |
Generate Image Prompts version 2
A vector of strings. Each string in the vector is a generated prompt.
Satoshi Kume
## Not run:
# Define the base prompt and image attributes
base_prompt = "A sunset over a serene lake"
removed_from_image = "The sun"
stable_diffusion = "Moderate"
# Generate image prompts
res <- createImagePrompt_v2(Base_prompt = base_prompt, removed_from_image = removed_from_image,
stable_diffusion = stable_diffusion, len = 100)
# Print the generated prompts
print(res)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.