getChatMessages()
getChatMessages(
projectId:string,chatId:string):Promise<ProjectChatMessage[]>
Defined in: packages/core/src/index.ts:2267
Get messages from a project chat
Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | The unique identifier of the project |
chatId | string | The unique identifier of the chat |
Returns
Promise<ProjectChatMessage[]>
Array of chat messages
Throws
401 - Not authenticated
Throws
404 - Project or chat not found
Example
import { getChatMessages } from "@cpod/sdk";
const messages = await getChatMessages("project-123", "chat-456");
messages.forEach(msg => {
console.log(`${msg.role}: ${msg.content}`);
});