import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const message = await client.chatThreads.messages.update('thread_id', 'application_interaction_id');
console.log(message.id);{
"id": "<string>",
"input": {},
"output": {},
"aggregated": true,
"application_spec_id": "<string>",
"application_variant_id": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"operation_status": "SUCCESS",
"created_at": "2023-11-07T05:31:56Z",
"operation_metadata": {},
"chat_thread_id": "<string>",
"interaction_source": "EXTERNAL_AI"
}import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const message = await client.chatThreads.messages.update('thread_id', 'application_interaction_id');
console.log(message.id);{
"id": "<string>",
"input": {},
"output": {},
"aggregated": true,
"application_spec_id": "<string>",
"application_variant_id": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"operation_status": "SUCCESS",
"created_at": "2023-11-07T05:31:56Z",
"operation_metadata": {},
"chat_thread_id": "<string>",
"interaction_source": "EXTERNAL_AI"
}Fetch the thread by account instead of user
The output text generated by the application.
Successful Response
Boolean of whether this interaction has been uploaded to s3 bucket yet, default is false
How much time the step took in milliseconds(ms)
The outcome of the operation
SUCCESS, ERROR, CANCELED The date and time when the entity was created in ISO format.
The JSON representation of the metadata insights emitted through the execution. This can differ based on different types of operations
EXTERNAL_AI, EVALUATION, SGP_CHAT, AGENTS_SERVICE