Add support for streaming and fixes few issues (see description) (#202)

This commit is contained in:
José Ulises Niño Rivera 2024-10-28 20:05:06 -04:00 committed by GitHub
parent 29ff8da60f
commit 662a840ac5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 2266 additions and 477 deletions

View file

@ -1,35 +0,0 @@
name: Checks
on:
pull_request:
push:
branches: [main]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
run: rustup toolchain install stable --profile minimal
- name: Setup | Install wasm toolchain
run: rustup target add wasm32-wasi
- name: Run Tests on common crate
run: cd crates/common && cargo test
- name: Build wasm module for prompt_gateway
run: cd crates/prompt_gateway && cargo build --release --target=wasm32-wasi
- name: Run Tests on prompt_gateway crate
run: cd crates/prompt_gateway && cargo test
- name: Build wasm module for llm_gateway
run: cd crates/llm_gateway && cargo build --release --target=wasm32-wasi
- name: Run Tests on llm_gateway crate
run: cd crates/llm_gateway && cargo test

32
.github/workflows/e2e_tests.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: e2e tests
on:
push:
branches:
- main # Run tests on pushes to the main branch
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
- name: Run e2e tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
run: |
cd e2e_tests && bash run_e2e_tests.sh

View file

@ -1,4 +1,4 @@
name: Run Model Server tests
name: model server tests
on:
push:

33
.github/workflows/rust_tests.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: rust tests (prompt and llm gateway)
on:
pull_request:
push:
branches: [main]
jobs:
test:
name: Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./crates
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
run: rustup toolchain install stable --profile minimal
- name: Setup | Install wasm toolchain
run: rustup target add wasm32-wasi
- name: Build wasm module
run: cargo build --release --target=wasm32-wasi
- name: Run unit tests
run: cargo test --lib
- name: Run integration tests
run: cargo test --test integration