SDK-NodeJS
SDK-NodeJS copied to clipboard
Dialog, Set memory
Dear all,
it is not possible to set a memory when calling .dialog() method. This should be possible https://recast.ai/docs/api-reference/#dialog-text
Thanks
const headers = { Authorization: `Token ${config.DEVELOPER_TOKEN}`, 'Content-Type': 'application/json' }
const message = { type: 'text', content: 'test!' }
const body = { conversation_id: '12345', message, memory: { person: person.fullname, role:person.role } }
axios.post('https://api.recast.ai/build/v1/dialog', body, { headers })
.then(res => {
console.log('responses', res.data.results.messages)
})
.catch(err => console.error(err.response.data))
Do you mean this?