I've tried adding AI to my application but the sandbox deployment fails with the following error:
Failed to instantiate data construct
Caused By: Maximum call stack size exceeded
I noticed this happens only when I use the tools: option. Here is the troublesome schema:
chat: a
.conversation({
aiModel: a.ai.model('Claude 3.5 Sonnet'),
systemPrompt:
"You are an assistant.",
inferenceConfiguration: {
temperature: 0.2,
topP: 0.2,
maxTokens: 1000,
},
tools: [
a.ai.dataTool({
name: 'UserQuery',
description: 'Searches for User records',
model: a.ref('User'),
modelOperation: 'list',
}),
],
})
.authorization((allow) => allow.owner()),
if I remove the tools block then the resource is deployed successfully.