import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const chats = await client.workers.deploymentLogs.chat.list('workerId');
console.log(chats);
[
{
"id": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"userId": "<string>",
"userName": "<string>",
"userEmail": "<string>",
"messages": {},
"sessionData": {},
"rating": 123,
"feedback": "<string>",
"messageCount": 123,
"duration": 123
}
]
Retrieves all chat deployment logs for the worker. Optionally, logs can be filtered by deploymentId and/or flowId by providing corresponding query parameters.
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const chats = await client.workers.deploymentLogs.chat.list('workerId');
console.log(chats);
[
{
"id": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"userId": "<string>",
"userName": "<string>",
"userEmail": "<string>",
"messages": {},
"sessionData": {},
"rating": 123,
"feedback": "<string>",
"messageCount": 123,
"duration": 123
}
]
API key authentication
List of chat deployment logs
The response is of type object[]
.