Closed lbguilherme closed 3 months ago
Thank you for filing, I agree that sounds like a good idea! We'll look into it more soon.
What do you think about supporting an authConfig?: GoogleAuth
option instead? This way we wouldn't have to add support for each config option individually
const anthropic = new AnthropicVertex({
region: '...',
projectId: '...',
authConfig: new GoogleAuth({
scopes: 'https://www.googleapis.com/auth/cloud-platform',
credentials: JSON.parse(process.env.GOOGLE_CREDENTIALS!),
})
});
A googleAuth
client option will be included in the next release!
Doing
new AnthropicVertex()
will use the default google credentials. But sometimes this is not what we want to do. Currently we had to use this hack to get it working:It would be better if an optional
credentials
option could be passed into theAnthropicVertex
constructor.