Documentation
¶
Overview ¶
Package vertex provides Google Vertex AI's documented Gemini generateContent route and Anthropic Claude rawPredict route. It reuses the shared Gemini and Anthropic codecs; only Vertex routing, bearer authentication, and the Vertex-required anthropic_version field are provider-specific.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(selected model.Model, accessToken auth.APIKey, options ...Option) (inference.Client, error)
New constructs a Vertex client using a caller-supplied OAuth bearer token. ProviderGoogleVertex selects Gemini or Anthropic from Model.APIFormat; ProviderGoogleVertexAnthropic is restricted to Anthropic by llm.ValidateModel.
func NewCounter ¶
func NewCounter(_ auth.APIKey) (contextcount.ContextCounter, error)
Types ¶
type ConfigurationError ¶
type ConfigurationError struct {
Reason ConfigurationReason
}
func (*ConfigurationError) Error ¶
func (e *ConfigurationError) Error() string
type ConfigurationReason ¶
type ConfigurationReason string
const ( ProjectOrLocationMissing ConfigurationReason = "project or location is missing" ProjectOrLocationInvalid ConfigurationReason = "project or location is invalid" ModelMissing ConfigurationReason = "model name is missing" )
type CounterSupportError ¶
type CounterSupportError = llm.CounterSupportError
type Option ¶
type Option func(*config)
Option configures Vertex project/region routing or adds a documented request header. The access token passed to New must already be an OAuth/ADC bearer token; this package does not perform an interactive gcloud login.
func WithAnthropicVersion ¶
WithAnthropicVersion overrides Vertex's native Claude request version. The default is the version documented by Vertex's Claude rawPredict examples.