Skip to content

Fix tests, improve prompts #2185

Fix tests, improve prompts

Fix tests, improve prompts #2185

Workflow file for this run

name: Manually run OpenAI tests
on:
pull_request:
types:
- labeled
- opened
- reopened
- synchronize
jobs:
test-openai:
name: Run tests
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'test-openai')
env:
# Use ARMv8.2 to avoid i8mm instruction issues on GitHub runners
NODE_LLAMA_CPP_CMAKE_OPTION_GGML_NATIVE: "OFF"
NODE_LLAMA_CPP_CMAKE_OPTION_GGML_CPU_ARM_ARCH: "armv8.2-a+dotprod"
steps:
- uses: actions/checkout@v4
- name: Cache test model
id: cache-model
uses: actions/cache@v4
with:
path: /Users/runner/.humanifyjs/models/
key: models-phi
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm install --ci
- name: Build node-llama-cpp with correct ARM architecture
run: npx node-llama-cpp source download --gpu false
- run: npm run build
- run: npm run download-ci-model
- run: npm run test:openai
env:
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}}