Skip to content

Commit

Permalink
Simplify exec command syntax and refactor summary definition in READM…
Browse files Browse the repository at this point in the history
…E and docs
  • Loading branch information
pelikhan committed Sep 18, 2024
1 parent d60c5b6 commit be9c368
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.`
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```

</Card>
Expand All @@ -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.`
Expand Down

0 comments on commit be9c368

Please sign in to comment.