import { Glean } from "@gleanwork/api-client";
const glean = new Glean({
apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
});
async function run() {
const result = await glean.client.chat.create({
messages: [
{
fragments: [
{
text: "What are the company holidays this year?",
},
],
},
],
});
console.log(result);
}
run();
import { Glean } from "@gleanwork/api-client";
const glean = new Glean({
apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
});
async function run() {
const result = await glean.client.chat.createStream({
messages: [
{
fragments: [
{
text: "What are the company holidays this year?",
},
],
},
],
});
console.log(result);
}
run();