Skip to content

Commit

Permalink
feat: ✨ add separate script for summarizing files
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Nov 19, 2024
1 parent 3d1a43e commit 5b620b4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"genai:blogify": "node packages/cli/built/genaiscript.cjs run blogify-sample",
"genai:tweetify": "node packages/cli/built/genaiscript.cjs run tweetify",
"genai:docify": "node packages/cli/built/genaiscript.cjs run docify",
"gcm": "node packages/cli/built/genaiscript.cjs run gcm",
"prd": "node packages/cli/built/genaiscript.cjs run prd -prd",
"gcm": "node packages/cli/built/genaiscript.cjs run gcm --model github:gpt-4o",
"prd": "node packages/cli/built/genaiscript.cjs run prd -prd --model github:gpt-4o",
"genai": "node packages/cli/built/genaiscript.cjs run",
"upgrade:deps": "zx scripts/upgrade-deps.mjs",
"cli": "node packages/cli/built/genaiscript.cjs",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
script({
title: "summarize all files",
title: "summarize each files",
model: "small",
files: "src/rag/markdown.md",
tests: [
Expand Down
19 changes: 19 additions & 0 deletions packages/sample/genaisrc/summarize.genai.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
script({
title: "summarize all files",
model: "small",
files: "src/rag/markdown.md",
tests: [
{
files: "src/rag/markdown.md",
keywords: "markdown",
},
],
})

def("FILE", env.files)

$`
Summarize all files in FILE in a single page.
- Keep it short.
- At most 3 paragraphs.
`

0 comments on commit 5b620b4

Please sign in to comment.