-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
698 changed files
with
47,607 additions
and
57,176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.genaiscript/ | ||
node_modules/ | ||
built/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
node_modules/ | ||
.env | ||
slides/ | ||
graphics/ | ||
temp/ | ||
.genaiscript/ | ||
.github/ | ||
.vscode/ | ||
demo/ | ||
packages/samples/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: genai commit tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 7 * * *" | ||
push: | ||
branches: [main] | ||
paths: | ||
- "packages/core/**" | ||
- "packages/sample/**" | ||
- "packages/cli/**" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- name: typecheck | ||
run: yarn typecheck | ||
- name: compile | ||
run: yarn compile | ||
- name: download ollama docker | ||
run: docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama | ||
- name: generate dummy result | ||
working-directory: packages/sample | ||
run: mkdir -p temp && touch temp/commit-tests.txt | ||
- name: select llm tests to run | ||
run: node packages/cli/built/genaiscript.cjs run test-commit --out-trace $GITHUB_STEP_SUMMARY --model azure_serverless:gpt-4o --small-model azure_serverless:gpt-4o-mini | ||
env: | ||
AZURE_SERVERLESS_OPENAI_API_ENDPOINT: ${{ secrets.AZURE_SERVERLESS_OPENAI_API_ENDPOINT }} | ||
AZURE_SERVERLESS_OPENAI_API_KEY: ${{ secrets.AZURE_SERVERLESS_OPENAI_API_KEY }} | ||
- name: run llm tests | ||
working-directory: packages/sample | ||
run: xargs -r -a temp/commit-tests.txt node ../cli/built/genaiscript.cjs test --out-summary $GITHUB_STEP_SUMMARY --test-delay 10 --model azure_serverless:gpt-4o --small-model azure_serverless:gpt-4o-mini | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
AZURE_SERVERLESS_OPENAI_API_ENDPOINT: ${{ secrets.AZURE_SERVERLESS_OPENAI_API_ENDPOINT }} | ||
AZURE_SERVERLESS_OPENAI_API_KEY: ${{ secrets.AZURE_SERVERLESS_OPENAI_API_KEY }} | ||
WEATHER_API_KEY: ${{ secrets.WEATHER_API_KEY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: az login with service principal | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Azure Login action | ||
uses: azure/login@v2 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- name: typecheck | ||
run: yarn typecheck | ||
- name: compile | ||
run: yarn compile | ||
- name: run script with azure deployment | ||
run: node packages/cli/built/genaiscript.cjs run poem --model azure:gpt-4-turbo --out-trace $GITHUB_STEP_SUMMARY | ||
env: | ||
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: genai blog post generator | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 9 * * *" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 10 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- name: compile | ||
run: yarn compile | ||
- name: generate blog post | ||
run: yarn genai:blog-post --out-trace $GITHUB_STEP_SUMMARY | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }} | ||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} | ||
- name: docs | ||
run: yarn build:docs | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
file_pattern: "docs/src/content/docs/blog/drafts/*.md" | ||
commit_message: "[genai] generated blog posts" | ||
commit_user_name: "genaiscript" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: genai investigator | ||
on: | ||
workflow_run: | ||
workflows: ["build", "playwright", "ollama"] | ||
types: | ||
- completed | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.workflow_run.event }}-${{ github.event.workflow_run.conclusion }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
actions: read | ||
pull-requests: write | ||
jobs: | ||
investigate: | ||
# Only run this job if the workflow run concluded with a failure | ||
# and was triggered by a pull request event | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 10 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- name: compile | ||
run: yarn compile | ||
- name: genaiscript gai | ||
run: node packages/cli/built/genaiscript.cjs run gai -pr ${{ github.event.workflow_run.pull_requests[0].number }} -prc --vars "workflow=${{ github.event.workflow_run.workflow_id }}" --vars "failure_run_id=${{ github.event.workflow_run.id }}" --out-trace $GITHUB_STEP_SUMMARY | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }} | ||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} | ||
GENAISCRIPT_VAR_BRANCH: ${{ github.event.workflow_run.head_branch }} | ||
- name: genaiscript github-agent | ||
run: node packages/cli/built/genaiscript.cjs run github-agent -pr ${{ github.event.workflow_run.pull_requests[0].number }} -prc --vars "workflow=${{ github.event.workflow_run.workflow_id }}" --vars "failure_run_id=${{ github.event.workflow_run.id }}" --out-trace $GITHUB_STEP_SUMMARY | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }} | ||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} | ||
GENAISCRIPT_VAR_BRANCH: ${{ github.event.workflow_run.head_branch }} | ||
- name: genaiscript github-one | ||
run: node packages/cli/built/genaiscript.cjs run github-one -pr ${{ github.event.workflow_run.pull_requests[0].number }} -prc --vars "workflow=${{ github.event.workflow_run.workflow_id }}" --vars "failure_run_id=${{ github.event.workflow_run.id }}" --out-trace $GITHUB_STEP_SUMMARY | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }} | ||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} | ||
GENAISCRIPT_VAR_BRANCH: ${{ github.event.workflow_run.head_branch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Read and Echo Files | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
read_and_echo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Read and echo files | ||
run: | | ||
for file in $(ls | head -n 10); do | ||
echo "Contents of $file:" | ||
cat "$file" | ||
echo "" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Publish package to GitHub Packages | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
registry-url: "https://npm.pkg.github.com" | ||
cache: yarn | ||
- run: yarn install | ||
- run: yarn compile | ||
- run: yarn publish | ||
working-directory: packages/cli | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.