Skip to content
Merged

typos #1465

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"gitmoji",
"GROQ",
"Gruber",
"Halleux",
"hostconfiguration",
"hostpath",
"htmlescape",
Expand Down Expand Up @@ -169,6 +170,7 @@
"scriptquickpick",
"secretscanner",
"sglang",
"shiki",
"sidenote",
"skia",
"Smol",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/genaisrc/system.annotations.genai.mts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For example, an warning in main.py on line 3 with message "There seems to be a t
For example, an error in app.js between line 1 and 4 with message "Missing semicolon" and a warning in index.ts on line 10, would be:

::error file=app.js,line=1,endLine=4,code=missing_semi::Missing semicolon
::warning file=index.ts,line=10,endLine=10,code=identation::erroneous identation
::warning file=index.ts,line=10,endLine=10,code=indentation::erroneous indentation

- Do NOT indent or place annotation in a code fence.
- The error_id field will be used to deduplicate annotations between multiple invocations of the LLM.
Expand Down
34 changes: 23 additions & 11 deletions slides/pages/script-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,41 @@
layout: two-cols
---

## GenAIScript Introduction
# GenAIScript
## Scripts your LLMs

Each GenAIScript is JavaScript that defines a call/return to an LLM

- Define context for the LLM using \
`def` (from code, docs, URLs, images, etc)
- Describe the task you want in `$` prompt
- Send the request to the LLM
- Process the output of the LLM
- `def` is for context
- `$` is for instructions

GenAIScript
- Optimizes context for LLM
- Send request to LLM
- Process LLM output

 

::right::

## Example

- `summarizer.genai.mts`

```js
// metadata and model configuration
script({ title: "Summarize", model: "gpt4" })
script({ model: "small", accept: ".txt" })

// insert the context, define a "FILE" variable
def("FILE", env.files)
def("FILE", await workspace.findFile("**/*.txt"))

// appends text to the prompt (file is the variable name)
$`Summarize FILE. Save output to summary.txt`
```
// $ appends text to the prompt
$`Summarize <FILE>.`
```

- execute on all .txt files
```sh
genaiscript run summarizer **.txt
```

https://microsoft.github.io/genaiscript
Loading