pub struct GeminiAdapter { /* private fields */ }Expand description
Adapter for the Google Gemini generateContent API.
Implementations§
Trait Implementations§
Source§impl Clone for GeminiAdapter
impl Clone for GeminiAdapter
Source§fn clone(&self) -> GeminiAdapter
fn clone(&self) -> GeminiAdapter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeminiAdapter
impl Debug for GeminiAdapter
Source§impl Default for GeminiAdapter
impl Default for GeminiAdapter
Source§impl ProviderAdapter for GeminiAdapter
impl ProviderAdapter for GeminiAdapter
Source§fn provider_name(&self) -> &str
fn provider_name(&self) -> &str
Provider identifier (e.g., “openai”, “anthropic”).
Source§fn convert_request(&self, payload: Value) -> Value
fn convert_request(&self, payload: Value) -> Value
Convert an internal Chat Completions payload to provider-specific format. Read more
Source§fn convert_response(&self, response: Value) -> Value
fn convert_response(&self, response: Value) -> Value
Convert a provider-specific response back to Chat Completions format. Read more
Source§fn supports_streaming(&self) -> bool
fn supports_streaming(&self) -> bool
Whether this adapter supports streaming responses.
Source§fn enable_streaming(&self, _payload: &mut Value)
fn enable_streaming(&self, _payload: &mut Value)
Add streaming parameters to the request payload. Read more
Source§fn streaming_url(&self, base_url: &str) -> Option<String>
fn streaming_url(&self, base_url: &str) -> Option<String>
Get the streaming API URL, if different from the regular API URL. Read more
Source§fn parse_stream_event(
&self,
_event_type: &str,
data: &Value,
) -> Option<StreamEvent>
fn parse_stream_event( &self, _event_type: &str, data: &Value, ) -> Option<StreamEvent>
Parse a single SSE event into a stream event. Read more
Auto Trait Implementations§
impl Freeze for GeminiAdapter
impl RefUnwindSafe for GeminiAdapter
impl Send for GeminiAdapter
impl Sync for GeminiAdapter
impl Unpin for GeminiAdapter
impl UnsafeUnpin for GeminiAdapter
impl UnwindSafe for GeminiAdapter
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