@wildix/xbees-assistant-client > ProcessCompletionCommand
ProcessCompletionCommand class
Signature:
export declare class ProcessCompletionCommand extends ProcessCompletionCommand_base
Extends: ProcessCompletionCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { AssistantClient, ProcessCompletionCommand } from "@wildix/xbees-assistant-client"; // ES Modules import
// const { AssistantClient, ProcessCompletionCommand } = require("@wildix/xbees-assistant-client"); // CommonJS import
const client = new AssistantClient(config);
const input = { // ProcessCompletionInput
content: [ // ContentList
{ // ContentItem
user: "STRING_VALUE", // required
text: "STRING_VALUE", // required
},
],
contentString: "STRING_VALUE",
command: "prompt" || "summary" || "rephrase" || "reply" || "expand" || "shorten" || "explain" || "translate", // required
connection: "STRING_VALUE",
request: "STRING_VALUE",
options: { // ComletionOptions
"<keys>": "STRING_VALUE",
},
};
const command = new ProcessCompletionCommand(input);
const response = await client.send(command);
// { // ProcessCompletionOutput
// completion: [ // CompletionList // required
// { // CompletionItem
// slot: "STRING_VALUE", // required
// content: "STRING_VALUE", // required
// },
// ],
// };