Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
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"],
});
})();
October 23, 2023