You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there's inconsistent behavior when using updateState(). When updating a single property, it appears to replace the entire state object rather than patching it:
console.log(session.state)// { userName: 'God', colour: 'Green' }async(input)=>{ai.currentSession().updateState({colour: input.colour,});return`colour updated to ${input.colour}`;}console.log(session.state)// { colour: 'Green' } // userName was cleared
The current workaround is to manually spread the existing state: