mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-08-22 15:15:34 +00:00
Merge pull request #48 from lordi/dall-e-3
Allow generating images with Dall-E-3
This commit is contained in:
@ -41,3 +41,7 @@ pub const GPT4_32K_0613: &str = "gpt-4-32k-0613";
|
||||
// - legacy
|
||||
pub const GPT4_0314: &str = "gpt-4-0314";
|
||||
pub const GPT4_32K_0314: &str = "gpt-4-32k-0314";
|
||||
|
||||
// https://platform.openai.com/docs/api-reference/images/object
|
||||
pub const DALL_E_2: &str = "dall-e-2";
|
||||
pub const DALL_E_3: &str = "dall-e-3";
|
||||
|
@ -12,6 +12,8 @@ pub struct ImageData {
|
||||
pub struct ImageGenerationRequest {
|
||||
pub prompt: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub model: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub n: Option<i32>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub size: Option<String>,
|
||||
@ -25,6 +27,7 @@ impl ImageGenerationRequest {
|
||||
pub fn new(prompt: String) -> Self {
|
||||
Self {
|
||||
prompt,
|
||||
model: None,
|
||||
n: None,
|
||||
size: None,
|
||||
response_format: None,
|
||||
|
Reference in New Issue
Block a user