diff --git a/frontend/src/lib/components/copilot/chat/app/core.ts b/frontend/src/lib/components/copilot/chat/app/core.ts index 11c2588868..9f4616efef 100644 --- a/frontend/src/lib/components/copilot/chat/app/core.ts +++ b/frontend/src/lib/components/copilot/chat/app/core.ts @@ -925,7 +925,7 @@ export function prepareAppSystemMessage(customPrompt?: string): ChatCompletionSy // and role spelled out otherwise. A role names the privileges the app's own // queries run with, so it has to be in the code the model writes. const datatableCall = policy.role - ? `wmill.datatable('${datatableName}', '${policy.role}')` + ? `wmill.datatable('${datatableName}', { role: '${policy.role}' })` : datatableName === 'main' ? 'wmill.datatable()' : `wmill.datatable('${datatableName}')`