log

View as MarkdownOpen in Claude

Read the conversation back. This changes nothing about the conversation.

Parameters

conversationId
stringRequired

The conversation to read.

Returns

Promise<ChatLog> — carries messages and callTimeline.

Messages contain the fields returned by the service. Code that displays a transcript should not assume every entry has a timestamp. callTimeline contains any structured timeline entries returned for the conversation.

messages can include your prompt and other non-dialogue entries. Filter to user and assistant roles before displaying a transcript.

Example

import { AIChatClient } from '@signalwire/sdk';
const client = new AIChatClient({ space: 'your-space' });
const { messages } = await client.log('chat-8f21');
for (const m of messages) {
if (m.role === 'user' || m.role === 'assistant') console.log(m.role, m.content);
}