import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const response = await client.chat.retrieveHistory('chat_id');
console.log(response);[
{
"role": "user",
"content": "<string>",
"timestamp": "<string>"
}
]Retrieve the message history for a chat conversation.
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const response = await client.chat.retrieveHistory('chat_id');
console.log(response);[
{
"role": "user",
"content": "<string>",
"timestamp": "<string>"
}
]Was this page helpful?