Upgrade async-openai from our own etkecc fork to upstream's 0.31.1

Switches `async-openai` from our own etkecc fork (0.28.1-patched) to the
official crates.io version 0.31.1.

We adapt to async-openai's types reorganization and making use of crate
features to only enable what we need.
This commit is contained in:
Slavi Pantaleev
2025-11-30 10:31:06 +02:00
parent 5c0a7be7a2
commit 8eb70f0f2c
7 changed files with 109 additions and 92 deletions

View File

@@ -56,12 +56,8 @@ impl ImageSource {
}
}
impl From<ImageSource> for async_openai::types::ImageInput {
impl From<ImageSource> for async_openai::types::images::ImageInput {
fn from(value: ImageSource) -> Self {
async_openai::types::ImageInput::from_vec_u8(
value.filename,
value.bytes,
value.mime_type.to_string(),
)
async_openai::types::images::ImageInput::from_vec_u8(value.filename, value.bytes)
}
}