diff --git a/web/src/components/DeploymentDisplay.tsx b/web/src/components/DeploymentDisplay.tsx index 08afc39..843d738 100644 --- a/web/src/components/DeploymentDisplay.tsx +++ b/web/src/components/DeploymentDisplay.tsx @@ -69,13 +69,16 @@ const client = new ComfyDeployClient({ `; const jsClientCreateRunTemplate = ` -const { run_id } = await client.run("", { +const { run_id } = await client.run({ + deployment_id: "", inputs: {} }); `; const jsClientCreateRunNoInputsTemplate = ` -const { run_id } = await client.run(""); +const { run_id } = await client.run({ + deployment_id: "" +}); `; const clientTemplate_checkStatus = ` @@ -119,10 +122,7 @@ export function DeploymentDisplay({
Install the node comfydeploy SDK - + Initialize your client
0) { codeTemplate = codeTemplate.replace( "inputs: {}", - `inputs: ${ - JSON.stringify( - Object.fromEntries( - inputs.map((x) => { - return [x?.input_id, ""]; - }), - ), - null, - 2, - ) - .split("\n") - .map((line, index) => (index === 0 ? line : ` ${line}`)) // Add two spaces indentation except for the first line - .join("\n") - }`, + `inputs: ${JSON.stringify( + Object.fromEntries( + inputs.map((x) => { + return [x?.input_id, ""]; + }), + ), + null, + 2, + ) + .split("\n") + .map((line, index) => (index === 0 ? line : ` ${line}`)) // Add two spaces indentation except for the first line + .join("\n")}`, ); } else { codeTemplate = codeTemplate.replace(