Skip to main content

completeThreadStep

plugin.chatApi.completeThreadStep(threadId: string, stepId: string, data?: CompleteStepData): Promise<ChatThreadStep>

Completes a step in a chat thread.

Marks the specified step as completed, optionally recording completion details such as the outcome or output.

Parameters​

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread
stepIdstringYesThe unique identifier of the step to complete
dataCompleteStepDataNoOptional completion details

Returns​

Promise<ChatThreadStep> — A promise that resolves to the completed ChatThreadStep

Example​

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.chatApi.completeThreadStep('threadId', 'stepId');
console.log(result);