Make gpt-image-1.5 the default image model for OpenAI
This commit is contained in:
@@ -17,7 +17,7 @@ text_to_speech:
|
|||||||
speed: 1.0
|
speed: 1.0
|
||||||
response_format: opus
|
response_format: opus
|
||||||
image_generation:
|
image_generation:
|
||||||
model_id: gpt-image-1
|
model_id: gpt-image-1.5
|
||||||
style: null
|
style: null
|
||||||
size: null
|
size: null
|
||||||
quality: null
|
quality: null
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ agents:
|
|||||||
# speed: 1.0
|
# speed: 1.0
|
||||||
# response_format: opus
|
# response_format: opus
|
||||||
# image_generation:
|
# image_generation:
|
||||||
# model_id: gpt-image-1
|
# model_id: gpt-image-1.5
|
||||||
# style: null
|
# style: null
|
||||||
# size: null
|
# size: null
|
||||||
# quality: null
|
# quality: null
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::OPENAI_IMAGE_MODEL_GPT_IMAGE_1;
|
use super::OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5;
|
||||||
use crate::agent::{default_prompt, provider::ConfigTrait};
|
use crate::agent::{default_prompt, provider::ConfigTrait};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
@@ -162,7 +162,7 @@ pub struct ImageGenerationConfig {
|
|||||||
impl Default for ImageGenerationConfig {
|
impl Default for ImageGenerationConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
model_id: OPENAI_IMAGE_MODEL_GPT_IMAGE_1.to_owned(),
|
model_id: OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5.to_owned(),
|
||||||
style: default_image_style(),
|
style: default_image_style(),
|
||||||
size: default_image_size(),
|
size: default_image_size(),
|
||||||
quality: default_image_quality(),
|
quality: default_image_quality(),
|
||||||
@@ -180,7 +180,9 @@ impl ImageGenerationConfig {
|
|||||||
"gpt-image-1" => Ok(async_openai::types::images::ImageModel::GptImage1),
|
"gpt-image-1" => Ok(async_openai::types::images::ImageModel::GptImage1),
|
||||||
"gpt-image-1.5" => Ok(async_openai::types::images::ImageModel::GptImage1dot5),
|
"gpt-image-1.5" => Ok(async_openai::types::images::ImageModel::GptImage1dot5),
|
||||||
"gpt-image-1-mini" => Ok(async_openai::types::images::ImageModel::GptImage1Mini),
|
"gpt-image-1-mini" => Ok(async_openai::types::images::ImageModel::GptImage1Mini),
|
||||||
other => Ok(async_openai::types::images::ImageModel::Other(other.to_owned())),
|
other => Ok(async_openai::types::images::ImageModel::Other(
|
||||||
|
other.to_owned(),
|
||||||
|
)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ use super::super::AgentInstantiationResult;
|
|||||||
use super::ConfigTrait;
|
use super::ConfigTrait;
|
||||||
use super::controller::ControllerType;
|
use super::controller::ControllerType;
|
||||||
|
|
||||||
pub const OPENAI_IMAGE_MODEL_GPT_IMAGE_1: &str = "gpt-image-1";
|
pub const OPENAI_IMAGE_MODEL_GPT_IMAGE_1_DOT_5: &str = "gpt-image-1.5";
|
||||||
|
|
||||||
pub fn create_controller_from_yaml_value_config(
|
pub fn create_controller_from_yaml_value_config(
|
||||||
agent_id: &str,
|
agent_id: &str,
|
||||||
|
|||||||
Reference in New Issue
Block a user