pub struct VertexAdapter { /* private fields */ }Available on crate feature
gcp only.Implementations§
Source§impl VertexAdapter
impl VertexAdapter
pub async fn from_env(config: ProviderConfig) -> Result<Self>
pub async fn from_config( config: ProviderConfig, vertex: VertexConfig, ) -> Result<Self>
pub fn with_project(self, project_id: impl Into<String>) -> Self
pub fn with_region(self, region: impl Into<String>) -> Self
pub fn with_model_region( self, model_key: impl Into<String>, region: impl Into<String>, ) -> Self
pub fn with_1m_context(self, enable: bool) -> Self
Trait Implementations§
Source§impl Debug for VertexAdapter
impl Debug for VertexAdapter
Source§impl ProviderAdapter for VertexAdapter
impl ProviderAdapter for VertexAdapter
fn config(&self) -> &ProviderConfig
fn name(&self) -> &'static str
fn build_url<'life0, 'life1, 'async_trait>(
&'life0 self,
model: &'life1 str,
stream: bool,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn transform_request<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transform_response(&self, response: Value) -> Result<ApiResponse>
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
http: &'life1 Client,
request: CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<ApiResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
http: &'life1 Client,
request: CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn refresh_credentials<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn model(&self, model_type: ModelType) -> &str
fn prepare_request<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = CreateMessageRequest> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply_auth_headers<'life0, 'async_trait>(
&'life0 self,
req: RequestBuilder,
) -> Pin<Box<dyn Future<Output = RequestBuilder> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn supports_credential_refresh(&self) -> bool
fn ensure_fresh_credentials<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_tokens<'life0, 'life1, 'async_trait>(
&'life0 self,
_http: &'life1 Client,
_request: CountTokensRequest,
) -> Pin<Box<dyn Future<Output = Result<CountTokensResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for VertexAdapter
impl !RefUnwindSafe for VertexAdapter
impl Send for VertexAdapter
impl Sync for VertexAdapter
impl Unpin for VertexAdapter
impl !UnwindSafe for VertexAdapter
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreCreates a shared type from an unshared type.