AI ยท console.warn
createAI needs a Lattice grid instance to ground on (grid.statistics/grid.rows). Pass the grid returned by createGrid or createHeadlessGrid.
Printed by AI, prefixed [lattice], since 1.42.0.
Warnings reference › ai:no-grid
- Identifier
ai:no-grid- Raised by
- AI
- Since
- 1.42.0
What happened
createAI() was called with something that is not a grid, or with a grid that exposes neither statistics nor rows. The AI layer grounds every figure it produces in numbers it reads from the grid, so without one it has nothing to ground on: the controller is still returned, but narratives and answers will have no data behind them.
The fix
Pass the object returned by createGrid or createHeadlessGrid as the first argument.
The smallest fix
const grid = createGrid(el, config);
const ai = createAI(grid, { ask });
Reference
Covered in full at the API reference.