Skip to content

支持按对话次数收费,支持使用 OpenAI 返回的 usage 信息计费 #54

支持按对话次数收费,支持使用 OpenAI 返回的 usage 信息计费

支持按对话次数收费,支持使用 OpenAI 返回的 usage 信息计费 #54

Workflow file for this run

name: Admin test
on:
push:
paths:
- "admin/**"
pull_request:
jobs:
eslint:
if: github.repository == 'imiphp/imi-ai'
runs-on: ubuntu-20.04
defaults:
run:
working-directory: admin
steps:
- uses: actions/checkout@v3
- name: Set node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node
restore-keys: ${{ runner.os }}-node
- name: Install
run: npm i
- name: Lint
run: npm run lint
vue-tsc:
if: github.repository == 'imiphp/imi-ai'
runs-on: ubuntu-20.04
defaults:
run:
working-directory: admin
steps:
- uses: actions/checkout@v3
- name: Set node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node
restore-keys: ${{ runner.os }}-node
- name: Install
run: npm i
- name: Typecheck
run: npm run typecheck