1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import process from "node:process";
export const llmTS = (async () => {
const { LLM, MODEL } = await import("npm:llm.ts");
return new LLM({
apiKeys: {
huggingface: process.env.HF_API_TOKEN,
},
}).completion({
prompt: [
'Repeat the following sentence: "I am a robot."',
'Repeat the following sentence: "I am a human."',
],
model: ["gpt2"],
});
})();