Skip to main content

sendReply

plugin.llmProvider.sendReply(requestId: string, response: any, success: boolean): void

Send the final reply for a completion or stream request. For non-streaming: this is the only message you send. For streaming: send after all chunks have been emitted.

Parameters

ParameterTypeRequiredDescription
requestIdstringYes
responseanyYes
successbooleanYes(default: true)

Returns

void

Example

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

const result = await plugin.llmProvider.sendReply('requestId', /* any */, true);
console.log(result);