pub struct VertexProvider { /* private fields */ }Expand description
Google Vertex AI provider supporting both Google-native (Gemini) and Anthropic models via Vertex endpoints.
Implementations§
Source§impl VertexProvider
impl VertexProvider
Sourcepub fn new(model: impl Into<String>) -> Self
pub fn new(model: impl Into<String>) -> Self
Create a new Vertex AI provider for Google-native (Gemini) models.
Sourcepub fn with_project(self, project: impl Into<String>) -> Self
pub fn with_project(self, project: impl Into<String>) -> Self
Set the GCP project ID.
Sourcepub fn with_location(self, location: impl Into<String>) -> Self
pub fn with_location(self, location: impl Into<String>) -> Self
Set the GCP region/location.
Sourcepub fn with_publisher(self, publisher: impl Into<String>) -> Self
pub fn with_publisher(self, publisher: impl Into<String>) -> Self
Set the publisher ("google" or "anthropic").
Sourcepub fn with_endpoint_url(self, url: impl Into<String>) -> Self
pub fn with_endpoint_url(self, url: impl Into<String>) -> Self
Override the full endpoint URL (for deterministic tests).
Sourcepub fn with_compat(self, compat: Option<CompatConfig>) -> Self
pub fn with_compat(self, compat: Option<CompatConfig>) -> Self
Attach provider-specific compatibility overrides.
Sourcepub fn with_client(self, client: Client) -> Self
pub fn with_client(self, client: Client) -> Self
Create with a custom HTTP client (VCR, test harness, etc.).
Sourcepub fn build_gemini_request(
&self,
context: &Context<'_>,
options: &StreamOptions,
) -> GeminiRequest
pub fn build_gemini_request( &self, context: &Context<'_>, options: &StreamOptions, ) -> GeminiRequest
Build the Gemini-format request body (for Google-native models).
Trait Implementations§
Source§impl Provider for VertexProvider
impl Provider for VertexProvider
Source§fn stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 Context<'life2>,
options: &'life3 StreamOptions,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamEvent>> + Send>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 Context<'life2>,
options: &'life3 StreamOptions,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamEvent>> + Send>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Start streaming a completion. Read more
Auto Trait Implementations§
impl Freeze for VertexProvider
impl !RefUnwindSafe for VertexProvider
impl Send for VertexProvider
impl Sync for VertexProvider
impl Unpin for VertexProvider
impl UnsafeUnpin for VertexProvider
impl !UnwindSafe for VertexProvider
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more