Documentation
Search
K
Comment on page

Sending & receiving messages

Send a message

import {
// ... previous imports
SendMessageCommand,
} from '@dialectlabs/sdk';
// ... code from previous examples
const text = 'gm world';
const command: SendMessageCommand = {
text,
}
await thread.send(command);

Receive messages

Thread messages are available directly from the thread after querying for the thread.