Skip to main content

TokenProvider

Trait TokenProvider 

Source
pub trait TokenProvider: Send + Sync {
    // Required method
    fn token(&self) -> String;
}
Expand description

Provides access tokens for VertexAI authentication.

Implement this trait to supply dynamically refreshed tokens. The default implementation reads GOOGLE_ACCESS_TOKEN from the environment.

Required Methods§

Source

fn token(&self) -> String

Return a valid access token. Called before each generate() request when using VertexAI variant.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§