From be9c3685b527c93ef12ca07e6d1f34ad266e0056 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 18 Sep 2024 23:17:52 +0000 Subject: [PATCH] Simplify exec command syntax and refactor summary definition in README and docs --- README.md | 4 ++-- docs/src/content/docs/index.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6064cac169..3301747da1 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ Run code in Docker [containers](https://microsoft.github.io/genaiscript/referenc ```js const c = await host.container({ image: "python:alpine" }) -const res = await c.exec("python", ["--version"]) +const res = await c.exec("python --version") ``` ### 🧩 LLM Composition @@ -144,7 +144,7 @@ for (const file of env.files) { _.def("FILE", file) _.$`Summarize the FILE.` }) - _.def("SUMMARY", text) + def("SUMMARY", text) } $`Summarize all the summaries.` ``` diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index 1c672c4791..bd5dc0e2ac 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -288,7 +288,7 @@ Run code in Docker [containers](/genaiscript/reference/scripts/containers). const c = await host.container({ image: "python:alpine", }) -const res = await c.exec("python", ["--version"]) +const res = await c.exec("python --version") ``` @@ -305,7 +305,7 @@ for (const file of env.files) { _.$`Summarize the FILE.` }) // use result in main prompt - _.def("SUMMARY", text) + def("SUMMARY", text) } // use summary $`Summarize all the summaries.`