mirror of
https://github.com/humanlayer/humanlayer.git
synced 2025-08-20 19:01:22 +03:00
38 lines
878 B
TypeScript
38 lines
878 B
TypeScript
import { EmailContactChannel, FunctionCall, humanlayer } from "@humanlayer/sdk";
|
|
|
|
const hl = humanlayer({ verbose: true, runId: "email-multiple" });
|
|
|
|
const demoMultiple = async () => {
|
|
const call: FunctionCall = await hl.createFunctionCall({
|
|
spec: {
|
|
fn: "multiply",
|
|
kwargs: { foo: "bar" },
|
|
channel: {
|
|
email: {
|
|
address:
|
|
process.env.HL_EXAMPLE_CONTACT_EMAIL || "dexter@humanlayer.dev",
|
|
additional_recipients: [
|
|
{
|
|
address:
|
|
process.env.HL_EXAMPLE_SECOND_CONTACT_EMAIL ||
|
|
"sundeep@humanlayer.dev",
|
|
field: "cc",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
});
|
|
};
|
|
|
|
const main = async (): Promise<any> => {
|
|
return await demoMultiple();
|
|
};
|
|
|
|
main()
|
|
.then(console.log)
|
|
.catch((e) => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
});
|