Run Examples #4275
This file contains hidden or 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
name: Run Examples | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: # Allows manual triggering | |
schedule: | |
- cron: '0 * * * *' # every hour | |
jobs: | |
chat: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | |
run: | | |
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" | |
yarn install | |
- name: Run chat.ts | |
env: | |
LLAMA_API_KEY: ${{ secrets.LLAMA_API_KEY }} | |
run: | | |
yarn tsn -T examples/chat.ts | |
structured: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | |
run: | | |
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" | |
yarn install | |
- name: Run structured.ts | |
env: | |
LLAMA_API_KEY: ${{ secrets.LLAMA_API_KEY }} | |
run: | | |
yarn tsn -T examples/structured.ts | |
tool_call: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | |
run: | | |
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" | |
yarn install | |
- name: Run tool_call.ts | |
env: | |
LLAMA_API_KEY: ${{ secrets.LLAMA_API_KEY }} | |
run: | | |
yarn tsn -T examples/tool_call.ts | |
vision: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | |
run: | | |
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" | |
yarn install | |
- name: Run vision.ts | |
env: | |
LLAMA_API_KEY: ${{ secrets.LLAMA_API_KEY }} | |
run: | | |
yarn tsn -T examples/vision.ts |