Skip to content

3.15.27

Choose a tag to compare

@ilvalerione ilvalerione released this 27 Jul 18:06

New AnthropicVertex provider

The new AnthropicVertex provider allows you to interact with Anthropic models on Google Vertex model garden.

Inspired by @specialtactics in discussion #569

class MyAgent extends Agent
{
    protected function provider(): AIProviderInterface
    {
        return new AnthropicVertex(
            pathJsonCredentials: 'GOOGLE_FILE_CREDENTIALS_PATH',
            location: 'GOOGLE_LOCATION',
            projectId: 'GOOGLE_PROJECT_ID',
            model: 'ANTHROPIC_MODEL',
            parameters: [], // Add custom params (temperature, logprobs, etc)
        );
    }
}

Documentation