1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { getModelBuilder } from "https://esm.town/v/bluemsn/getModelBuilder";
export const modelSampleLLMGenerate = (async () => {
const builder = await getModelBuilder();
const model = await builder();
const { generations, llmOutput } = await model.generate([
"Tell me a joke",
"Tell me a poem",
]);
const data = {
...llmOutput,
generationTexts: generations.map((v) => v[0].text),
};
console.log(data);
return data;
})();
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
December 2, 2023