Skip to content

Commit 8eb05fb

Browse files
committed
✨ feat: enhance poem functionality with config and options
Integrated runtime configuration and improved prompt with GPT-4o model.
1 parent 9feb262 commit 8eb05fb

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

packages/runtime-sample/src/poem-function.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ export async function writePoem() {
44
const res = await prompt`write a poem`;
55
return res.text;
66
}
7+
8+
await writePoem()

packages/runtime-sample/src/poem-js.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { config } from "@genaiscript/runtime";
2-
32
await config();
43

54
const d = YAML`foo: bar`;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import "@genaiscript/runtime";
1+
import { config } from "@genaiscript/runtime";
2+
await config();
23

3-
const d = YAML`foo: bar`;
4-
const res = await prompt`write a poem`;
4+
const res = await prompt`write a poem`.options({ model: "github:openai/gpt-4o" });
55
console.log(res.text);

0 commit comments

Comments
 (0)