pub struct Backend<'a> {
pub client: &'a Client,
pub base_url: &'a str,
pub api_key: &'a str,
pub extra_headers: &'a [(String, String)],
pub supports_images: bool,
}Expand description
How to reach and authenticate one OpenAI-compatible backend.
Fields§
§client: &'a ClientShared HTTP client.
base_url: &'a strBase URL (.../v1), without the trailing path.
api_key: &'a strAPI key; empty for trust-local endpoints.
extra_headers: &'a [(String, String)]Extra headers (e.g. OpenRouter attribution).
supports_images: boolWhether the model accepts image input.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Backend<'a>
impl<'a> !UnwindSafe for Backend<'a>
impl<'a> Forget for Backend<'a>
impl<'a> Freeze for Backend<'a>
impl<'a> Send for Backend<'a>
impl<'a> Sync for Backend<'a>
impl<'a> Unpin for Backend<'a>
impl<'a> UnsafeUnpin for Backend<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more