Skip to content

feat: Add count tokens method to vertex_ai client #325

feat: Add count tokens method to vertex_ai client

feat: Add count tokens method to vertex_ai client #325

Workflow file for this run

name: Test
on:
# pull_request_target is dangerous! Review external PRs code before approving to run the workflow
# We need this to be able to access the secrets required by the workflow
pull_request_target:
workflow_dispatch:
# Cancel currently running workflow when a new one is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
name: Run Linter & Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: "${{ github.event.pull_request.base.sha }}" # Required for pull_request_target
fetch-depth: 0
- name: Install Flutter
uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225
with:
channel: 'stable'
- name: Set-up Flutter
run: |
flutter config --no-analytics
dart --disable-analytics
- name: Clear pub cache
run: flutter pub cache clean
- name: Install Melos
uses: bluefireteam/melos-action@720a109b686f61979b4f9f0d14f582ab1637647e
- name: Run linter
run: melos lint:diff
- name: Run unit tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
VERTEX_AI_PROJECT_ID: ${{ secrets.VERTEX_AI_PROJECT_ID }}
VERTEX_AI_SERVICE_ACCOUNT: ${{ secrets.VERTEX_AI_SERVICE_ACCOUNT }}
run: melos test:diff