use async_trait::async_trait;
use futures::stream::BoxStream;
use crate::error::GoogleError;
use crate::schema::{NativeRequest, NativeResponse};
#[async_trait]
pub trait Transport: Send + Sync + 'static {
async fn send(&self, model: &str, body: &NativeRequest) -> Result<NativeResponse, GoogleError>;
async fn stream(
&self,
model: &str,
body: &NativeRequest,
) -> Result<BoxStream<'static, Result<bytes::Bytes, GoogleError>>, GoogleError>;
fn wire_model_id(&self, canonical: &str) -> String {
canonical.to_string()
}
fn supports_url_images(&self) -> bool {
false
}
}
pub mod ai_studio;
#[cfg(feature = "vertex")]
pub mod vertex;