Skip to content

Commit

Permalink
Update dependencies, adjust configurations and scripts across multipl…
Browse files Browse the repository at this point in the history
…e packages
  • Loading branch information
pelikhan committed Sep 12, 2024
1 parent aca8ac3 commit d71b395
Show file tree
Hide file tree
Showing 32 changed files with 3,533 additions and 432 deletions.
18 changes: 9 additions & 9 deletions THIRD_PARTY_LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ MIT License

The following npm package may be included in this product:

- [email protected].4
- [email protected].5

This package contains the following license and notice below:

Expand Down Expand Up @@ -1844,7 +1844,7 @@ Apache License

The following npm package may be included in this product:

- typescript@5.5.4
- typescript@5.6.2

This package contains the following license and notice below:

Expand Down Expand Up @@ -4188,9 +4188,9 @@ The following npm packages may be included in this product:
- @tokenizer/token@0.3.0
- [email protected]
- [email protected]
- [email protected].4
- [email protected].4
- [email protected].4
- [email protected].5
- [email protected].5
- [email protected].5
- [email protected]
- [email protected]
- [email protected]
Expand Down Expand Up @@ -4962,7 +4962,7 @@ SOFTWARE.

The following npm package may be included in this product:

- [email protected].0
- [email protected].1

This package contains the following license and notice below:

Expand Down Expand Up @@ -4992,7 +4992,7 @@ SOFTWARE.

The following npm packages may be included in this product:

- [email protected].0
- [email protected].1
- [email protected]

These packages each contain the following license and notice below:
Expand Down Expand Up @@ -6412,7 +6412,7 @@ SOFTWARE.
The following npm packages may be included in this product:

- [email protected]
- [email protected].0
- [email protected].2
- [email protected]
- [email protected]

Expand Down Expand Up @@ -7314,7 +7314,7 @@ For more information, please refer to <http://unlicense.org>

The following npm package may be included in this product:

- [email protected].11
- [email protected].12

This package contains the following license and notice below:

Expand Down
21 changes: 21 additions & 0 deletions docs/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@astrojs/check": "^0.9.3",
"@astrojs/starlight": "^0.27.0",
"astro": "^4.15.4",
"typescript": "5.5.4"
"typescript": "5.6.2"
},
"devDependencies": {
"starlight-blog": "^0.12.0",
Expand Down
310 changes: 169 additions & 141 deletions docs/yarn.lock

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions genaisrc/docs-sample-generator.genai.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
script({
model: "openai:gpt-4",
title: "generating tests from samples",
system: ["system"],
system: ["system", "system.files"],
parameters: {
api: {
type: "string",
Expand All @@ -15,8 +15,9 @@ const api = env.vars.api + ""
console.log(`generating sample for ${api}`)

const scripts = (
await workspace.findFiles("packages/*/src/**/*genai.{js,mjs}")
await workspace.findFiles("packages/**/*genai.{js,mjs}", { readText: true })
).filter((f) => f.content?.includes(api))
if (!scripts.length) cancel("No samples found")
const samples = await retrieval.vectorSearch(api, scripts)
console.debug(samples)

Expand All @@ -27,7 +28,7 @@ const docsSamples = await retrieval.vectorSearch(api, docs, { topK: 3 })
console.debug(docsSamples)

const sn = def("SAMPLES", samples, { maxTokens: 10000 })
const dc = def("DOCS", docsSamples, { maxTokens: 10000 })
const dc = def("DOCS", docsSamples, { maxTokens: 10000, ignoreEmpty: true })

$`
You are an expert at writing GenAIScript programs.
Expand All @@ -46,4 +47,7 @@ using the information found in ${sn} and ${dc}.
- Do not use any external services
- The example should have less than 5 lines of code
- Use pseudo code if necessary
- use descriptive file names
- The script runs in node.js
`
defFileOutput("packages/auto/*.genai.mts", "Generated genaiscript programs")
21 changes: 21 additions & 0 deletions genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/auto/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
genaiscript.d.ts -diff merge=ours linguist-generated
6 changes: 6 additions & 0 deletions packages/auto/capture_screenshot.genai.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Launch a browser instance and navigate to a specified URL
const page = await host.browse('https://example.com');
// Take a screenshot of the current page view
const screenshot = await page.screenshot();
// Register the screenshot for subsequent analysis
defImages(screenshot);
Loading

0 comments on commit d71b395

Please sign in to comment.