Files
humanlayer/examples/ts_openai_client/06-email-multiple.ts
2025-05-29 08:54:45 -07:00

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);
});