pub struct Gemini;Expand description
Marker type for the Google Gemini API wire format.
Trait Implementations§
Source§impl ProviderProtocol for Gemini
impl ProviderProtocol for Gemini
Source§type RawRequest = Request
type RawRequest = Request
The serialisable request body sent to the provider.
Source§type RawResponse = Response
type RawResponse = Response
The deserialised non-streaming response body.
Source§fn build_raw(req: Request) -> Request
fn build_raw(req: Request) -> Request
Convert a provider-agnostic
AgentRequest into the provider’s wire format.Source§fn default_base_url() -> &'static str
fn default_base_url() -> &'static str
Default base URL for this provider.
Source§fn parse_response(raw: Response) -> (Vec<ProtocolEvent>, Vec<AgentToolCall>)
fn parse_response(raw: Response) -> (Vec<ProtocolEvent>, Vec<AgentToolCall>)
Parse a complete response into internal protocol events and tool calls.
Source§fn parse_chunk(chunk: StreamChunk, bufs: &mut StreamBufs) -> Vec<ProtocolEvent>
fn parse_chunk(chunk: StreamChunk, bufs: &mut StreamBufs) -> Vec<ProtocolEvent>
Apply a single streaming chunk to the accumulator buffers and return
any events to yield immediately.
Source§fn finalize_stream(bufs: &mut StreamBufs) -> Vec<AgentToolCall>
fn finalize_stream(bufs: &mut StreamBufs) -> Vec<AgentToolCall>
Assemble complete tool calls from the accumulated buffers and return them.
Source§fn url_suffix(model: &str, streaming: bool) -> String
fn url_suffix(model: &str, streaming: bool) -> String
Return the URL suffix for this provider’s completions endpoint.
Source§fn uses_query_key_auth() -> bool
fn uses_query_key_auth() -> bool
If
true, the token is appended as ?key=TOKEN.Source§fn extra_headers() -> &'static [(&'static str, &'static str)]
fn extra_headers() -> &'static [(&'static str, &'static str)]
Extra HTTP headers sent with every request.
Source§fn auth_header_name() -> Option<&'static str>
fn auth_header_name() -> Option<&'static str>
If
Some(name), the token is sent as the given header.Auto Trait Implementations§
impl Freeze for Gemini
impl RefUnwindSafe for Gemini
impl Send for Gemini
impl Sync for Gemini
impl Unpin for Gemini
impl UnsafeUnpin for Gemini
impl UnwindSafe for Gemini
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