pub struct GeminiDriver { /* private fields */ }Expand description
Google Gemini generateContent API driver.
Implementations§
Source§impl GeminiDriver
impl GeminiDriver
Trait Implementations§
Source§impl Debug for GeminiDriver
impl Debug for GeminiDriver
Source§impl ProviderDriver for GeminiDriver
impl ProviderDriver for GeminiDriver
Source§fn provider_id(&self) -> &str
fn provider_id(&self) -> &str
Unique provider identifier (matches manifest
id).Source§fn build_request(
&self,
messages: &[Message],
_model: &str,
temperature: Option<f64>,
max_tokens: Option<u32>,
_stream: bool,
extra: Option<&Value>,
) -> Result<DriverRequest, Error>
fn build_request( &self, messages: &[Message], _model: &str, temperature: Option<f64>, max_tokens: Option<u32>, _stream: bool, extra: Option<&Value>, ) -> Result<DriverRequest, Error>
Build a provider-specific HTTP request from unified parameters.
Source§fn parse_response(&self, body: &Value) -> Result<DriverResponse, Error>
fn parse_response(&self, body: &Value) -> Result<DriverResponse, Error>
Parse a non-streaming response into unified format.
Source§fn parse_stream_event(
&self,
data: &str,
) -> Result<Option<StreamingEvent>, Error>
fn parse_stream_event( &self, data: &str, ) -> Result<Option<StreamingEvent>, Error>
Parse a single streaming event from raw SSE/NDJSON data.
Source§fn supported_capabilities(&self) -> &[Capability]
fn supported_capabilities(&self) -> &[Capability]
Get the list of capabilities this driver supports.
Source§fn is_stream_done(&self, _data: &str) -> bool
fn is_stream_done(&self, _data: &str) -> bool
Check if the done signal has been received in streaming.
Auto Trait Implementations§
impl Freeze for GeminiDriver
impl RefUnwindSafe for GeminiDriver
impl Send for GeminiDriver
impl Sync for GeminiDriver
impl Unpin for GeminiDriver
impl UnsafeUnpin for GeminiDriver
impl UnwindSafe for GeminiDriver
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