From 6bbfce4c5e80a63f516dd695a07a26336a8e579e Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 21:51:29 +0200 Subject: [PATCH 01/45] workflow for cli commands --- .github/workflows/agenta-cli-test.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/agenta-cli-test.yml diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml new file mode 100644 index 0000000000..104d099ac5 --- /dev/null +++ b/.github/workflows/agenta-cli-test.yml @@ -0,0 +1,44 @@ +name: Agenta CLI Workflow + +on: + pull_request: + paths: + - "agenta-backend/**" + - "agenta-cli/**" + +jobs: + run-agenta: + runs-on: ubuntu-latest + environment: oss + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + + - name: Configure Poetry + run: | + poetry config virtualenvs.in-project true + + - name: Install dependencies + run: | + cd agenta-cli + poetry install + + - name: Initialize Agenta + env: + BACKEND_HOST: ${{ secrets.BACKEND_HOST }} + run: | + cd ../examples/baby_name_generator + poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST + + - name: Serve Application + run: | + poetry run agenta variant serve --file_name app.py \ No newline at end of file From 63e824264f24fb12b60e80b78de309f3c4e3c39f Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 21:53:37 +0200 Subject: [PATCH 02/45] comment paths to test --- .github/workflows/agenta-cli-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 104d099ac5..0d6a755baa 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -2,9 +2,9 @@ name: Agenta CLI Workflow on: pull_request: - paths: - - "agenta-backend/**" - - "agenta-cli/**" + # paths: + # - "agenta-backend/**" + # - "agenta-cli/**" jobs: run-agenta: From b2f349ed197d68dbf5918a1506c354d678a3bdfb Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 21:55:25 +0200 Subject: [PATCH 03/45] fix path --- .github/workflows/agenta-cli-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 0d6a755baa..4a84e3b3b2 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -36,7 +36,8 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd ../examples/baby_name_generator + pwd + cd ./../examples/baby_name_generator poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application From 36a9af5dfad98249326f3832a6e7a3636af577a0 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 21:56:28 +0200 Subject: [PATCH 04/45] fix path --- .github/workflows/agenta-cli-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 4a84e3b3b2..614cbe73d1 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -36,8 +36,7 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - pwd - cd ./../examples/baby_name_generator + cd ./examples/baby_name_generator poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application From 71e4e6b2b7f3c0b143c9da230adc232b3149b2dd Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:02:53 +0200 Subject: [PATCH 05/45] fix path --- .github/workflows/agenta-cli-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 614cbe73d1..0b5c4300cf 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -36,7 +36,7 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd ./examples/baby_name_generator + cd examples/baby_name_generator poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application From acc76f190f0969d62373c87d2fc05f56b6fa65a3 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:07:18 +0200 Subject: [PATCH 06/45] remove poetry run --- .github/workflows/agenta-cli-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 0b5c4300cf..7333caa237 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -31,14 +31,17 @@ jobs: run: | cd agenta-cli poetry install + poetry shell - name: Initialize Agenta env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | + pwd + ls agenta cd examples/baby_name_generator - poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST + agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application run: | - poetry run agenta variant serve --file_name app.py \ No newline at end of file + agenta variant serve --file_name app.py \ No newline at end of file From 8fcc861a8c8d2c39341bfdc17992dc1e93dd5a62 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:09:44 +0200 Subject: [PATCH 07/45] remove poetry shell --- .github/workflows/agenta-cli-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 7333caa237..29abe36898 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -31,7 +31,6 @@ jobs: run: | cd agenta-cli poetry install - poetry shell - name: Initialize Agenta env: @@ -40,8 +39,8 @@ jobs: pwd ls agenta cd examples/baby_name_generator - agenta init --app_name woooo --backend_host $BACKEND_HOST + poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - name: Serve Application run: | - agenta variant serve --file_name app.py \ No newline at end of file + poetry run agenta variant serve --file_name app.py \ No newline at end of file From b23c4a92c2a566d2be0c412d2539c5288be0b239 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:11:58 +0200 Subject: [PATCH 08/45] add all in 1 step --- .github/workflows/agenta-cli-test.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 29abe36898..3ce22dc7e2 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -28,19 +28,13 @@ jobs: poetry config virtualenvs.in-project true - name: Install dependencies - run: | - cd agenta-cli - poetry install - - - name: Initialize Agenta env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | + cd agenta-cli + poetry install pwd ls agenta - cd examples/baby_name_generator + cd ../examples/baby_name_generator poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - - - name: Serve Application - run: | poetry run agenta variant serve --file_name app.py \ No newline at end of file From 082258f68b5b5ab977d357d3651af558cad9e0f9 Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:14:12 +0200 Subject: [PATCH 09/45] ls --- .github/workflows/agenta-cli-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 3ce22dc7e2..3946c6af1a 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -34,7 +34,7 @@ jobs: cd agenta-cli poetry install pwd - ls agenta cd ../examples/baby_name_generator + ls poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST poetry run agenta variant serve --file_name app.py \ No newline at end of file From 10ee324fed5f5cfa6d9b86e369da248b500c78dc Mon Sep 17 00:00:00 2001 From: aakrem Date: Mon, 6 May 2024 22:24:46 +0200 Subject: [PATCH 10/45] run from agenta-cli --- .github/workflows/agenta-cli-test.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 3946c6af1a..fe30113179 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -27,14 +27,12 @@ jobs: run: | poetry config virtualenvs.in-project true - - name: Install dependencies + - name: Initialize Agenta env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd agenta-cli - poetry install - pwd - cd ../examples/baby_name_generator - ls - poetry run agenta init --app_name woooo --backend_host $BACKEND_HOST - poetry run agenta variant serve --file_name app.py \ No newline at end of file + poetry run python ../../agenta-cli/agenta init --app_name woooo --backend_host $BACKEND_HOST + + - name: Serve Application + run: | + poetry run python ../../agenta-cli/agenta variant serve --file_name app.py \ No newline at end of file From 303eecc01466fc324841d8a07d34cc0edb6f50f9 Mon Sep 17 00:00:00 2001 From: aakrem Date: Wed, 15 May 2024 19:51:05 +0200 Subject: [PATCH 11/45] add workflow for cli commands --- .github/workflows/agenta-cli-test.yml | 85 ++++++++++++++++----------- 1 file changed, 52 insertions(+), 33 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index fe30113179..ce0324c418 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -1,38 +1,57 @@ name: Agenta CLI Workflow on: - pull_request: - # paths: - # - "agenta-backend/**" - # - "agenta-cli/**" + pull_request: + # paths: + # - "agenta-backend/**" + # - "agenta-cli/**" jobs: - run-agenta: - runs-on: ubuntu-latest - environment: oss - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python 3.9 - uses: actions/setup-python@v5 - with: - python-version: '3.9' - - - name: Install Poetry - run: | - curl -sSL https://install.python-poetry.org | python3 - - - - name: Configure Poetry - run: | - poetry config virtualenvs.in-project true - - - name: Initialize Agenta - env: - BACKEND_HOST: ${{ secrets.BACKEND_HOST }} - run: | - poetry run python ../../agenta-cli/agenta init --app_name woooo --backend_host $BACKEND_HOST - - - name: Serve Application - run: | - poetry run python ../../agenta-cli/agenta variant serve --file_name app.py \ No newline at end of file + run-agenta-cli: + runs-on: ubuntu-latest + environment: oss + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Set up python + id: setup-python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: | + cd agenta-cli + poetry install --no-interaction --no-root + + + - name: Run agenta commands in different directory + env: + BACKEND_HOST: ${{ secrets.BACKEND_HOST }} + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: | + source .venv/bin/activate + cd examples/baby_name_generator + agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} + agenta variant serve --file_name app.py + agenta variant serve --file_name app.py --overwrite + + # - name: Create .env file + # run: | + # echo "OPEN_API_KEY=${{ secrets.OPEN_API_KEY }}" > .env + # working-directory: examples/baby_name_generator \ No newline at end of file From f42eed76e40797ff8e0946dd581bfbb422f9a0ab Mon Sep 17 00:00:00 2001 From: aakrem Date: Wed, 15 May 2024 21:26:31 +0200 Subject: [PATCH 12/45] initial workflow --- .github/workflows/agenta-cli-test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index ce0324c418..b6f5ac9123 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -13,6 +13,7 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 + - name: Set up python id: setup-python uses: actions/setup-python@v5 @@ -32,6 +33,8 @@ jobs: with: path: .venv key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + restore-keys: | + venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}- - name: Install dependencies if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' @@ -39,14 +42,13 @@ jobs: cd agenta-cli poetry install --no-interaction --no-root - - name: Run agenta commands in different directory env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: | - source .venv/bin/activate - cd examples/baby_name_generator + cd agenta-cli + source $(poetry env info --path)/bin/activate + cd ../examples/baby_name_generator agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} agenta variant serve --file_name app.py agenta variant serve --file_name app.py --overwrite @@ -54,4 +56,4 @@ jobs: # - name: Create .env file # run: | # echo "OPEN_API_KEY=${{ secrets.OPEN_API_KEY }}" > .env - # working-directory: examples/baby_name_generator \ No newline at end of file + # working-directory: examples/baby_name_generator From 1908bbf1912e650c976717a8dff29f9d760cc06d Mon Sep 17 00:00:00 2001 From: aakrem Date: Wed, 15 May 2024 21:33:17 +0200 Subject: [PATCH 13/45] use poetry run --- .github/workflows/agenta-cli-test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index b6f5ac9123..adde23a3aa 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -47,11 +47,9 @@ jobs: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | cd agenta-cli - source $(poetry env info --path)/bin/activate - cd ../examples/baby_name_generator - agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} - agenta variant serve --file_name app.py - agenta variant serve --file_name app.py --overwrite + poetry run agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} + poetry run agenta variant serve --file_name ../examples/baby_name_generator/app.py + poetry run agenta variant serve --file_name ../examples/baby_name_generator/app.py --overwrite # - name: Create .env file # run: | From af564e28216b2a70df969aa3fc7378c27df61773 Mon Sep 17 00:00:00 2001 From: aakrem Date: Wed, 15 May 2024 21:43:43 +0200 Subject: [PATCH 14/45] use poetry shell --- .github/workflows/agenta-cli-test.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index adde23a3aa..5f54d046e6 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -42,15 +42,18 @@ jobs: cd agenta-cli poetry install --no-interaction --no-root - - name: Run agenta commands in different directory + - name: Activate virtual environment and run agenta commands env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | cd agenta-cli - poetry run agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} - poetry run agenta variant serve --file_name ../examples/baby_name_generator/app.py - poetry run agenta variant serve --file_name ../examples/baby_name_generator/app.py --overwrite - + poetry shell + cd ../examples/baby_name_generator + agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} + agenta variant serve --file_name app.py + agenta variant serve --file_name app.py --overwrite + shell: bash + # - name: Create .env file # run: | # echo "OPEN_API_KEY=${{ secrets.OPEN_API_KEY }}" > .env From 4f50e08fbf530c817541080909c83896a9c80197 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Thu, 16 May 2024 09:14:50 +0100 Subject: [PATCH 15/45] Fixed server URL in openai.json configuration file --- docs/reference/reference/backend_api/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/reference/backend_api/openapi.json b/docs/reference/reference/backend_api/openapi.json index f206730a09..06200605f2 100644 --- a/docs/reference/reference/backend_api/openapi.json +++ b/docs/reference/reference/backend_api/openapi.json @@ -6,7 +6,7 @@ }, "servers": [ { - "url": "/api" + "url": "https://docs.agenta.ai" } ], "paths": { From f724a4d85cbfac28cb65e1e9131f7c956f42a577 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 11:12:35 +0200 Subject: [PATCH 16/45] source virtual env in each step --- .github/workflows/agenta-cli-test.yml | 34 +++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 5f54d046e6..cef42f896a 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -37,23 +37,43 @@ jobs: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}- - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: | cd agenta-cli poetry install --no-interaction --no-root - - name: Activate virtual environment and run agenta commands + - name: Run agenta init env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | cd agenta-cli - poetry shell + source $(poetry env info --path)/bin/activate cd ../examples/baby_name_generator - agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} - agenta variant serve --file_name app.py - agenta variant serve --file_name app.py --overwrite + poetry run agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} shell: bash - + continue-on-error: false + + - name: Run agenta variant serve + env: + BACKEND_HOST: ${{ secrets.BACKEND_HOST }} + run: | + cd agenta-cli + source $(poetry env info --path)/bin/activate + cd ../examples/baby_name_generator + poetry run agenta variant serve --file_name app.py + shell: bash + continue-on-error: false + + - name: Run agenta variant serve with overwrite + env: + BACKEND_HOST: ${{ secrets.BACKEND_HOST }} + run: | + cd agenta-cli + source $(poetry env info --path)/bin/activate + cd ../examples/baby_name_generator + poetry run agenta variant serve --file_name app.py --overwrite + shell: bash + continue-on-error: false + # - name: Create .env file # run: | # echo "OPEN_API_KEY=${{ secrets.OPEN_API_KEY }}" > .env From 4edf551a2782784b4895b2c5057e587d7d7e8ce2 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 12:32:54 +0200 Subject: [PATCH 17/45] switch to pip --- .github/workflows/agenta-cli-test.yml | 47 +++++++++------------------ 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index cef42f896a..920d76b874 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -20,35 +20,25 @@ jobs: with: python-version: "3.12" - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v3 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - restore-keys: | - venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}- - - name: Install dependencies run: | + python -m pip install --upgrade pip setuptools + pip install poetry cd agenta-cli poetry install --no-interaction --no-root + pip install -e . + + - name: Create .env file + run: | + echo "OPEN_API_KEY=${{ secrets.OPEN_API_KEY }}" > .env + working-directory: examples/baby_name_generator - name: Run agenta init env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd agenta-cli - source $(poetry env info --path)/bin/activate - cd ../examples/baby_name_generator - poetry run agenta init --app_name woooo --backend_host ${{ secrets.BACKEND_HOST }} + cd examples/baby_name_generator + agenta init --app_name woooo2 --backend_host ${{ secrets.BACKEND_HOST }} shell: bash continue-on-error: false @@ -56,10 +46,8 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd agenta-cli - source $(poetry env info --path)/bin/activate - cd ../examples/baby_name_generator - poetry run agenta variant serve --file_name app.py + cd examples/baby_name_generator + agenta variant serve --file_name app.py shell: bash continue-on-error: false @@ -67,14 +55,9 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | - cd agenta-cli - source $(poetry env info --path)/bin/activate - cd ../examples/baby_name_generator - poetry run agenta variant serve --file_name app.py --overwrite + cd examples/baby_name_generator + agenta variant serve --file_name app.py --overwrite shell: bash continue-on-error: false - # - name: Create .env file - # run: | - # echo "OPEN_API_KEY=${{ secrets.OPEN_API_KEY }}" > .env - # working-directory: examples/baby_name_generator + From 10ed1b5d43216a3329e56ea860ab33fd1c4bb7e6 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 12:42:51 +0200 Subject: [PATCH 18/45] random app name --- .github/workflows/agenta-cli-test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 920d76b874..d2b1a4b320 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -23,10 +23,9 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip setuptools - pip install poetry cd agenta-cli - poetry install --no-interaction --no-root pip install -e . + poetry install --no-interaction - name: Create .env file run: | @@ -37,8 +36,9 @@ jobs: env: BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | + APP_NAME="gh-cli-$(shuf -i 1000-9999 -n 1)" cd examples/baby_name_generator - agenta init --app_name woooo2 --backend_host ${{ secrets.BACKEND_HOST }} + agenta init --app_name $APP_NAME --backend_host ${{ secrets.BACKEND_HOST }} shell: bash continue-on-error: false @@ -59,5 +59,3 @@ jobs: agenta variant serve --file_name app.py --overwrite shell: bash continue-on-error: false - - From 56aac427b19e07c92551364b07ddb31e60b9fe48 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 12:47:48 +0200 Subject: [PATCH 19/45] removing poetry --- .github/workflows/agenta-cli-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index d2b1a4b320..56521928aa 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -23,9 +23,9 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip setuptools + pip install poetry cd agenta-cli pip install -e . - poetry install --no-interaction - name: Create .env file run: | From b386cadd94625b9cfb1e04d074e34a5e4a5ae4dc Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 12:51:05 +0200 Subject: [PATCH 20/45] add paths --- .github/workflows/agenta-cli-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 56521928aa..9851af6f50 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -2,9 +2,9 @@ name: Agenta CLI Workflow on: pull_request: - # paths: - # - "agenta-backend/**" - # - "agenta-cli/**" + paths: + - "agenta-backend/**" + - "agenta-cli/**" jobs: run-agenta-cli: From e44036972c9e8a26cb997c5b4d351247bb5f6ee8 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 14:12:45 +0200 Subject: [PATCH 21/45] rename workflow --- .github/workflows/agenta-cli-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/agenta-cli-test.yml index 9851af6f50..34427be305 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/agenta-cli-test.yml @@ -1,4 +1,4 @@ -name: Agenta CLI Workflow +name: agenta-cli commands on: pull_request: From 226a44e2494a435b578028ddec932ee5526a73de Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 14:20:05 +0200 Subject: [PATCH 22/45] rename file and workflow --- .../workflows/{agenta-cli-test.yml => cli-commands-tests.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{agenta-cli-test.yml => cli-commands-tests.yml} (98%) diff --git a/.github/workflows/agenta-cli-test.yml b/.github/workflows/cli-commands-tests.yml similarity index 98% rename from .github/workflows/agenta-cli-test.yml rename to .github/workflows/cli-commands-tests.yml index 34427be305..a9dde248a2 100644 --- a/.github/workflows/agenta-cli-test.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -1,4 +1,4 @@ -name: agenta-cli commands +name: cli commands tests on: pull_request: From 74531a95541fbcb1a9deca9da138ed8b85493b6c Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 15:47:39 +0200 Subject: [PATCH 23/45] remove not needed envs --- .github/workflows/cli-commands-tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index a9dde248a2..94e88caa13 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -29,12 +29,10 @@ jobs: - name: Create .env file run: | - echo "OPEN_API_KEY=${{ secrets.OPEN_API_KEY }}" > .env + echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" > .env working-directory: examples/baby_name_generator - name: Run agenta init - env: - BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | APP_NAME="gh-cli-$(shuf -i 1000-9999 -n 1)" cd examples/baby_name_generator @@ -43,8 +41,6 @@ jobs: continue-on-error: false - name: Run agenta variant serve - env: - BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | cd examples/baby_name_generator agenta variant serve --file_name app.py @@ -52,8 +48,6 @@ jobs: continue-on-error: false - name: Run agenta variant serve with overwrite - env: - BACKEND_HOST: ${{ secrets.BACKEND_HOST }} run: | cd examples/baby_name_generator agenta variant serve --file_name app.py --overwrite From 2544b8d1815955d68544385b6d3b2f99ca5d8111 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 15:48:22 +0200 Subject: [PATCH 24/45] test --- .github/workflows/cli-commands-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index 94e88caa13..c5115a6d15 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -2,9 +2,9 @@ name: cli commands tests on: pull_request: - paths: - - "agenta-backend/**" - - "agenta-cli/**" + # paths: + # - "agenta-backend/**" + # - "agenta-cli/**" jobs: run-agenta-cli: From 16cd527340e3912ae45367424fec5a6d1da3418f Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 16:20:08 +0200 Subject: [PATCH 25/45] rename openai key name --- .github/workflows/cli-commands-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index c5115a6d15..790e0b57d9 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -29,7 +29,7 @@ jobs: - name: Create .env file run: | - echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" > .env + echo "OPENAI_API_KEY=${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}" > .env working-directory: examples/baby_name_generator - name: Run agenta init From cde47b7b1b929b688ce8d60d91d90a32114dd076 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 16:23:26 +0200 Subject: [PATCH 26/45] uncomment code --- .github/workflows/cli-commands-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index 790e0b57d9..12312e6107 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -2,9 +2,9 @@ name: cli commands tests on: pull_request: - # paths: - # - "agenta-backend/**" - # - "agenta-cli/**" + paths: + - "agenta-backend/**" + - "agenta-cli/**" jobs: run-agenta-cli: From d78136b65f157de57eaf4f298d477b927d8b619d Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 19:20:30 +0200 Subject: [PATCH 27/45] add organisation as cli option --- agenta-cli/agenta/cli/main.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/agenta-cli/agenta/cli/main.py b/agenta-cli/agenta/cli/main.py index 7bb43b6831..d1170adc1f 100644 --- a/agenta-cli/agenta/cli/main.py +++ b/agenta-cli/agenta/cli/main.py @@ -80,7 +80,8 @@ def cli(): @click.command() @click.option("--app_name", default="") @click.option("--backend_host", default="") -def init(app_name: str, backend_host: str): +@click.option("--organisation", default="") +def init(app_name: str, backend_host: str, organisation: str): init_option = "Blank App" if backend_host != "" and app_name != "" else "" """Initialize a new Agenta app with the template files.""" @@ -171,18 +172,17 @@ def init(app_name: str, backend_host: str): filtered_org = None if where_question == "On agenta cloud": - which_organization = questionary.select( - "Which organization do you want to create the app for?", - choices=[ - f"{org.name}: {org.description}" for org in user_organizations - ], - ).ask() + if not organisation: + which_organization = questionary.select( + "Which organization do you want to create the app for?", + choices=[ + f"{org.name}: {org.description}" for org in user_organizations + ], + ).ask() + organisation = which_organization.split(":")[0] + filtered_org = next( - ( - org - for org in user_organizations - if org.name == which_organization.split(":")[0] - ), + (org for org in user_organizations if org.name == organisation), None, ) From aa5a0ec849a7d19f8e2b8f777209dfb0cda16241 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 19:21:17 +0200 Subject: [PATCH 28/45] add cli commands for cloud --- .github/workflows/cli-commands-tests.yml | 55 ++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index 12312e6107..c666b49b8d 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -2,12 +2,12 @@ name: cli commands tests on: pull_request: - paths: - - "agenta-backend/**" - - "agenta-cli/**" + # paths: + # - "agenta-backend/**" + # - "agenta-cli/**" jobs: - run-agenta-cli: + serve-to-oss: runs-on: ubuntu-latest environment: oss steps: @@ -53,3 +53,50 @@ jobs: agenta variant serve --file_name app.py --overwrite shell: bash continue-on-error: false + + serve-to-cloud: + runs-on: ubuntu-latest + environment: oss + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up python + id: setup-python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + pip install poetry + cd agenta-cli + pip install -e . + + - name: Create .env file + run: | + echo "OPENAI_API_KEY=${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}" > .env + working-directory: examples/baby_name_generator + + - name: Run agenta init + run: | + APP_NAME="gh-cli-$(shuf -i 1000-9999 -n 1)" + cd examples/baby_name_generator + AGENTA_API_KEY=${{ secrets.AGENTA_API_KEY }} agenta init --app_name $APP_NAME --backend_host https://cloud.agenta.ai --organisation team + shell: bash + continue-on-error: false + + - name: Run agenta variant serve + run: | + cd examples/baby_name_generator + agenta variant serve --file_name app.py + shell: bash + continue-on-error: false + + - name: Run agenta variant serve with overwrite + run: | + cd examples/baby_name_generator + agenta variant serve --file_name app.py --overwrite + shell: bash + continue-on-error: false From ec7146c12d98a7b0a1610fd959a24791193953ae Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 20:36:17 +0200 Subject: [PATCH 29/45] rename app name --- .github/workflows/cli-commands-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index c666b49b8d..66183726ff 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -34,7 +34,7 @@ jobs: - name: Run agenta init run: | - APP_NAME="gh-cli-$(shuf -i 1000-9999 -n 1)" + APP_NAME="gh-cli-$(date +'%y-%m-%d_%H-%M-%S')" cd examples/baby_name_generator agenta init --app_name $APP_NAME --backend_host ${{ secrets.BACKEND_HOST }} shell: bash @@ -81,7 +81,7 @@ jobs: - name: Run agenta init run: | - APP_NAME="gh-cli-$(shuf -i 1000-9999 -n 1)" + APP_NAME="gh-cli-$(date +'%y-%m-%d_%H-%M-%S')" cd examples/baby_name_generator AGENTA_API_KEY=${{ secrets.AGENTA_API_KEY }} agenta init --app_name $APP_NAME --backend_host https://cloud.agenta.ai --organisation team shell: bash From f2d51cf9acc9d3428f026c409eab4e1dc52a9fe1 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 20:39:29 +0200 Subject: [PATCH 30/45] remove temp commented code --- .github/workflows/cli-commands-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index 66183726ff..7a9d7fb852 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -2,9 +2,9 @@ name: cli commands tests on: pull_request: - # paths: - # - "agenta-backend/**" - # - "agenta-cli/**" + paths: + - "agenta-backend/**" + - "agenta-cli/**" jobs: serve-to-oss: From 6a3717dd58f0171b02247b32140b96b7bb75b873 Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 16 May 2024 20:45:41 +0200 Subject: [PATCH 31/45] adjust date format --- .github/workflows/cli-commands-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index 7a9d7fb852..95168f5923 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -34,7 +34,7 @@ jobs: - name: Run agenta init run: | - APP_NAME="gh-cli-$(date +'%y-%m-%d_%H-%M-%S')" + APP_NAME="gh-cli-$(date +'%d-%m-%y_%H-%M-%S')" cd examples/baby_name_generator agenta init --app_name $APP_NAME --backend_host ${{ secrets.BACKEND_HOST }} shell: bash @@ -81,7 +81,7 @@ jobs: - name: Run agenta init run: | - APP_NAME="gh-cli-$(date +'%y-%m-%d_%H-%M-%S')" + APP_NAME="gh-cli-$(date +'%d-%m-%y_%H-%M-%S')" cd examples/baby_name_generator AGENTA_API_KEY=${{ secrets.AGENTA_API_KEY }} agenta init --app_name $APP_NAME --backend_host https://cloud.agenta.ai --organisation team shell: bash From 2368af6ea78751a98981e0d4c9174359933935e2 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Fri, 17 May 2024 07:55:50 +0100 Subject: [PATCH 32/45] updated openapi version --- docs/reference/reference/backend_api/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/reference/backend_api/openapi.json b/docs/reference/reference/backend_api/openapi.json index 06200605f2..c42bba4a0e 100644 --- a/docs/reference/reference/backend_api/openapi.json +++ b/docs/reference/reference/backend_api/openapi.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.2", + "openapi": "3.1.0", "info": { "title": "FastAPI", "version": "0.1.0" From c2b340a798c8df2580a638111c66a27997f70e03 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Fri, 17 May 2024 08:00:48 +0100 Subject: [PATCH 33/45] test v1 --- docs/reference/reference/backend_api/openapi.json | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/reference/reference/backend_api/openapi.json b/docs/reference/reference/backend_api/openapi.json index c42bba4a0e..364653a71b 100644 --- a/docs/reference/reference/backend_api/openapi.json +++ b/docs/reference/reference/backend_api/openapi.json @@ -14,6 +14,7 @@ "get": { "summary": "User Profile", "operationId": "user_profile_profile__get", + "description": "An enumeration.", "responses": { "200": { "description": "Successful Response", From c5210c1f30e7c21315435610e084b63a268ebaf7 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Fri, 17 May 2024 08:01:28 +0100 Subject: [PATCH 34/45] revert changes --- docs/reference/reference/backend_api/openapi.json | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/reference/reference/backend_api/openapi.json b/docs/reference/reference/backend_api/openapi.json index 364653a71b..c42bba4a0e 100644 --- a/docs/reference/reference/backend_api/openapi.json +++ b/docs/reference/reference/backend_api/openapi.json @@ -14,7 +14,6 @@ "get": { "summary": "User Profile", "operationId": "user_profile_profile__get", - "description": "An enumeration.", "responses": { "200": { "description": "Successful Response", From 2bb8e20f1c8b5df37dcc1b48338d8fd297d4e9ab Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Fri, 17 May 2024 09:24:31 +0100 Subject: [PATCH 35/45] Updated file paths in API documentation --- docs/mint.json | 122 +++++++++--------- .../add-variant-from-base-and-config.mdx | 0 .../backend_api/add-variant-from-image.mdx | 0 .../backend_api/build-image.mdx | 0 .../construct-app-container-url.mdx | 0 .../backend_api/container-templates.mdx | 0 .../create-app-and-variant-from-template.mdx | 0 .../backend_api/create-app.mdx | 0 .../backend_api/create-custom-evaluation.mdx | 0 .../create-evaluation-scenario.mdx | 0 .../backend_api/create-evaluation.mdx | 0 .../backend_api/create-feedback.mdx | 0 .../backend_api/create-span.mdx | 0 .../backend_api/create-testset.mdx | 0 .../backend_api/create-trace.mdx | 0 .../backend_api/create_doc_from_openai.sh | 0 .../backend_api/delete-evaluations.mdx | 0 .../backend_api/delete-testsets.mdx | 0 .../backend_api/deploy-to-environment.mdx | 0 .../backend_api/evaluate-ai-critique.mdx | 0 .../backend_api/execute-custom-evaluation.mdx | 0 .../fetch-evaluation-scenarios.mdx | 0 .../backend_api/fetch-evaluation.mdx | 0 .../backend_api/fetch-list-evaluations.mdx | 0 .../backend_api/fetch-results.mdx | 0 .../backend_api/get-config.mdx | 0 .../get-custom-evaluation-names.mdx | 0 .../backend_api/get-custom-evaluation.mdx | 0 .../get-evaluation-scenario-score-router.mdx | 0 .../backend_api/get-feedback.mdx | 0 .../backend_api/get-feedbacks.mdx | 0 .../backend_api/get-spans-of-trace.mdx | 0 .../backend_api/get-trace.mdx | 0 .../backend_api/get-traces.mdx | 0 .../backend_api/get-user-organization.mdx | 0 .../backend_api/get-variant-by-env.mdx | 0 .../backend_api/import-testset.mdx | 0 .../backend_api/list-app-variants.mdx | 0 .../backend_api/list-apps.mdx | 0 .../backend_api/list-bases.mdx | 0 .../backend_api/list-custom-evaluations.mdx | 0 .../backend_api/list-environments.mdx | 0 .../backend_api/list-organizations.mdx | 0 .../backend_api/openapi.json | 2 +- .../backend_api/remove-app.mdx | 0 .../backend_api/remove-variant.mdx | 0 .../backend_api/restart-docker-container.mdx | 0 .../backend_api/save-config.mdx | 0 .../backend_api/start-variant.mdx | 0 .../backend_api/testsets/get-testset.mdx | 0 .../backend_api/testsets/get-testsets.mdx | 0 .../backend_api/update-custom-evaluation.mdx | 0 .../backend_api/update-evaluation-router.mdx | 0 .../update-evaluation-scenario-router.mdx | 0 ...pdate-evaluation-scenario-score-router.mdx | 0 .../backend_api/update-feedback.mdx | 0 .../backend_api/update-testset.mdx | 0 .../backend_api/update-trace-status.mdx | 0 .../backend_api/update-variant-image.mdx | 0 .../backend_api/update-variant-parameters.mdx | 0 .../backend_api/upload-file.mdx | 0 .../backend_api/user-profile.mdx | 0 .../backend_api/webhook-example-fake.mdx | 0 63 files changed, 62 insertions(+), 62 deletions(-) rename docs/reference/{reference => api_docs}/backend_api/add-variant-from-base-and-config.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/add-variant-from-image.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/build-image.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/construct-app-container-url.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/container-templates.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-app-and-variant-from-template.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-app.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-custom-evaluation.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-evaluation-scenario.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-evaluation.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-feedback.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-span.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-testset.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create-trace.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/create_doc_from_openai.sh (100%) rename docs/reference/{reference => api_docs}/backend_api/delete-evaluations.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/delete-testsets.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/deploy-to-environment.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/evaluate-ai-critique.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/execute-custom-evaluation.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/fetch-evaluation-scenarios.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/fetch-evaluation.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/fetch-list-evaluations.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/fetch-results.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-config.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-custom-evaluation-names.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-custom-evaluation.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-evaluation-scenario-score-router.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-feedback.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-feedbacks.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-spans-of-trace.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-trace.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-traces.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-user-organization.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/get-variant-by-env.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/import-testset.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/list-app-variants.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/list-apps.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/list-bases.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/list-custom-evaluations.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/list-environments.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/list-organizations.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/openapi.json (99%) rename docs/reference/{reference => api_docs}/backend_api/remove-app.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/remove-variant.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/restart-docker-container.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/save-config.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/start-variant.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/testsets/get-testset.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/testsets/get-testsets.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-custom-evaluation.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-evaluation-router.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-evaluation-scenario-router.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-evaluation-scenario-score-router.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-feedback.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-testset.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-trace-status.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-variant-image.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/update-variant-parameters.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/upload-file.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/user-profile.mdx (100%) rename docs/reference/{reference => api_docs}/backend_api/webhook-example-fake.mdx (100%) diff --git a/docs/mint.json b/docs/mint.json index aa834a6b52..ad52954c16 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -159,76 +159,76 @@ ] }, { - "group": "Reference", + "group": "API Documentation", "pages": [ { "group": "Backend API", "pages": [ - "reference/reference/backend_api/user-profile", - "reference/reference/backend_api/list-app-variants", - "reference/reference/backend_api/get-variant-by-env", - "reference/reference/backend_api/list-apps", - "reference/reference/backend_api/create-app", - "reference/reference/backend_api/add-variant-from-image", - "reference/reference/backend_api/remove-app", - "reference/reference/backend_api/create-app-and-variant-from-template", - "reference/reference/backend_api/list-environments", - "reference/reference/backend_api/add-variant-from-base-and-config", - "reference/reference/backend_api/start-variant", - "reference/reference/backend_api/remove-variant", - "reference/reference/backend_api/update-variant-parameters", - "reference/reference/backend_api/update-variant-image", - "reference/reference/backend_api/fetch-list-evaluations", - "reference/reference/backend_api/create-evaluation", - "reference/reference/backend_api/delete-evaluations", - "reference/reference/backend_api/fetch-evaluation", - "reference/reference/backend_api/update-evaluation-router", - "reference/reference/backend_api/fetch-evaluation-scenarios", - "reference/reference/backend_api/create-evaluation-scenario", - "reference/reference/backend_api/update-evaluation-scenario-router", - "reference/reference/backend_api/evaluate-ai-critique", - "reference/reference/backend_api/get-evaluation-scenario-score-router", - "reference/reference/backend_api/update-evaluation-scenario-score-router", - "reference/reference/backend_api/fetch-results", - "reference/reference/backend_api/create-custom-evaluation", - "reference/reference/backend_api/update-custom-evaluation", - "reference/reference/backend_api/list-custom-evaluations", - "reference/reference/backend_api/get-custom-evaluation", - "reference/reference/backend_api/get-custom-evaluation-names", - "reference/reference/backend_api/execute-custom-evaluation", - "reference/reference/backend_api/webhook-example-fake", - "reference/reference/backend_api/upload-file", - "reference/reference/backend_api/import-testset", - "reference/reference/backend_api/create-testset", + "reference/api_docs/backend_api/user-profile", + "reference/api_docs/backend_api/list-app-variants", + "reference/api_docs/backend_api/get-variant-by-env", + "reference/api_docs/backend_api/list-apps", + "reference/api_docs/backend_api/create-app", + "reference/api_docs/backend_api/add-variant-from-image", + "reference/api_docs/backend_api/remove-app", + "reference/api_docs/backend_api/create-app-and-variant-from-template", + "reference/api_docs/backend_api/list-environments", + "reference/api_docs/backend_api/add-variant-from-base-and-config", + "reference/api_docs/backend_api/start-variant", + "reference/api_docs/backend_api/remove-variant", + "reference/api_docs/backend_api/update-variant-parameters", + "reference/api_docs/backend_api/update-variant-image", + "reference/api_docs/backend_api/fetch-list-evaluations", + "reference/api_docs/backend_api/create-evaluation", + "reference/api_docs/backend_api/delete-evaluations", + "reference/api_docs/backend_api/fetch-evaluation", + "reference/api_docs/backend_api/update-evaluation-router", + "reference/api_docs/backend_api/fetch-evaluation-scenarios", + "reference/api_docs/backend_api/create-evaluation-scenario", + "reference/api_docs/backend_api/update-evaluation-scenario-router", + "reference/api_docs/backend_api/evaluate-ai-critique", + "reference/api_docs/backend_api/get-evaluation-scenario-score-router", + "reference/api_docs/backend_api/update-evaluation-scenario-score-router", + "reference/api_docs/backend_api/fetch-results", + "reference/api_docs/backend_api/create-custom-evaluation", + "reference/api_docs/backend_api/update-custom-evaluation", + "reference/api_docs/backend_api/list-custom-evaluations", + "reference/api_docs/backend_api/get-custom-evaluation", + "reference/api_docs/backend_api/get-custom-evaluation-names", + "reference/api_docs/backend_api/execute-custom-evaluation", + "reference/api_docs/backend_api/webhook-example-fake", + "reference/api_docs/backend_api/upload-file", + "reference/api_docs/backend_api/import-testset", + "reference/api_docs/backend_api/create-testset", { "group": "testsets", "pages": [ - "reference/reference/backend_api/testsets/get-testset", - "reference/reference/backend_api/testsets/get-testsets" + "reference/api_docs/backend_api/testsets/get-testset", + "reference/api_docs/backend_api/testsets/get-testsets" ] }, - "reference/reference/backend_api/update-testset", - "reference/reference/backend_api/delete-testsets", - "reference/reference/backend_api/build-image", - "reference/reference/backend_api/restart-docker-container", - "reference/reference/backend_api/container-templates", - "reference/reference/backend_api/construct-app-container-url", - "reference/reference/backend_api/deploy-to-environment", - "reference/reference/backend_api/create-trace", - "reference/reference/backend_api/get-traces", - "reference/reference/backend_api/get-trace", - "reference/reference/backend_api/update-trace-status", - "reference/reference/backend_api/create-span", - "reference/reference/backend_api/get-spans-of-trace", - "reference/reference/backend_api/get-feedbacks", - "reference/reference/backend_api/create-feedback", - "reference/reference/backend_api/get-feedback", - "reference/reference/backend_api/update-feedback", - "reference/reference/backend_api/list-organizations", - "reference/reference/backend_api/get-user-organization", - "reference/reference/backend_api/list-bases", - "reference/reference/backend_api/get-config", - "reference/reference/backend_api/save-config" + "reference/api_docs/backend_api/update-testset", + "reference/api_docs/backend_api/delete-testsets", + "reference/api_docs/backend_api/build-image", + "reference/api_docs/backend_api/restart-docker-container", + "reference/api_docs/backend_api/container-templates", + "reference/api_docs/backend_api/construct-app-container-url", + "reference/api_docs/backend_api/deploy-to-environment", + "reference/api_docs/backend_api/create-trace", + "reference/api_docs/backend_api/get-traces", + "reference/api_docs/backend_api/get-trace", + "reference/api_docs/backend_api/update-trace-status", + "reference/api_docs/backend_api/create-span", + "reference/api_docs/backend_api/get-spans-of-trace", + "reference/api_docs/backend_api/get-feedbacks", + "reference/api_docs/backend_api/create-feedback", + "reference/api_docs/backend_api/get-feedback", + "reference/api_docs/backend_api/update-feedback", + "reference/api_docs/backend_api/list-organizations", + "reference/api_docs/backend_api/get-user-organization", + "reference/api_docs/backend_api/list-bases", + "reference/api_docs/backend_api/get-config", + "reference/api_docs/backend_api/save-config" ] } ] diff --git a/docs/reference/reference/backend_api/add-variant-from-base-and-config.mdx b/docs/reference/api_docs/backend_api/add-variant-from-base-and-config.mdx similarity index 100% rename from docs/reference/reference/backend_api/add-variant-from-base-and-config.mdx rename to docs/reference/api_docs/backend_api/add-variant-from-base-and-config.mdx diff --git a/docs/reference/reference/backend_api/add-variant-from-image.mdx b/docs/reference/api_docs/backend_api/add-variant-from-image.mdx similarity index 100% rename from docs/reference/reference/backend_api/add-variant-from-image.mdx rename to docs/reference/api_docs/backend_api/add-variant-from-image.mdx diff --git a/docs/reference/reference/backend_api/build-image.mdx b/docs/reference/api_docs/backend_api/build-image.mdx similarity index 100% rename from docs/reference/reference/backend_api/build-image.mdx rename to docs/reference/api_docs/backend_api/build-image.mdx diff --git a/docs/reference/reference/backend_api/construct-app-container-url.mdx b/docs/reference/api_docs/backend_api/construct-app-container-url.mdx similarity index 100% rename from docs/reference/reference/backend_api/construct-app-container-url.mdx rename to docs/reference/api_docs/backend_api/construct-app-container-url.mdx diff --git a/docs/reference/reference/backend_api/container-templates.mdx b/docs/reference/api_docs/backend_api/container-templates.mdx similarity index 100% rename from docs/reference/reference/backend_api/container-templates.mdx rename to docs/reference/api_docs/backend_api/container-templates.mdx diff --git a/docs/reference/reference/backend_api/create-app-and-variant-from-template.mdx b/docs/reference/api_docs/backend_api/create-app-and-variant-from-template.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-app-and-variant-from-template.mdx rename to docs/reference/api_docs/backend_api/create-app-and-variant-from-template.mdx diff --git a/docs/reference/reference/backend_api/create-app.mdx b/docs/reference/api_docs/backend_api/create-app.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-app.mdx rename to docs/reference/api_docs/backend_api/create-app.mdx diff --git a/docs/reference/reference/backend_api/create-custom-evaluation.mdx b/docs/reference/api_docs/backend_api/create-custom-evaluation.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-custom-evaluation.mdx rename to docs/reference/api_docs/backend_api/create-custom-evaluation.mdx diff --git a/docs/reference/reference/backend_api/create-evaluation-scenario.mdx b/docs/reference/api_docs/backend_api/create-evaluation-scenario.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-evaluation-scenario.mdx rename to docs/reference/api_docs/backend_api/create-evaluation-scenario.mdx diff --git a/docs/reference/reference/backend_api/create-evaluation.mdx b/docs/reference/api_docs/backend_api/create-evaluation.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-evaluation.mdx rename to docs/reference/api_docs/backend_api/create-evaluation.mdx diff --git a/docs/reference/reference/backend_api/create-feedback.mdx b/docs/reference/api_docs/backend_api/create-feedback.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-feedback.mdx rename to docs/reference/api_docs/backend_api/create-feedback.mdx diff --git a/docs/reference/reference/backend_api/create-span.mdx b/docs/reference/api_docs/backend_api/create-span.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-span.mdx rename to docs/reference/api_docs/backend_api/create-span.mdx diff --git a/docs/reference/reference/backend_api/create-testset.mdx b/docs/reference/api_docs/backend_api/create-testset.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-testset.mdx rename to docs/reference/api_docs/backend_api/create-testset.mdx diff --git a/docs/reference/reference/backend_api/create-trace.mdx b/docs/reference/api_docs/backend_api/create-trace.mdx similarity index 100% rename from docs/reference/reference/backend_api/create-trace.mdx rename to docs/reference/api_docs/backend_api/create-trace.mdx diff --git a/docs/reference/reference/backend_api/create_doc_from_openai.sh b/docs/reference/api_docs/backend_api/create_doc_from_openai.sh similarity index 100% rename from docs/reference/reference/backend_api/create_doc_from_openai.sh rename to docs/reference/api_docs/backend_api/create_doc_from_openai.sh diff --git a/docs/reference/reference/backend_api/delete-evaluations.mdx b/docs/reference/api_docs/backend_api/delete-evaluations.mdx similarity index 100% rename from docs/reference/reference/backend_api/delete-evaluations.mdx rename to docs/reference/api_docs/backend_api/delete-evaluations.mdx diff --git a/docs/reference/reference/backend_api/delete-testsets.mdx b/docs/reference/api_docs/backend_api/delete-testsets.mdx similarity index 100% rename from docs/reference/reference/backend_api/delete-testsets.mdx rename to docs/reference/api_docs/backend_api/delete-testsets.mdx diff --git a/docs/reference/reference/backend_api/deploy-to-environment.mdx b/docs/reference/api_docs/backend_api/deploy-to-environment.mdx similarity index 100% rename from docs/reference/reference/backend_api/deploy-to-environment.mdx rename to docs/reference/api_docs/backend_api/deploy-to-environment.mdx diff --git a/docs/reference/reference/backend_api/evaluate-ai-critique.mdx b/docs/reference/api_docs/backend_api/evaluate-ai-critique.mdx similarity index 100% rename from docs/reference/reference/backend_api/evaluate-ai-critique.mdx rename to docs/reference/api_docs/backend_api/evaluate-ai-critique.mdx diff --git a/docs/reference/reference/backend_api/execute-custom-evaluation.mdx b/docs/reference/api_docs/backend_api/execute-custom-evaluation.mdx similarity index 100% rename from docs/reference/reference/backend_api/execute-custom-evaluation.mdx rename to docs/reference/api_docs/backend_api/execute-custom-evaluation.mdx diff --git a/docs/reference/reference/backend_api/fetch-evaluation-scenarios.mdx b/docs/reference/api_docs/backend_api/fetch-evaluation-scenarios.mdx similarity index 100% rename from docs/reference/reference/backend_api/fetch-evaluation-scenarios.mdx rename to docs/reference/api_docs/backend_api/fetch-evaluation-scenarios.mdx diff --git a/docs/reference/reference/backend_api/fetch-evaluation.mdx b/docs/reference/api_docs/backend_api/fetch-evaluation.mdx similarity index 100% rename from docs/reference/reference/backend_api/fetch-evaluation.mdx rename to docs/reference/api_docs/backend_api/fetch-evaluation.mdx diff --git a/docs/reference/reference/backend_api/fetch-list-evaluations.mdx b/docs/reference/api_docs/backend_api/fetch-list-evaluations.mdx similarity index 100% rename from docs/reference/reference/backend_api/fetch-list-evaluations.mdx rename to docs/reference/api_docs/backend_api/fetch-list-evaluations.mdx diff --git a/docs/reference/reference/backend_api/fetch-results.mdx b/docs/reference/api_docs/backend_api/fetch-results.mdx similarity index 100% rename from docs/reference/reference/backend_api/fetch-results.mdx rename to docs/reference/api_docs/backend_api/fetch-results.mdx diff --git a/docs/reference/reference/backend_api/get-config.mdx b/docs/reference/api_docs/backend_api/get-config.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-config.mdx rename to docs/reference/api_docs/backend_api/get-config.mdx diff --git a/docs/reference/reference/backend_api/get-custom-evaluation-names.mdx b/docs/reference/api_docs/backend_api/get-custom-evaluation-names.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-custom-evaluation-names.mdx rename to docs/reference/api_docs/backend_api/get-custom-evaluation-names.mdx diff --git a/docs/reference/reference/backend_api/get-custom-evaluation.mdx b/docs/reference/api_docs/backend_api/get-custom-evaluation.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-custom-evaluation.mdx rename to docs/reference/api_docs/backend_api/get-custom-evaluation.mdx diff --git a/docs/reference/reference/backend_api/get-evaluation-scenario-score-router.mdx b/docs/reference/api_docs/backend_api/get-evaluation-scenario-score-router.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-evaluation-scenario-score-router.mdx rename to docs/reference/api_docs/backend_api/get-evaluation-scenario-score-router.mdx diff --git a/docs/reference/reference/backend_api/get-feedback.mdx b/docs/reference/api_docs/backend_api/get-feedback.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-feedback.mdx rename to docs/reference/api_docs/backend_api/get-feedback.mdx diff --git a/docs/reference/reference/backend_api/get-feedbacks.mdx b/docs/reference/api_docs/backend_api/get-feedbacks.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-feedbacks.mdx rename to docs/reference/api_docs/backend_api/get-feedbacks.mdx diff --git a/docs/reference/reference/backend_api/get-spans-of-trace.mdx b/docs/reference/api_docs/backend_api/get-spans-of-trace.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-spans-of-trace.mdx rename to docs/reference/api_docs/backend_api/get-spans-of-trace.mdx diff --git a/docs/reference/reference/backend_api/get-trace.mdx b/docs/reference/api_docs/backend_api/get-trace.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-trace.mdx rename to docs/reference/api_docs/backend_api/get-trace.mdx diff --git a/docs/reference/reference/backend_api/get-traces.mdx b/docs/reference/api_docs/backend_api/get-traces.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-traces.mdx rename to docs/reference/api_docs/backend_api/get-traces.mdx diff --git a/docs/reference/reference/backend_api/get-user-organization.mdx b/docs/reference/api_docs/backend_api/get-user-organization.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-user-organization.mdx rename to docs/reference/api_docs/backend_api/get-user-organization.mdx diff --git a/docs/reference/reference/backend_api/get-variant-by-env.mdx b/docs/reference/api_docs/backend_api/get-variant-by-env.mdx similarity index 100% rename from docs/reference/reference/backend_api/get-variant-by-env.mdx rename to docs/reference/api_docs/backend_api/get-variant-by-env.mdx diff --git a/docs/reference/reference/backend_api/import-testset.mdx b/docs/reference/api_docs/backend_api/import-testset.mdx similarity index 100% rename from docs/reference/reference/backend_api/import-testset.mdx rename to docs/reference/api_docs/backend_api/import-testset.mdx diff --git a/docs/reference/reference/backend_api/list-app-variants.mdx b/docs/reference/api_docs/backend_api/list-app-variants.mdx similarity index 100% rename from docs/reference/reference/backend_api/list-app-variants.mdx rename to docs/reference/api_docs/backend_api/list-app-variants.mdx diff --git a/docs/reference/reference/backend_api/list-apps.mdx b/docs/reference/api_docs/backend_api/list-apps.mdx similarity index 100% rename from docs/reference/reference/backend_api/list-apps.mdx rename to docs/reference/api_docs/backend_api/list-apps.mdx diff --git a/docs/reference/reference/backend_api/list-bases.mdx b/docs/reference/api_docs/backend_api/list-bases.mdx similarity index 100% rename from docs/reference/reference/backend_api/list-bases.mdx rename to docs/reference/api_docs/backend_api/list-bases.mdx diff --git a/docs/reference/reference/backend_api/list-custom-evaluations.mdx b/docs/reference/api_docs/backend_api/list-custom-evaluations.mdx similarity index 100% rename from docs/reference/reference/backend_api/list-custom-evaluations.mdx rename to docs/reference/api_docs/backend_api/list-custom-evaluations.mdx diff --git a/docs/reference/reference/backend_api/list-environments.mdx b/docs/reference/api_docs/backend_api/list-environments.mdx similarity index 100% rename from docs/reference/reference/backend_api/list-environments.mdx rename to docs/reference/api_docs/backend_api/list-environments.mdx diff --git a/docs/reference/reference/backend_api/list-organizations.mdx b/docs/reference/api_docs/backend_api/list-organizations.mdx similarity index 100% rename from docs/reference/reference/backend_api/list-organizations.mdx rename to docs/reference/api_docs/backend_api/list-organizations.mdx diff --git a/docs/reference/reference/backend_api/openapi.json b/docs/reference/api_docs/backend_api/openapi.json similarity index 99% rename from docs/reference/reference/backend_api/openapi.json rename to docs/reference/api_docs/backend_api/openapi.json index c42bba4a0e..06200605f2 100644 --- a/docs/reference/reference/backend_api/openapi.json +++ b/docs/reference/api_docs/backend_api/openapi.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.0", + "openapi": "3.0.2", "info": { "title": "FastAPI", "version": "0.1.0" diff --git a/docs/reference/reference/backend_api/remove-app.mdx b/docs/reference/api_docs/backend_api/remove-app.mdx similarity index 100% rename from docs/reference/reference/backend_api/remove-app.mdx rename to docs/reference/api_docs/backend_api/remove-app.mdx diff --git a/docs/reference/reference/backend_api/remove-variant.mdx b/docs/reference/api_docs/backend_api/remove-variant.mdx similarity index 100% rename from docs/reference/reference/backend_api/remove-variant.mdx rename to docs/reference/api_docs/backend_api/remove-variant.mdx diff --git a/docs/reference/reference/backend_api/restart-docker-container.mdx b/docs/reference/api_docs/backend_api/restart-docker-container.mdx similarity index 100% rename from docs/reference/reference/backend_api/restart-docker-container.mdx rename to docs/reference/api_docs/backend_api/restart-docker-container.mdx diff --git a/docs/reference/reference/backend_api/save-config.mdx b/docs/reference/api_docs/backend_api/save-config.mdx similarity index 100% rename from docs/reference/reference/backend_api/save-config.mdx rename to docs/reference/api_docs/backend_api/save-config.mdx diff --git a/docs/reference/reference/backend_api/start-variant.mdx b/docs/reference/api_docs/backend_api/start-variant.mdx similarity index 100% rename from docs/reference/reference/backend_api/start-variant.mdx rename to docs/reference/api_docs/backend_api/start-variant.mdx diff --git a/docs/reference/reference/backend_api/testsets/get-testset.mdx b/docs/reference/api_docs/backend_api/testsets/get-testset.mdx similarity index 100% rename from docs/reference/reference/backend_api/testsets/get-testset.mdx rename to docs/reference/api_docs/backend_api/testsets/get-testset.mdx diff --git a/docs/reference/reference/backend_api/testsets/get-testsets.mdx b/docs/reference/api_docs/backend_api/testsets/get-testsets.mdx similarity index 100% rename from docs/reference/reference/backend_api/testsets/get-testsets.mdx rename to docs/reference/api_docs/backend_api/testsets/get-testsets.mdx diff --git a/docs/reference/reference/backend_api/update-custom-evaluation.mdx b/docs/reference/api_docs/backend_api/update-custom-evaluation.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-custom-evaluation.mdx rename to docs/reference/api_docs/backend_api/update-custom-evaluation.mdx diff --git a/docs/reference/reference/backend_api/update-evaluation-router.mdx b/docs/reference/api_docs/backend_api/update-evaluation-router.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-evaluation-router.mdx rename to docs/reference/api_docs/backend_api/update-evaluation-router.mdx diff --git a/docs/reference/reference/backend_api/update-evaluation-scenario-router.mdx b/docs/reference/api_docs/backend_api/update-evaluation-scenario-router.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-evaluation-scenario-router.mdx rename to docs/reference/api_docs/backend_api/update-evaluation-scenario-router.mdx diff --git a/docs/reference/reference/backend_api/update-evaluation-scenario-score-router.mdx b/docs/reference/api_docs/backend_api/update-evaluation-scenario-score-router.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-evaluation-scenario-score-router.mdx rename to docs/reference/api_docs/backend_api/update-evaluation-scenario-score-router.mdx diff --git a/docs/reference/reference/backend_api/update-feedback.mdx b/docs/reference/api_docs/backend_api/update-feedback.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-feedback.mdx rename to docs/reference/api_docs/backend_api/update-feedback.mdx diff --git a/docs/reference/reference/backend_api/update-testset.mdx b/docs/reference/api_docs/backend_api/update-testset.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-testset.mdx rename to docs/reference/api_docs/backend_api/update-testset.mdx diff --git a/docs/reference/reference/backend_api/update-trace-status.mdx b/docs/reference/api_docs/backend_api/update-trace-status.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-trace-status.mdx rename to docs/reference/api_docs/backend_api/update-trace-status.mdx diff --git a/docs/reference/reference/backend_api/update-variant-image.mdx b/docs/reference/api_docs/backend_api/update-variant-image.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-variant-image.mdx rename to docs/reference/api_docs/backend_api/update-variant-image.mdx diff --git a/docs/reference/reference/backend_api/update-variant-parameters.mdx b/docs/reference/api_docs/backend_api/update-variant-parameters.mdx similarity index 100% rename from docs/reference/reference/backend_api/update-variant-parameters.mdx rename to docs/reference/api_docs/backend_api/update-variant-parameters.mdx diff --git a/docs/reference/reference/backend_api/upload-file.mdx b/docs/reference/api_docs/backend_api/upload-file.mdx similarity index 100% rename from docs/reference/reference/backend_api/upload-file.mdx rename to docs/reference/api_docs/backend_api/upload-file.mdx diff --git a/docs/reference/reference/backend_api/user-profile.mdx b/docs/reference/api_docs/backend_api/user-profile.mdx similarity index 100% rename from docs/reference/reference/backend_api/user-profile.mdx rename to docs/reference/api_docs/backend_api/user-profile.mdx diff --git a/docs/reference/reference/backend_api/webhook-example-fake.mdx b/docs/reference/api_docs/backend_api/webhook-example-fake.mdx similarity index 100% rename from docs/reference/reference/backend_api/webhook-example-fake.mdx rename to docs/reference/api_docs/backend_api/webhook-example-fake.mdx From ba32df839247b264318949b02ffda1c87ee261f0 Mon Sep 17 00:00:00 2001 From: Mahmoud Mabrouk Date: Fri, 17 May 2024 10:31:16 +0200 Subject: [PATCH 36/45] Update mint.json --- docs/mint.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/mint.json b/docs/mint.json index ad52954c16..3c7cce8efe 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -159,11 +159,8 @@ ] }, { - "group": "API Documentation", + "group": "API Reference", "pages": [ - { - "group": "Backend API", - "pages": [ "reference/api_docs/backend_api/user-profile", "reference/api_docs/backend_api/list-app-variants", "reference/api_docs/backend_api/get-variant-by-env", @@ -229,8 +226,6 @@ "reference/api_docs/backend_api/list-bases", "reference/api_docs/backend_api/get-config", "reference/api_docs/backend_api/save-config" - ] - } ] }, { From aa5768bd760df6a979a1d8a949e8c55de7f45161 Mon Sep 17 00:00:00 2001 From: Mahmoud Mabrouk Date: Fri, 17 May 2024 10:54:00 +0200 Subject: [PATCH 37/45] add openapi to mint.json --- docs/mint.json | 212 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 150 insertions(+), 62 deletions(-) diff --git a/docs/mint.json b/docs/mint.json index 3c7cce8efe..8dce4d472a 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -12,6 +12,9 @@ "light": "#4AA081", "dark": "#4AA081" }, + "openapi": [ + "/reference/backend_api/openapi.json" + ], "modeToggle": { "default": "light", "isHidden": false @@ -161,71 +164,156 @@ { "group": "API Reference", "pages": [ - "reference/api_docs/backend_api/user-profile", - "reference/api_docs/backend_api/list-app-variants", - "reference/api_docs/backend_api/get-variant-by-env", - "reference/api_docs/backend_api/list-apps", - "reference/api_docs/backend_api/create-app", - "reference/api_docs/backend_api/add-variant-from-image", - "reference/api_docs/backend_api/remove-app", - "reference/api_docs/backend_api/create-app-and-variant-from-template", - "reference/api_docs/backend_api/list-environments", - "reference/api_docs/backend_api/add-variant-from-base-and-config", - "reference/api_docs/backend_api/start-variant", - "reference/api_docs/backend_api/remove-variant", - "reference/api_docs/backend_api/update-variant-parameters", - "reference/api_docs/backend_api/update-variant-image", - "reference/api_docs/backend_api/fetch-list-evaluations", - "reference/api_docs/backend_api/create-evaluation", - "reference/api_docs/backend_api/delete-evaluations", - "reference/api_docs/backend_api/fetch-evaluation", - "reference/api_docs/backend_api/update-evaluation-router", - "reference/api_docs/backend_api/fetch-evaluation-scenarios", - "reference/api_docs/backend_api/create-evaluation-scenario", - "reference/api_docs/backend_api/update-evaluation-scenario-router", - "reference/api_docs/backend_api/evaluate-ai-critique", - "reference/api_docs/backend_api/get-evaluation-scenario-score-router", - "reference/api_docs/backend_api/update-evaluation-scenario-score-router", - "reference/api_docs/backend_api/fetch-results", - "reference/api_docs/backend_api/create-custom-evaluation", - "reference/api_docs/backend_api/update-custom-evaluation", - "reference/api_docs/backend_api/list-custom-evaluations", - "reference/api_docs/backend_api/get-custom-evaluation", - "reference/api_docs/backend_api/get-custom-evaluation-names", - "reference/api_docs/backend_api/execute-custom-evaluation", - "reference/api_docs/backend_api/webhook-example-fake", - "reference/api_docs/backend_api/upload-file", - "reference/api_docs/backend_api/import-testset", - "reference/api_docs/backend_api/create-testset", + { + "group": "Endpoints", + "pages": [ + { + "group": "Observability", + "pages": [ + "reference/backend_api/observability/get-dashboard-data", + "reference/backend_api/observability/create-traces", + "reference/backend_api/observability/get-traces", + "reference/backend_api/observability/delete-traces", + "reference/backend_api/observability/get-trace-detail", + "reference/backend_api/observability/get-spans-of-trace", + "reference/backend_api/observability/delete-spans-of-trace", + "reference/backend_api/observability/get-span-of-trace" + ] + }, + "reference/backend_api/list-api-keys", + "reference/backend_api/create-api-key", + "reference/backend_api/delete-api-key", + "reference/backend_api/validate-api-key", + "reference/backend_api/list-organizations", + "reference/backend_api/create-organization", + "reference/backend_api/get-user-organization", + "reference/backend_api/fetch-organization-details", + "reference/backend_api/update-organization", + "reference/backend_api/invite-user-to-workspace", + "reference/backend_api/resend-workspace-invitation", + "reference/backend_api/accept-workspace-invitation", + "reference/backend_api/create-workspace", + "reference/backend_api/update-workspace", + "reference/backend_api/get-all-workspace-roles", + "reference/backend_api/get-all-workspace-permissions", + "reference/backend_api/assign-role-to-user", + "reference/backend_api/unassign-role-from-user", + "reference/backend_api/remove-user-from-workspace", + "reference/backend_api/health-check", + "reference/backend_api/user-profile", + { + "group": "Apps", + "pages": [ + "reference/backend_api/apps/list-app-variants", + "reference/backend_api/apps/get-variant-by-env", + "reference/backend_api/apps/list-apps", + "reference/backend_api/apps/create-app", + "reference/backend_api/apps/add-variant-from-image", + "reference/backend_api/apps/remove-app", + "reference/backend_api/apps/create-app-and-variant-from-template", + "reference/backend_api/apps/list-environments", + "reference/backend_api/apps/list-app-environment-revisions" + ] + }, + { + "group": "Variants", + "pages": [ + "reference/backend_api/variants/add-variant-from-base-and-config", + "reference/backend_api/variants/get-variant", + "reference/backend_api/variants/start-variant", + "reference/backend_api/variants/remove-variant", + "reference/backend_api/variants/update-variant-parameters", + "reference/backend_api/variants/update-variant-image", + "reference/backend_api/variants/retrieve-variant-logs", + "reference/backend_api/variants/get-variant-revisions", + "reference/backend_api/variants/get-variant-revision" + ] + }, + { + "group": "Evaluations", + "pages": [ + "reference/backend_api/evaluations/fetch-evaluation-ids", + "reference/backend_api/evaluations/fetch-list-evaluations", + "reference/backend_api/evaluations/create-evaluation", + "reference/backend_api/evaluations/delete-evaluations", + "reference/backend_api/evaluations/fetch-evaluation-status", + "reference/backend_api/evaluations/fetch-evaluation-results", + "reference/backend_api/evaluations/fetch-evaluation-scenarios", + "reference/backend_api/evaluations/fetch-evaluation", + "reference/backend_api/evaluations/webhook-example-fake", + "reference/backend_api/evaluations/fetch-evaluation-scenarios-1" + ] + }, + { + "group": "Human-Evaluations", + "pages": [ + "reference/backend_api/human-evaluations/fetch-list-human-evaluations", + "reference/backend_api/human-evaluations/create-evaluation", + "reference/backend_api/human-evaluations/delete-evaluations", + "reference/backend_api/human-evaluations/fetch-human-evaluation", + "reference/backend_api/human-evaluations/update-human-evaluation", + "reference/backend_api/human-evaluations/fetch-evaluation-scenarios", + "reference/backend_api/human-evaluations/update-evaluation-scenario-router", + "reference/backend_api/human-evaluations/get-evaluation-scenario-score-router", + "reference/backend_api/human-evaluations/update-evaluation-scenario-score-router", + "reference/backend_api/human-evaluations/fetch-results" + ] + }, + { + "group": "Evaluators", + "pages": [ + "reference/backend_api/evaluators/get-evaluators-endpoint", + "reference/backend_api/evaluators/get-evaluator-configs", + "reference/backend_api/evaluators/create-new-evaluator-config", + "reference/backend_api/evaluators/get-evaluator-config", + "reference/backend_api/evaluators/update-evaluator-config", + "reference/backend_api/evaluators/delete-evaluator-config" + ] + }, + { + "group": "Testsets", + "pages": [ + "reference/backend_api/testsets/upload-file", + "reference/backend_api/testsets/import-testset", + "reference/backend_api/testsets/create-testset", + "reference/backend_api/testsets/get-single-testset", + "reference/backend_api/testsets/update-testset", + "reference/backend_api/testsets/get-testsets", + "reference/backend_api/testsets/delete-testsets" + ] + }, + { + "group": "Containers", + "pages": [ + "reference/backend_api/containers/build-image", + "reference/backend_api/containers/restart-docker-container", + "reference/backend_api/containers/container-templates", + "reference/backend_api/containers/construct-app-container-url" + ] + }, + { + "group": "Environments", + "pages": [ + "reference/backend_api/environments/deploy-to-environment" + ] + }, { - "group": "testsets", + "group": "Bases", "pages": [ - "reference/api_docs/backend_api/testsets/get-testset", - "reference/api_docs/backend_api/testsets/get-testsets" + "reference/backend_api/bases/list-bases" ] }, - "reference/api_docs/backend_api/update-testset", - "reference/api_docs/backend_api/delete-testsets", - "reference/api_docs/backend_api/build-image", - "reference/api_docs/backend_api/restart-docker-container", - "reference/api_docs/backend_api/container-templates", - "reference/api_docs/backend_api/construct-app-container-url", - "reference/api_docs/backend_api/deploy-to-environment", - "reference/api_docs/backend_api/create-trace", - "reference/api_docs/backend_api/get-traces", - "reference/api_docs/backend_api/get-trace", - "reference/api_docs/backend_api/update-trace-status", - "reference/api_docs/backend_api/create-span", - "reference/api_docs/backend_api/get-spans-of-trace", - "reference/api_docs/backend_api/get-feedbacks", - "reference/api_docs/backend_api/create-feedback", - "reference/api_docs/backend_api/get-feedback", - "reference/api_docs/backend_api/update-feedback", - "reference/api_docs/backend_api/list-organizations", - "reference/api_docs/backend_api/get-user-organization", - "reference/api_docs/backend_api/list-bases", - "reference/api_docs/backend_api/get-config", - "reference/api_docs/backend_api/save-config" + { + "group": "Configs", + "pages": [ + "reference/backend_api/configs/get-config", + "reference/backend_api/configs/save-config", + "reference/backend_api/configs/get-config-deployment-revision", + "reference/backend_api/configs/revert-deployment-revision" + ] + } + ] + } ] }, { @@ -273,4 +361,4 @@ "measurementId": "G-LTF78FZS33" } } -} +} \ No newline at end of file From 7cc1c9b36ed5a3456b5477fb85b1c3224fe8a9fb Mon Sep 17 00:00:00 2001 From: Mahmoud Mabrouk Date: Fri, 17 May 2024 10:54:09 +0200 Subject: [PATCH 38/45] removed old ref --- .../add-variant-from-base-and-config.mdx | 3 - .../backend_api/add-variant-from-image.mdx | 3 - .../api_docs/backend_api/build-image.mdx | 3 - .../construct-app-container-url.mdx | 3 - .../backend_api/container-templates.mdx | 3 - .../create-app-and-variant-from-template.mdx | 3 - .../api_docs/backend_api/create-app.mdx | 3 - .../backend_api/create-custom-evaluation.mdx | 3 - .../create-evaluation-scenario.mdx | 3 - .../backend_api/create-evaluation.mdx | 3 - .../api_docs/backend_api/create-feedback.mdx | 3 - .../api_docs/backend_api/create-span.mdx | 3 - .../api_docs/backend_api/create-testset.mdx | 3 - .../api_docs/backend_api/create-trace.mdx | 3 - .../backend_api/create_doc_from_openai.sh | 1 - .../backend_api/delete-evaluations.mdx | 3 - .../api_docs/backend_api/delete-testsets.mdx | 3 - .../backend_api/deploy-to-environment.mdx | 3 - .../backend_api/evaluate-ai-critique.mdx | 3 - .../backend_api/execute-custom-evaluation.mdx | 3 - .../fetch-evaluation-scenarios.mdx | 3 - .../api_docs/backend_api/fetch-evaluation.mdx | 3 - .../backend_api/fetch-list-evaluations.mdx | 3 - .../api_docs/backend_api/fetch-results.mdx | 3 - .../api_docs/backend_api/get-config.mdx | 3 - .../get-custom-evaluation-names.mdx | 3 - .../backend_api/get-custom-evaluation.mdx | 3 - .../get-evaluation-scenario-score-router.mdx | 3 - .../api_docs/backend_api/get-feedback.mdx | 3 - .../api_docs/backend_api/get-feedbacks.mdx | 3 - .../backend_api/get-spans-of-trace.mdx | 3 - .../api_docs/backend_api/get-trace.mdx | 3 - .../api_docs/backend_api/get-traces.mdx | 3 - .../backend_api/get-user-organization.mdx | 3 - .../backend_api/get-variant-by-env.mdx | 3 - .../api_docs/backend_api/import-testset.mdx | 3 - .../backend_api/list-app-variants.mdx | 3 - .../api_docs/backend_api/list-apps.mdx | 3 - .../api_docs/backend_api/list-bases.mdx | 3 - .../backend_api/list-custom-evaluations.mdx | 3 - .../backend_api/list-environments.mdx | 3 - .../backend_api/list-organizations.mdx | 3 - .../api_docs/backend_api/openapi.json | 4293 ----------------- .../api_docs/backend_api/remove-app.mdx | 3 - .../api_docs/backend_api/remove-variant.mdx | 3 - .../backend_api/restart-docker-container.mdx | 3 - .../api_docs/backend_api/save-config.mdx | 3 - .../api_docs/backend_api/start-variant.mdx | 3 - .../backend_api/testsets/get-testset.mdx | 3 - .../backend_api/testsets/get-testsets.mdx | 3 - .../backend_api/update-custom-evaluation.mdx | 3 - .../backend_api/update-evaluation-router.mdx | 3 - .../update-evaluation-scenario-router.mdx | 3 - ...pdate-evaluation-scenario-score-router.mdx | 3 - .../api_docs/backend_api/update-feedback.mdx | 3 - .../api_docs/backend_api/update-testset.mdx | 3 - .../backend_api/update-trace-status.mdx | 3 - .../backend_api/update-variant-image.mdx | 3 - .../backend_api/update-variant-parameters.mdx | 3 - .../api_docs/backend_api/upload-file.mdx | 3 - .../api_docs/backend_api/user-profile.mdx | 3 - .../backend_api/webhook-example-fake.mdx | 3 - 62 files changed, 4474 deletions(-) delete mode 100644 docs/reference/api_docs/backend_api/add-variant-from-base-and-config.mdx delete mode 100644 docs/reference/api_docs/backend_api/add-variant-from-image.mdx delete mode 100644 docs/reference/api_docs/backend_api/build-image.mdx delete mode 100644 docs/reference/api_docs/backend_api/construct-app-container-url.mdx delete mode 100644 docs/reference/api_docs/backend_api/container-templates.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-app-and-variant-from-template.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-app.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-custom-evaluation.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-evaluation-scenario.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-evaluation.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-feedback.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-span.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-testset.mdx delete mode 100644 docs/reference/api_docs/backend_api/create-trace.mdx delete mode 100755 docs/reference/api_docs/backend_api/create_doc_from_openai.sh delete mode 100644 docs/reference/api_docs/backend_api/delete-evaluations.mdx delete mode 100644 docs/reference/api_docs/backend_api/delete-testsets.mdx delete mode 100644 docs/reference/api_docs/backend_api/deploy-to-environment.mdx delete mode 100644 docs/reference/api_docs/backend_api/evaluate-ai-critique.mdx delete mode 100644 docs/reference/api_docs/backend_api/execute-custom-evaluation.mdx delete mode 100644 docs/reference/api_docs/backend_api/fetch-evaluation-scenarios.mdx delete mode 100644 docs/reference/api_docs/backend_api/fetch-evaluation.mdx delete mode 100644 docs/reference/api_docs/backend_api/fetch-list-evaluations.mdx delete mode 100644 docs/reference/api_docs/backend_api/fetch-results.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-config.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-custom-evaluation-names.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-custom-evaluation.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-evaluation-scenario-score-router.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-feedback.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-feedbacks.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-spans-of-trace.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-trace.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-traces.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-user-organization.mdx delete mode 100644 docs/reference/api_docs/backend_api/get-variant-by-env.mdx delete mode 100644 docs/reference/api_docs/backend_api/import-testset.mdx delete mode 100644 docs/reference/api_docs/backend_api/list-app-variants.mdx delete mode 100644 docs/reference/api_docs/backend_api/list-apps.mdx delete mode 100644 docs/reference/api_docs/backend_api/list-bases.mdx delete mode 100644 docs/reference/api_docs/backend_api/list-custom-evaluations.mdx delete mode 100644 docs/reference/api_docs/backend_api/list-environments.mdx delete mode 100644 docs/reference/api_docs/backend_api/list-organizations.mdx delete mode 100644 docs/reference/api_docs/backend_api/openapi.json delete mode 100644 docs/reference/api_docs/backend_api/remove-app.mdx delete mode 100644 docs/reference/api_docs/backend_api/remove-variant.mdx delete mode 100644 docs/reference/api_docs/backend_api/restart-docker-container.mdx delete mode 100644 docs/reference/api_docs/backend_api/save-config.mdx delete mode 100644 docs/reference/api_docs/backend_api/start-variant.mdx delete mode 100644 docs/reference/api_docs/backend_api/testsets/get-testset.mdx delete mode 100644 docs/reference/api_docs/backend_api/testsets/get-testsets.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-custom-evaluation.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-evaluation-router.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-evaluation-scenario-router.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-evaluation-scenario-score-router.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-feedback.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-testset.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-trace-status.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-variant-image.mdx delete mode 100644 docs/reference/api_docs/backend_api/update-variant-parameters.mdx delete mode 100644 docs/reference/api_docs/backend_api/upload-file.mdx delete mode 100644 docs/reference/api_docs/backend_api/user-profile.mdx delete mode 100644 docs/reference/api_docs/backend_api/webhook-example-fake.mdx diff --git a/docs/reference/api_docs/backend_api/add-variant-from-base-and-config.mdx b/docs/reference/api_docs/backend_api/add-variant-from-base-and-config.mdx deleted file mode 100644 index cd486028dc..0000000000 --- a/docs/reference/api_docs/backend_api/add-variant-from-base-and-config.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /variants/from-base/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/add-variant-from-image.mdx b/docs/reference/api_docs/backend_api/add-variant-from-image.mdx deleted file mode 100644 index d83fb25919..0000000000 --- a/docs/reference/api_docs/backend_api/add-variant-from-image.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /apps/{app_id}/variant/from-image/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/build-image.mdx b/docs/reference/api_docs/backend_api/build-image.mdx deleted file mode 100644 index 9dadb65955..0000000000 --- a/docs/reference/api_docs/backend_api/build-image.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /containers/build_image/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/construct-app-container-url.mdx b/docs/reference/api_docs/backend_api/construct-app-container-url.mdx deleted file mode 100644 index 977a95e464..0000000000 --- a/docs/reference/api_docs/backend_api/construct-app-container-url.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /containers/container_url/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/container-templates.mdx b/docs/reference/api_docs/backend_api/container-templates.mdx deleted file mode 100644 index 9a891b8eac..0000000000 --- a/docs/reference/api_docs/backend_api/container-templates.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /containers/templates/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-app-and-variant-from-template.mdx b/docs/reference/api_docs/backend_api/create-app-and-variant-from-template.mdx deleted file mode 100644 index 7f529bdfe0..0000000000 --- a/docs/reference/api_docs/backend_api/create-app-and-variant-from-template.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /apps/app_and_variant_from_template/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-app.mdx b/docs/reference/api_docs/backend_api/create-app.mdx deleted file mode 100644 index c8b328cbfe..0000000000 --- a/docs/reference/api_docs/backend_api/create-app.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /apps/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-custom-evaluation.mdx b/docs/reference/api_docs/backend_api/create-custom-evaluation.mdx deleted file mode 100644 index 8206397393..0000000000 --- a/docs/reference/api_docs/backend_api/create-custom-evaluation.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /evaluations/custom_evaluation/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-evaluation-scenario.mdx b/docs/reference/api_docs/backend_api/create-evaluation-scenario.mdx deleted file mode 100644 index 1da99b777b..0000000000 --- a/docs/reference/api_docs/backend_api/create-evaluation-scenario.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /evaluations/{evaluation_id}/evaluation_scenario/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-evaluation.mdx b/docs/reference/api_docs/backend_api/create-evaluation.mdx deleted file mode 100644 index e195c03851..0000000000 --- a/docs/reference/api_docs/backend_api/create-evaluation.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /evaluations/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-feedback.mdx b/docs/reference/api_docs/backend_api/create-feedback.mdx deleted file mode 100644 index 887b416669..0000000000 --- a/docs/reference/api_docs/backend_api/create-feedback.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /observability/feedbacks/{trace_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-span.mdx b/docs/reference/api_docs/backend_api/create-span.mdx deleted file mode 100644 index 83d4d0ab8d..0000000000 --- a/docs/reference/api_docs/backend_api/create-span.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /observability/spans/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-testset.mdx b/docs/reference/api_docs/backend_api/create-testset.mdx deleted file mode 100644 index 16ec991a2e..0000000000 --- a/docs/reference/api_docs/backend_api/create-testset.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /testsets/{app_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create-trace.mdx b/docs/reference/api_docs/backend_api/create-trace.mdx deleted file mode 100644 index 3c97c26233..0000000000 --- a/docs/reference/api_docs/backend_api/create-trace.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /observability/traces/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/create_doc_from_openai.sh b/docs/reference/api_docs/backend_api/create_doc_from_openai.sh deleted file mode 100755 index 8c681b84b8..0000000000 --- a/docs/reference/api_docs/backend_api/create_doc_from_openai.sh +++ /dev/null @@ -1 +0,0 @@ -npx @mintlify/scraping@latest openapi-file openapi.json \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/delete-evaluations.mdx b/docs/reference/api_docs/backend_api/delete-evaluations.mdx deleted file mode 100644 index 3e6da2c205..0000000000 --- a/docs/reference/api_docs/backend_api/delete-evaluations.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: delete /evaluations/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/delete-testsets.mdx b/docs/reference/api_docs/backend_api/delete-testsets.mdx deleted file mode 100644 index 4c3f38c113..0000000000 --- a/docs/reference/api_docs/backend_api/delete-testsets.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: delete /testsets/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/deploy-to-environment.mdx b/docs/reference/api_docs/backend_api/deploy-to-environment.mdx deleted file mode 100644 index 602fccf4fc..0000000000 --- a/docs/reference/api_docs/backend_api/deploy-to-environment.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /environments/deploy/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/evaluate-ai-critique.mdx b/docs/reference/api_docs/backend_api/evaluate-ai-critique.mdx deleted file mode 100644 index 5eb6e8e49b..0000000000 --- a/docs/reference/api_docs/backend_api/evaluate-ai-critique.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /evaluations/evaluation_scenario/ai_critique/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/execute-custom-evaluation.mdx b/docs/reference/api_docs/backend_api/execute-custom-evaluation.mdx deleted file mode 100644 index 032d82aaf9..0000000000 --- a/docs/reference/api_docs/backend_api/execute-custom-evaluation.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /evaluations/custom_evaluation/execute/{evaluation_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/fetch-evaluation-scenarios.mdx b/docs/reference/api_docs/backend_api/fetch-evaluation-scenarios.mdx deleted file mode 100644 index ca316f1dac..0000000000 --- a/docs/reference/api_docs/backend_api/fetch-evaluation-scenarios.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /evaluations/{evaluation_id}/evaluation_scenarios/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/fetch-evaluation.mdx b/docs/reference/api_docs/backend_api/fetch-evaluation.mdx deleted file mode 100644 index f1da3d8b9e..0000000000 --- a/docs/reference/api_docs/backend_api/fetch-evaluation.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /evaluations/{evaluation_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/fetch-list-evaluations.mdx b/docs/reference/api_docs/backend_api/fetch-list-evaluations.mdx deleted file mode 100644 index 5924dbeadb..0000000000 --- a/docs/reference/api_docs/backend_api/fetch-list-evaluations.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /evaluations/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/fetch-results.mdx b/docs/reference/api_docs/backend_api/fetch-results.mdx deleted file mode 100644 index 35fc5ac797..0000000000 --- a/docs/reference/api_docs/backend_api/fetch-results.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /evaluations/{evaluation_id}/results/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-config.mdx b/docs/reference/api_docs/backend_api/get-config.mdx deleted file mode 100644 index 1aaeefefdf..0000000000 --- a/docs/reference/api_docs/backend_api/get-config.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /configs/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-custom-evaluation-names.mdx b/docs/reference/api_docs/backend_api/get-custom-evaluation-names.mdx deleted file mode 100644 index 37ee0f9419..0000000000 --- a/docs/reference/api_docs/backend_api/get-custom-evaluation-names.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /evaluations/custom_evaluation/{app_name}/names/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-custom-evaluation.mdx b/docs/reference/api_docs/backend_api/get-custom-evaluation.mdx deleted file mode 100644 index 1dcec993ff..0000000000 --- a/docs/reference/api_docs/backend_api/get-custom-evaluation.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /evaluations/custom_evaluation/{id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-evaluation-scenario-score-router.mdx b/docs/reference/api_docs/backend_api/get-evaluation-scenario-score-router.mdx deleted file mode 100644 index 57bb701acd..0000000000 --- a/docs/reference/api_docs/backend_api/get-evaluation-scenario-score-router.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /evaluations/evaluation_scenario/{evaluation_scenario_id}/score/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-feedback.mdx b/docs/reference/api_docs/backend_api/get-feedback.mdx deleted file mode 100644 index 149c379b1c..0000000000 --- a/docs/reference/api_docs/backend_api/get-feedback.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /observability/feedbacks/{trace_id}/{feedback_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-feedbacks.mdx b/docs/reference/api_docs/backend_api/get-feedbacks.mdx deleted file mode 100644 index 351545ae7e..0000000000 --- a/docs/reference/api_docs/backend_api/get-feedbacks.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /observability/feedbacks/{trace_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-spans-of-trace.mdx b/docs/reference/api_docs/backend_api/get-spans-of-trace.mdx deleted file mode 100644 index 3f7f7cffe7..0000000000 --- a/docs/reference/api_docs/backend_api/get-spans-of-trace.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /observability/spans/{trace_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-trace.mdx b/docs/reference/api_docs/backend_api/get-trace.mdx deleted file mode 100644 index 571e9735b5..0000000000 --- a/docs/reference/api_docs/backend_api/get-trace.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /observability/traces/{trace_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-traces.mdx b/docs/reference/api_docs/backend_api/get-traces.mdx deleted file mode 100644 index 67bb065f2b..0000000000 --- a/docs/reference/api_docs/backend_api/get-traces.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /observability/traces/{app_id}/{variant_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-user-organization.mdx b/docs/reference/api_docs/backend_api/get-user-organization.mdx deleted file mode 100644 index 6678be5328..0000000000 --- a/docs/reference/api_docs/backend_api/get-user-organization.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /organizations/own/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/get-variant-by-env.mdx b/docs/reference/api_docs/backend_api/get-variant-by-env.mdx deleted file mode 100644 index 6b16ffbef2..0000000000 --- a/docs/reference/api_docs/backend_api/get-variant-by-env.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /apps/get_variant_by_env/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/import-testset.mdx b/docs/reference/api_docs/backend_api/import-testset.mdx deleted file mode 100644 index 609352f217..0000000000 --- a/docs/reference/api_docs/backend_api/import-testset.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /testsets/endpoint/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/list-app-variants.mdx b/docs/reference/api_docs/backend_api/list-app-variants.mdx deleted file mode 100644 index 68d9b6aeed..0000000000 --- a/docs/reference/api_docs/backend_api/list-app-variants.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /apps/{app_id}/variants/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/list-apps.mdx b/docs/reference/api_docs/backend_api/list-apps.mdx deleted file mode 100644 index 8de40a6774..0000000000 --- a/docs/reference/api_docs/backend_api/list-apps.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /apps/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/list-bases.mdx b/docs/reference/api_docs/backend_api/list-bases.mdx deleted file mode 100644 index 797c8e4859..0000000000 --- a/docs/reference/api_docs/backend_api/list-bases.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /bases/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/list-custom-evaluations.mdx b/docs/reference/api_docs/backend_api/list-custom-evaluations.mdx deleted file mode 100644 index fffad5e001..0000000000 --- a/docs/reference/api_docs/backend_api/list-custom-evaluations.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /evaluations/custom_evaluation/list/{app_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/list-environments.mdx b/docs/reference/api_docs/backend_api/list-environments.mdx deleted file mode 100644 index 4bbbdc07ef..0000000000 --- a/docs/reference/api_docs/backend_api/list-environments.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /apps/{app_id}/environments/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/list-organizations.mdx b/docs/reference/api_docs/backend_api/list-organizations.mdx deleted file mode 100644 index a47b97254c..0000000000 --- a/docs/reference/api_docs/backend_api/list-organizations.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /organizations/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/openapi.json b/docs/reference/api_docs/backend_api/openapi.json deleted file mode 100644 index 06200605f2..0000000000 --- a/docs/reference/api_docs/backend_api/openapi.json +++ /dev/null @@ -1,4293 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "FastAPI", - "version": "0.1.0" - }, - "servers": [ - { - "url": "https://docs.agenta.ai" - } - ], - "paths": { - "/profile/": { - "get": { - "summary": "User Profile", - "operationId": "user_profile_profile__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/apps/{app_id}/variants/": { - "get": { - "summary": "List App Variants", - "description": "Retrieve a list of app variants for a given app ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve variants for.\n stoken_session (SessionContainer, optional): The session container to verify the user's session. Defaults to Depends(verify_session()).\n\nReturns:\n List[AppVariantOutput]: A list of app variants for the given app ID.", - "operationId": "list_app_variants_apps__app_id__variants__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response List App Variants Apps App Id Variants Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/AppVariantOutput" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/apps/get_variant_by_env/": { - "get": { - "summary": "Get Variant By Env", - "description": "Retrieve the app variant based on the provided app_id and environment.\n\nArgs:\n app_id (str): The ID of the app to retrieve the variant for.\n environment (str): The environment of the app variant to retrieve.\n stoken_session (SessionContainer, optional): The session token container. Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500).\n\nReturns:\n AppVariantOutput: The retrieved app variant.", - "operationId": "get_variant_by_env_apps_get_variant_by_env__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "query" - }, - { - "required": true, - "schema": { - "title": "Environment", - "type": "string" - }, - "name": "environment", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppVariantOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/apps/": { - "get": { - "summary": "List Apps", - "description": "Retrieve a list of apps filtered by app_name and org_id.\n\nArgs:\n app_name (Optional[str]): The name of the app to filter by.\n org_id (Optional[str]): The ID of the organization to filter by.\n stoken_session (SessionContainer): The session container.\n\nReturns:\n List[App]: A list of apps filtered by app_name and org_id.\n\nRaises:\n HTTPException: If there was an error retrieving the list of apps.", - "operationId": "list_apps_apps__get", - "parameters": [ - { - "required": false, - "schema": { - "title": "App Name", - "type": "string" - }, - "name": "app_name", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "Org Id", - "type": "string" - }, - "name": "org_id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response List Apps Apps Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/App" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "summary": "Create App", - "description": "Create a new app for a user or organization.\n\nArgs:\n payload (CreateApp): The payload containing the app name and organization ID (optional).\n stoken_session (SessionContainer): The session container containing the user's session token.\n\nReturns:\n CreateAppOutput: The output containing the newly created app's ID and name.\n\nRaises:\n HTTPException: If there is an error creating the app or the user does not have permission to access the app.", - "operationId": "create_app_apps__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateApp" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAppOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/apps/{app_id}/variant/from-image/": { - "post": { - "summary": "Add Variant From Image", - "description": "Add a new variant to an app based on a Docker image.\n\nArgs:\n app_id (str): The ID of the app to add the variant to.\n payload (AddVariantFromImagePayload): The payload containing information about the variant to add.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If the feature flag is set to \"demo\" or if the image does not have a tag starting with the registry name (agenta-server) or if the image is not found or if the user does not have access to the app.\n\nReturns:\n dict: The newly added variant.", - "operationId": "add_variant_from_image_apps__app_id__variant_from_image__post", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddVariantFromImagePayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/apps/{app_id}/": { - "delete": { - "summary": "Remove App", - "description": "Remove app, all its variant, containers and images\n\nArguments:\n app -- App to remove", - "operationId": "remove_app_apps__app_id___delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/apps/app_and_variant_from_template/": { - "post": { - "summary": "Create App And Variant From Template", - "description": "Create an app and variant from a template.\n\nArgs:\n payload (CreateAppVariant): The payload containing the app and variant information.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If the user has reached the app limit or if an app with the same name already exists.\n\nReturns:\n AppVariantOutput: The output of the created app variant.", - "operationId": "create_app_and_variant_from_template_apps_app_and_variant_from_template__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAppVariant" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppVariantOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/apps/{app_id}/environments/": { - "get": { - "summary": "List Environments", - "description": "Retrieve a list of environments for a given app ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve environments for.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nReturns:\n List[EnvironmentOutput]: A list of environment objects.", - "operationId": "list_environments_apps__app_id__environments__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response List Environments Apps App Id Environments Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/EnvironmentOutput" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/variants/from-base/": { - "post": { - "summary": "Add Variant From Base And Config", - "description": "Add a new variant based on an existing one.\nSame as POST /config\n\nArgs:\n payload (AddVariantFromBasePayload): Payload containing base variant ID, new variant name, and parameters.\n stoken_session (SessionContainer, optional): Session container. Defaults to result of verify_session().\n\nRaises:\n HTTPException: Raised if the variant could not be added or accessed.\n\nReturns:\n Union[AppVariantOutput, Any]: New variant details or exception.", - "operationId": "add_variant_from_base_and_config_variants_from_base__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddVariantFromBasePayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Add Variant From Base And Config Variants From Base Post", - "anyOf": [ - { - "$ref": "#/components/schemas/AppVariantOutput" - }, - {} - ] - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/variants/{variant_id}/": { - "put": { - "summary": "Start Variant", - "description": "Start a variant of an app.\n\nArgs:\n variant_id (str): The ID of the variant to start.\n action (VariantAction): The action to perform on the variant (start).\n env_vars (Optional[DockerEnvVars], optional): The environment variables to inject to the Docker container. Defaults to None.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nReturns:\n URI: The URL of the started variant.\n\nRaises:\n HTTPException: If the app container cannot be started.", - "operationId": "start_variant_variants__variant_id___put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Variant Id", - "type": "string" - }, - "name": "variant_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Body_start_variant_variants__variant_id___put" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/URI" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "summary": "Remove Variant", - "description": "Remove a variant from the server.\nIn the case it's the last variant using the image, stop the container and remove the image.\n\nArguments:\n app_variant -- AppVariant to remove\n\nRaises:\n HTTPException: If there is a problem removing the app variant", - "operationId": "remove_variant_variants__variant_id___delete", - "parameters": [ - { - "required": true, - "schema": { - "title": "Variant Id", - "type": "string" - }, - "name": "variant_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/variants/{variant_id}/parameters/": { - "put": { - "summary": "Update Variant Parameters", - "description": "Updates the parameters for an app variant.\n\nArgs:\n variant_id (str): The ID of the app variant to update.\n payload (UpdateVariantParameterPayload): The payload containing the updated parameters.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If there is an error while trying to update the app variant.\n\nReturns:\n JSONResponse: A JSON response containing the updated app variant parameters.", - "operationId": "update_variant_parameters_variants__variant_id__parameters__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Variant Id", - "type": "string" - }, - "name": "variant_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateVariantParameterPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/variants/{variant_id}/image/": { - "put": { - "summary": "Update Variant Image", - "description": "Updates the image used in an app variant.\n\nArgs:\n variant_id (str): The ID of the app variant to update.\n image (Image): The image information to update.\n\nRaises:\n HTTPException: If an error occurs while trying to update the app variant.\n\nReturns:\n JSONResponse: A JSON response indicating whether the update was successful or not.", - "operationId": "update_variant_image_variants__variant_id__image__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Variant Id", - "type": "string" - }, - "name": "variant_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Image" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/": { - "get": { - "summary": "Fetch List Evaluations", - "description": "Fetches a list of evaluations, optionally filtered by an app ID.\n\nArgs:\n app_id (Optional[str]): An optional app ID to filter the evaluations.\n\nReturns:\n List[Evaluation]: A list of evaluations.", - "operationId": "fetch_list_evaluations_evaluations__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Fetch List Evaluations Evaluations Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/Evaluation" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "summary": "Create Evaluation", - "description": "Creates a new comparison table document\nRaises:\n HTTPException: _description_\nReturns:\n _description_", - "operationId": "create_evaluation_evaluations__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewEvaluation" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SimpleEvaluationOutput" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete Evaluations", - "description": "Delete specific comparison tables based on their unique IDs.\n\nArgs:\ndelete_evaluations (List[str]): The unique identifiers of the comparison tables to delete.\n\nReturns:\nA list of the deleted comparison tables' IDs.", - "operationId": "delete_evaluations_evaluations__delete", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteEvaluation" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Delete Evaluations Evaluations Delete", - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/{evaluation_id}/": { - "get": { - "summary": "Fetch Evaluation", - "description": "Fetches a single evaluation based on its ID.\n\nArgs:\n evaluation_id (str): The ID of the evaluation to fetch.\n\nReturns:\n Evaluation: The fetched evaluation.", - "operationId": "fetch_evaluation_evaluations__evaluation_id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Id", - "type": "string" - }, - "name": "evaluation_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Evaluation" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Update Evaluation Router", - "description": "Updates an evaluation's status.\n\nRaises:\n HTTPException: If the columns in the test set do not match with the inputs in the variant.\n\nReturns:\n None: A 204 No Content status code, indicating that the update was successful.", - "operationId": "update_evaluation_router_evaluations__evaluation_id___put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Id", - "type": "string" - }, - "name": "evaluation_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/{evaluation_id}/evaluation_scenarios/": { - "get": { - "summary": "Fetch Evaluation Scenarios", - "description": "Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.", - "operationId": "fetch_evaluation_scenarios_evaluations__evaluation_id__evaluation_scenarios__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Id", - "type": "string" - }, - "name": "evaluation_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Fetch Evaluation Scenarios Evaluations Evaluation Id Evaluation Scenarios Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationScenario" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/{evaluation_id}/evaluation_scenario/": { - "post": { - "summary": "Create Evaluation Scenario", - "description": "Create a new evaluation scenario for a given evaluation ID.\n\nRaises:\n HTTPException: If evaluation not found or access denied.\n\nReturns:\n None: 204 No Content status code upon success.", - "operationId": "create_evaluation_scenario_evaluations__evaluation_id__evaluation_scenario__post", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Id", - "type": "string" - }, - "name": "evaluation_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationScenario" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/{evaluation_id}/evaluation_scenario/{evaluation_scenario_id}/{evaluation_type}/": { - "put": { - "summary": "Update Evaluation Scenario Router", - "description": "Updates an evaluation scenario's vote or score based on its type.\n\nRaises:\n HTTPException: If update fails or unauthorized.\n\nReturns:\n None: 204 No Content status code upon successful update.", - "operationId": "update_evaluation_scenario_router_evaluations__evaluation_id__evaluation_scenario__evaluation_scenario_id___evaluation_type___put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Scenario Id", - "type": "string" - }, - "name": "evaluation_scenario_id", - "in": "path" - }, - { - "required": true, - "schema": { - "$ref": "#/components/schemas/EvaluationType" - }, - "name": "evaluation_type", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationScenarioUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/evaluation_scenario/ai_critique/": { - "post": { - "summary": "Evaluate Ai Critique", - "description": "Evaluate AI critique based on the given payload.\n\nArgs:\n payload (AICritiqueCreate): The payload containing data for AI critique evaluation.\n stoken_session (SessionContainer): The session container verified by `verify_session`.\n\nReturns:\n str: The output of the AI critique evaluation.\n\nRaises:\n HTTPException: If any exception occurs during the evaluation.", - "operationId": "evaluate_ai_critique_evaluations_evaluation_scenario_ai_critique__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AICritiqueCreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Evaluate Ai Critique Evaluations Evaluation Scenario Ai Critique Post", - "type": "string" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/evaluation_scenario/{evaluation_scenario_id}/score/": { - "get": { - "summary": "Get Evaluation Scenario Score Router", - "description": "Fetch the score of a specific evaluation scenario.\n\nArgs:\n evaluation_scenario_id: The ID of the evaluation scenario to fetch.\n stoken_session: Session data, verified by `verify_session`.\n\nReturns:\n Dictionary containing the scenario ID and its score.", - "operationId": "get_evaluation_scenario_score_router_evaluations_evaluation_scenario__evaluation_scenario_id__score__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Scenario Id", - "type": "string" - }, - "name": "evaluation_scenario_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Evaluation Scenario Score Router Evaluations Evaluation Scenario Evaluation Scenario Id Score Get", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Update Evaluation Scenario Score Router", - "description": "Updates the score of an evaluation scenario.\n\nRaises:\n HTTPException: Server error if the evaluation update fails.\n\nReturns:\n None: 204 No Content status code upon successful update.", - "operationId": "update_evaluation_scenario_score_router_evaluations_evaluation_scenario__evaluation_scenario_id__score__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Scenario Id", - "type": "string" - }, - "name": "evaluation_scenario_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationScenarioScoreUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/{evaluation_id}/results/": { - "get": { - "summary": "Fetch Results", - "description": "Fetch all the results for one the comparison table\n\nArguments:\n evaluation_id -- _description_\n\nReturns:\n _description_", - "operationId": "fetch_results_evaluations__evaluation_id__results__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Id", - "type": "string" - }, - "name": "evaluation_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/custom_evaluation/": { - "post": { - "summary": "Create Custom Evaluation", - "description": "Create evaluation with custom python code.\n\n Args:\n \ncustom_evaluation_payload (CreateCustomEvaluation): the required payload", - "operationId": "create_custom_evaluation_evaluations_custom_evaluation__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateCustomEvaluation" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/custom_evaluation/{id}": { - "put": { - "summary": "Update Custom Evaluation", - "description": "Update a custom code evaluation.\nArgs:\n id (str): the ID of the custom evaluation to update\n updated_data (CreateCustomEvaluation): the payload with updated data\n stoken_session (SessionContainer): session container for authentication", - "operationId": "update_custom_evaluation_evaluations_custom_evaluation__id__put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Id", - "type": "string" - }, - "name": "id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateCustomEvaluation" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/custom_evaluation/list/{app_id}/": { - "get": { - "summary": "List Custom Evaluations", - "description": "List the custom code evaluations for a given app.\n\nArgs:\n app_id (str): the id of the app\n\nReturns:\n List[CustomEvaluationOutput]: a list of custom evaluation", - "operationId": "list_custom_evaluations_evaluations_custom_evaluation_list__app_id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response List Custom Evaluations Evaluations Custom Evaluation List App Id Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomEvaluationOutput" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/custom_evaluation/{id}/": { - "get": { - "summary": "Get Custom Evaluation", - "description": "Get the custom code evaluation detail.\n\nArgs:\n id (str): the id of the custom evaluation\n\nReturns:\n CustomEvaluationDetail: Detail of the custom evaluation", - "operationId": "get_custom_evaluation_evaluations_custom_evaluation__id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Id", - "type": "string" - }, - "name": "id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomEvaluationDetail" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/custom_evaluation/{app_name}/names/": { - "get": { - "summary": "Get Custom Evaluation Names", - "description": "Get the names of custom evaluation for a given app.\n\nArgs:\n app_name (str): the name of the app the evaluation belongs to\n\nReturns:\n List[CustomEvaluationNames]: the list of name of custom evaluations", - "operationId": "get_custom_evaluation_names_evaluations_custom_evaluation__app_name__names__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Name", - "type": "string" - }, - "name": "app_name", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Custom Evaluation Names Evaluations Custom Evaluation App Name Names Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomEvaluationNames" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/custom_evaluation/execute/{evaluation_id}/": { - "post": { - "summary": "Execute Custom Evaluation", - "description": "Execute a custom evaluation code.\n\nArgs:\n evaluation_id (str): the custom evaluation id\n payload (ExecuteCustomEvaluationCode): the required payload\n\nReturns:\n float: the result of the evaluation custom code", - "operationId": "execute_custom_evaluation_evaluations_custom_evaluation_execute__evaluation_id___post", - "parameters": [ - { - "required": true, - "schema": { - "title": "Evaluation Id", - "type": "string" - }, - "name": "evaluation_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExecuteCustomEvaluationCode" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/evaluations/webhook_example_fake/": { - "post": { - "summary": "Webhook Example Fake", - "description": "Returns a fake score response for example webhook evaluation\n\nReturns:\n _description_", - "operationId": "webhook_example_fake_evaluations_webhook_example_fake__post", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationWebhook" - } - } - } - } - } - } - }, - "/testsets/upload/": { - "post": { - "summary": "Upload File", - "description": "Uploads a CSV or JSON file and saves its data to MongoDB.\n\nArgs:\nupload_type : Either a json or csv file.\n file (UploadFile): The CSV or JSON file to upload.\n testset_name (Optional): the name of the testset if provided.\n\nReturns:\n dict: The result of the upload process.", - "operationId": "upload_file_testsets_upload__post", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_upload_file_testsets_upload__post" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TestSetSimpleResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/testsets/endpoint/": { - "post": { - "summary": "Import Testset", - "description": "Import JSON testset data from an endpoint and save it to MongoDB.\n\nArgs:\n endpoint (str): An endpoint URL to import data from.\n testset_name (str): the name of the testset if provided.\n\nReturns:\n dict: The result of the import process.", - "operationId": "import_testset_testsets_endpoint__post", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Body_import_testset_testsets_endpoint__post" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TestSetSimpleResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/testsets/{app_id}/": { - "post": { - "summary": "Create Testset", - "description": "Create a testset with given name and app_name, save the testset to MongoDB.\n\nArgs:\nname (str): name of the test set.\napp_name (str): name of the application.\ntestset (Dict[str, str]): test set data.\n\nReturns:\nstr: The id of the test set created.", - "operationId": "create_testset_testsets__app_id___post", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewTestset" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/testsets/{testset_id}/": { - "get": { - "tags": [ - "testsets" - ], - "summary": "Get Testset", - "description": "Fetch a specific testset in a MongoDB collection using its _id.\n\nArgs:\n testset_id (str): The _id of the testset to fetch.\n\nReturns:\n The requested testset if found, else an HTTPException.", - "operationId": "get_testset_testsets__testset_id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Testset Id", - "type": "string" - }, - "name": "testset_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Update Testset", - "description": "Update a testset with given id, update the testset in MongoDB.\n\nArgs:\ntestset_id (str): id of the test set to be updated.\ncsvdata (NewTestset): New data to replace the old testset.\n\nReturns:\nstr: The id of the test set updated.", - "operationId": "update_testset_testsets__testset_id___put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Testset Id", - "type": "string" - }, - "name": "testset_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewTestset" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/testsets/": { - "get": { - "tags": [ - "testsets" - ], - "summary": "Get Testsets", - "description": "Get all testsets.\n\nReturns:\n- A list of testset objects.\n\nRaises:\n- `HTTPException` with status code 404 if no testsets are found.", - "operationId": "get_testsets_testsets__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Testsets Testsets Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/TestSetOutputResponse" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "summary": "Delete Testsets", - "description": "Delete specific testsets based on their unique IDs.\n\nArgs:\ntestset_ids (List[str]): The unique identifiers of the testsets to delete.\n\nReturns:\nA list of the deleted testsets' IDs.", - "operationId": "delete_testsets_testsets__delete", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTestsets" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Delete Testsets Testsets Delete", - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/containers/build_image/": { - "post": { - "summary": "Build Image", - "description": "Builds a Docker image from a tar file containing the application code.\n\nArgs:\n app_id (str): The ID of the application to build the image for.\n base_name (str): The base name of the image to build.\n tar_file (UploadFile): The tar file containing the application code.\n stoken_session (SessionContainer): The session container for the user making the request.\n\nReturns:\n Image: The Docker image that was built.", - "operationId": "build_image_containers_build_image__post", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "query" - }, - { - "required": true, - "schema": { - "title": "Base Name", - "type": "string" - }, - "name": "base_name", - "in": "query" - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_build_image_containers_build_image__post" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Image" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/containers/restart_container/": { - "post": { - "summary": "Restart Docker Container", - "description": "Restart docker container.\n\nArgs:\n payload (RestartAppContainer) -- the required data (app_name and variant_name)", - "operationId": "restart_docker_container_containers_restart_container__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RestartAppContainer" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Restart Docker Container Containers Restart Container Post", - "type": "object" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/containers/templates/": { - "get": { - "summary": "Container Templates", - "description": "Returns a list of templates available for creating new containers.\n\nParameters:\nstoken_session (SessionContainer): The session container for the user.\n\nReturns:\n\nUnion[List[Template], str]: A list of templates or an error message.", - "operationId": "container_templates_containers_templates__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Container Templates Containers Templates Get", - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Template" - } - }, - { - "type": "string" - } - ] - } - } - } - } - } - } - }, - "/containers/container_url/": { - "get": { - "summary": "Construct App Container Url", - "description": "Constructs the URL for an app container based on the provided base_id or variant_id.\n\nArgs:\n base_id (Optional[str]): The ID of the base to use for the app container.\n variant_id (Optional[str]): The ID of the variant to use for the app container.\n stoken_session (SessionContainer): The session container for the user.\n\nReturns:\n URI: The URI for the app container.\n\nRaises:\n HTTPException: If the base or variant cannot be found or the user does not have access.", - "operationId": "construct_app_container_url_containers_container_url__get", - "parameters": [ - { - "required": false, - "schema": { - "title": "Base Id", - "type": "string" - }, - "name": "base_id", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "Variant Id", - "type": "string" - }, - "name": "variant_id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/URI" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/environments/deploy/": { - "post": { - "summary": "Deploy To Environment", - "description": "Deploys a given variant to an environment\n\nArgs:\n environment_name: Name of the environment to deploy to.\n variant_id: variant id to deploy.\n stoken_session: . Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If the deployment fails.", - "operationId": "deploy_to_environment_environments_deploy__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployToEnvironmentPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/observability/traces/": { - "post": { - "summary": "Create Trace", - "operationId": "create_trace_observability_traces__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTrace" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Create Trace Observability Traces Post", - "type": "string" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/observability/traces/{app_id}/{variant_id}/": { - "get": { - "summary": "Get Traces", - "operationId": "get_traces_observability_traces__app_id___variant_id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Variant Id", - "type": "string" - }, - "name": "variant_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Traces Observability Traces App Id Variant Id Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/Trace" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/observability/traces/{trace_id}/": { - "get": { - "summary": "Get Trace", - "operationId": "get_trace_observability_traces__trace_id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Trace Id", - "type": "string" - }, - "name": "trace_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Trace" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Update Trace Status", - "operationId": "update_trace_status_observability_traces__trace_id___put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Trace Id", - "type": "string" - }, - "name": "trace_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTrace" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Update Trace Status Observability Traces Trace Id Put", - "type": "boolean" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/observability/spans/": { - "post": { - "summary": "Create Span", - "operationId": "create_span_observability_spans__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSpan" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Create Span Observability Spans Post", - "type": "string" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/observability/spans/{trace_id}/": { - "get": { - "summary": "Get Spans Of Trace", - "operationId": "get_spans_of_trace_observability_spans__trace_id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Trace Id", - "type": "string" - }, - "name": "trace_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Spans Of Trace Observability Spans Trace Id Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/Span" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/observability/feedbacks/{trace_id}/": { - "get": { - "summary": "Get Feedbacks", - "operationId": "get_feedbacks_observability_feedbacks__trace_id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Trace Id", - "type": "string" - }, - "name": "trace_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Get Feedbacks Observability Feedbacks Trace Id Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/Feedback" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "summary": "Create Feedback", - "operationId": "create_feedback_observability_feedbacks__trace_id___post", - "parameters": [ - { - "required": true, - "schema": { - "title": "Trace Id", - "type": "string" - }, - "name": "trace_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFeedback" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response Create Feedback Observability Feedbacks Trace Id Post", - "type": "string" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/observability/feedbacks/{trace_id}/{feedback_id}/": { - "get": { - "summary": "Get Feedback", - "operationId": "get_feedback_observability_feedbacks__trace_id___feedback_id___get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Trace Id", - "type": "string" - }, - "name": "trace_id", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Feedback Id", - "type": "string" - }, - "name": "feedback_id", - "in": "path" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Feedback" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Update Feedback", - "operationId": "update_feedback_observability_feedbacks__trace_id___feedback_id___put", - "parameters": [ - { - "required": true, - "schema": { - "title": "Trace Id", - "type": "string" - }, - "name": "trace_id", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Feedback Id", - "type": "string" - }, - "name": "feedback_id", - "in": "path" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateFeedback" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Feedback" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/organizations/": { - "get": { - "summary": "List Organizations", - "description": "Returns a list of organizations associated with the user's session.\n\nArgs:\n stoken_session (SessionContainer): The user's session token.\n\nReturns:\n list[Organization]: A list of organizations associated with the user's session.\n\nRaises:\n HTTPException: If there is an error retrieving the organizations from the database.", - "operationId": "list_organizations_organizations__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response List Organizations Organizations Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/Organization" - } - } - } - } - } - } - } - }, - "/organizations/own/": { - "get": { - "summary": "Get User Organization", - "operationId": "get_user_organization_organizations_own__get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/bases/": { - "get": { - "summary": "List Bases", - "description": "Retrieve a list of bases filtered by app_id and base_name.\n\nArgs:\n request (Request): The incoming request.\n app_id (Optional[str], optional): The ID of the app to filter by. Defaults to None.\n base_name (Optional[str], optional): The name of the base to filter by. Defaults to None.\n\nReturns:\n List[BaseOutput]: A list of BaseOutput objects representing the filtered bases.\n\nRaises:\n HTTPException: If there was an error retrieving the bases.", - "operationId": "list_bases_bases__get", - "parameters": [ - { - "required": false, - "schema": { - "title": "App Id", - "type": "string" - }, - "name": "app_id", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "Base Name", - "type": "string" - }, - "name": "base_name", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "title": "Response List Bases Bases Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseOutput" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/configs/": { - "get": { - "summary": "Get Config", - "operationId": "get_config_configs__get", - "parameters": [ - { - "required": true, - "schema": { - "title": "Base Id", - "type": "string" - }, - "name": "base_id", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "Config Name", - "type": "string" - }, - "name": "config_name", - "in": "query" - }, - { - "required": false, - "schema": { - "title": "Environment Name", - "type": "string" - }, - "name": "environment_name", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConfigReponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "summary": "Save Config", - "operationId": "save_config_configs__post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveConfigPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "AICritiqueCreate": { - "title": "AICritiqueCreate", - "required": [ - "correct_answer", - "inputs", - "outputs" - ], - "type": "object", - "properties": { - "correct_answer": { - "title": "Correct Answer", - "type": "string" - }, - "llm_app_prompt_template": { - "title": "Llm App Prompt Template", - "type": "string" - }, - "inputs": { - "title": "Inputs", - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationScenarioInput" - } - }, - "outputs": { - "title": "Outputs", - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationScenarioOutput" - } - }, - "evaluation_prompt_template": { - "title": "Evaluation Prompt Template", - "type": "string" - }, - "open_ai_key": { - "title": "Open Ai Key", - "type": "string" - } - } - }, - "AddVariantFromBasePayload": { - "title": "AddVariantFromBasePayload", - "required": [ - "base_id", - "new_variant_name", - "new_config_name", - "parameters" - ], - "type": "object", - "properties": { - "base_id": { - "title": "Base Id", - "type": "string" - }, - "new_variant_name": { - "title": "New Variant Name", - "type": "string" - }, - "new_config_name": { - "title": "New Config Name", - "type": "string" - }, - "parameters": { - "title": "Parameters", - "type": "object" - } - } - }, - "AddVariantFromImagePayload": { - "title": "AddVariantFromImagePayload", - "required": [ - "variant_name", - "docker_id", - "tags" - ], - "type": "object", - "properties": { - "variant_name": { - "title": "Variant Name", - "type": "string" - }, - "docker_id": { - "title": "Docker Id", - "type": "string" - }, - "tags": { - "title": "Tags", - "type": "string" - }, - "base_name": { - "title": "Base Name", - "type": "string" - }, - "config_name": { - "title": "Config Name", - "type": "string" - } - } - }, - "App": { - "title": "App", - "required": [ - "app_id", - "app_name" - ], - "type": "object", - "properties": { - "app_id": { - "title": "App Id", - "type": "string" - }, - "app_name": { - "title": "App Name", - "type": "string" - } - } - }, - "AppVariantOutput": { - "title": "AppVariantOutput", - "required": [ - "app_id", - "app_name", - "variant_id", - "variant_name", - "organization_id", - "user_id", - "base_name", - "base_id", - "config_name" - ], - "type": "object", - "properties": { - "app_id": { - "title": "App Id", - "type": "string" - }, - "app_name": { - "title": "App Name", - "type": "string" - }, - "variant_id": { - "title": "Variant Id", - "type": "string" - }, - "variant_name": { - "title": "Variant Name", - "type": "string" - }, - "parameters": { - "title": "Parameters", - "type": "object" - }, - "previous_variant_name": { - "title": "Previous Variant Name", - "type": "string" - }, - "organization_id": { - "title": "Organization Id", - "type": "string" - }, - "user_id": { - "title": "User Id", - "type": "string" - }, - "base_name": { - "title": "Base Name", - "type": "string" - }, - "base_id": { - "title": "Base Id", - "type": "string" - }, - "config_name": { - "title": "Config Name", - "type": "string" - }, - "uri": { - "title": "Uri", - "type": "string" - } - } - }, - "BaseOutput": { - "title": "BaseOutput", - "required": [ - "base_id", - "base_name" - ], - "type": "object", - "properties": { - "base_id": { - "title": "Base Id", - "type": "string" - }, - "base_name": { - "title": "Base Name", - "type": "string" - } - } - }, - "Body_build_image_containers_build_image__post": { - "title": "Body_build_image_containers_build_image__post", - "required": [ - "tar_file" - ], - "type": "object", - "properties": { - "tar_file": { - "title": "Tar File", - "type": "string", - "format": "binary" - } - } - }, - "Body_import_testset_testsets_endpoint__post": { - "title": "Body_import_testset_testsets_endpoint__post", - "type": "object", - "properties": { - "endpoint": { - "title": "Endpoint", - "type": "string" - }, - "testset_name": { - "title": "Testset Name", - "type": "string" - }, - "app_id": { - "title": "App Id", - "type": "string" - } - } - }, - "Body_start_variant_variants__variant_id___put": { - "title": "Body_start_variant_variants__variant_id___put", - "required": [ - "action" - ], - "type": "object", - "properties": { - "action": { - "$ref": "#/components/schemas/VariantAction" - }, - "env_vars": { - "$ref": "#/components/schemas/DockerEnvVars" - } - } - }, - "Body_upload_file_testsets_upload__post": { - "title": "Body_upload_file_testsets_upload__post", - "required": [ - "file" - ], - "type": "object", - "properties": { - "upload_type": { - "title": "Upload Type", - "type": "string" - }, - "file": { - "title": "File", - "type": "string", - "format": "binary" - }, - "testset_name": { - "title": "Testset Name", - "type": "string" - }, - "app_id": { - "title": "App Id", - "type": "string" - } - } - }, - "CreateApp": { - "title": "CreateApp", - "required": [ - "app_name" - ], - "type": "object", - "properties": { - "app_name": { - "title": "App Name", - "type": "string" - }, - "organization_id": { - "title": "Organization Id", - "type": "string" - } - } - }, - "CreateAppOutput": { - "title": "CreateAppOutput", - "required": [ - "app_id", - "app_name" - ], - "type": "object", - "properties": { - "app_id": { - "title": "App Id", - "type": "string" - }, - "app_name": { - "title": "App Name", - "type": "string" - } - } - }, - "CreateAppVariant": { - "title": "CreateAppVariant", - "required": [ - "app_name", - "template_id", - "env_vars" - ], - "type": "object", - "properties": { - "app_name": { - "title": "App Name", - "type": "string" - }, - "template_id": { - "title": "Template Id", - "type": "string" - }, - "env_vars": { - "title": "Env Vars", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "organization_id": { - "title": "Organization Id", - "type": "string" - } - } - }, - "CreateCustomEvaluation": { - "title": "CreateCustomEvaluation", - "required": [ - "evaluation_name", - "python_code", - "app_id" - ], - "type": "object", - "properties": { - "evaluation_name": { - "title": "Evaluation Name", - "type": "string" - }, - "python_code": { - "title": "Python Code", - "type": "string" - }, - "app_id": { - "title": "App Id", - "type": "string" - } - } - }, - "CreateFeedback": { - "title": "CreateFeedback", - "type": "object", - "properties": { - "feedback": { - "title": "Feedback", - "type": "string" - }, - "score": { - "title": "Score", - "type": "number" - }, - "meta": { - "title": "Meta", - "type": "object" - } - } - }, - "CreateSpan": { - "title": "CreateSpan", - "required": [ - "event_name", - "start_time", - "status", - "end_time" - ], - "type": "object", - "properties": { - "parent_span_id": { - "title": "Parent Span Id", - "type": "string" - }, - "meta": { - "title": "Meta", - "type": "object" - }, - "event_name": { - "title": "Event Name", - "type": "string" - }, - "event_type": { - "title": "Event Type", - "type": "string" - }, - "start_time": { - "title": "Start Time", - "type": "string", - "format": "date-time" - }, - "duration": { - "title": "Duration", - "type": "integer" - }, - "status": { - "title": "Status", - "type": "string" - }, - "end_time": { - "title": "End Time", - "type": "string", - "format": "date-time" - }, - "inputs": { - "title": "Inputs", - "type": "array", - "items": { - "type": "string" - } - }, - "outputs": { - "title": "Outputs", - "type": "array", - "items": { - "type": "string" - } - }, - "prompt_template": { - "title": "Prompt Template", - "type": "string" - }, - "tokens_input": { - "title": "Tokens Input", - "type": "integer" - }, - "tokens_output": { - "title": "Tokens Output", - "type": "integer" - }, - "token_total": { - "title": "Token Total", - "type": "integer" - }, - "cost": { - "title": "Cost", - "type": "number" - }, - "tags": { - "title": "Tags", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "CreateTrace": { - "title": "CreateTrace", - "required": [ - "latency", - "status", - "start_time", - "end_time", - "spans" - ], - "type": "object", - "properties": { - "app_id": { - "title": "App Id", - "type": "string" - }, - "variant_id": { - "title": "Variant Id", - "type": "string" - }, - "cost": { - "title": "Cost", - "type": "number" - }, - "latency": { - "title": "Latency", - "type": "number" - }, - "status": { - "title": "Status", - "type": "string" - }, - "token_consumption": { - "title": "Token Consumption", - "type": "integer" - }, - "tags": { - "title": "Tags", - "type": "array", - "items": { - "type": "string" - } - }, - "start_time": { - "title": "Start Time", - "type": "string", - "format": "date-time" - }, - "end_time": { - "title": "End Time", - "type": "string", - "format": "date-time" - }, - "spans": { - "title": "Spans", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "CustomEvaluationDetail": { - "title": "CustomEvaluationDetail", - "required": [ - "id", - "app_id", - "evaluation_name", - "python_code", - "created_at", - "updated_at" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "app_id": { - "title": "App Id", - "type": "string" - }, - "evaluation_name": { - "title": "Evaluation Name", - "type": "string" - }, - "python_code": { - "title": "Python Code", - "type": "string" - }, - "created_at": { - "title": "Created At", - "type": "string", - "format": "date-time" - }, - "updated_at": { - "title": "Updated At", - "type": "string", - "format": "date-time" - } - } - }, - "CustomEvaluationNames": { - "title": "CustomEvaluationNames", - "required": [ - "id", - "evaluation_name" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "evaluation_name": { - "title": "Evaluation Name", - "type": "string" - } - } - }, - "CustomEvaluationOutput": { - "title": "CustomEvaluationOutput", - "required": [ - "id", - "app_id", - "evaluation_name", - "created_at" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "app_id": { - "title": "App Id", - "type": "string" - }, - "evaluation_name": { - "title": "Evaluation Name", - "type": "string" - }, - "created_at": { - "title": "Created At", - "type": "string", - "format": "date-time" - } - } - }, - "DeleteEvaluation": { - "title": "DeleteEvaluation", - "required": [ - "evaluations_ids" - ], - "type": "object", - "properties": { - "evaluations_ids": { - "title": "Evaluations Ids", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "DeleteTestsets": { - "title": "DeleteTestsets", - "required": [ - "testset_ids" - ], - "type": "object", - "properties": { - "testset_ids": { - "title": "Testset Ids", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "DeployToEnvironmentPayload": { - "title": "DeployToEnvironmentPayload", - "required": [ - "environment_name", - "variant_id" - ], - "type": "object", - "properties": { - "environment_name": { - "title": "Environment Name", - "type": "string" - }, - "variant_id": { - "title": "Variant Id", - "type": "string" - } - } - }, - "DockerEnvVars": { - "title": "DockerEnvVars", - "required": [ - "env_vars" - ], - "type": "object", - "properties": { - "env_vars": { - "title": "Env Vars", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "EnvironmentOutput": { - "title": "EnvironmentOutput", - "required": [ - "name", - "app_id" - ], - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "app_id": { - "title": "App Id", - "type": "string" - }, - "deployed_app_variant_id": { - "title": "Deployed App Variant Id", - "type": "string" - }, - "deployed_variant_name": { - "title": "Deployed Variant Name", - "type": "string" - } - } - }, - "Evaluation": { - "title": "Evaluation", - "required": [ - "id", - "app_id", - "user_id", - "user_username", - "evaluation_type", - "variant_ids", - "variant_names", - "testset_id", - "testset_name", - "status", - "created_at", - "updated_at" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "app_id": { - "title": "App Id", - "type": "string" - }, - "user_id": { - "title": "User Id", - "type": "string" - }, - "user_username": { - "title": "User Username", - "type": "string" - }, - "evaluation_type": { - "$ref": "#/components/schemas/EvaluationType" - }, - "evaluation_type_settings": { - "$ref": "#/components/schemas/EvaluationTypeSettings" - }, - "variant_ids": { - "title": "Variant Ids", - "type": "array", - "items": { - "type": "string" - } - }, - "variant_names": { - "title": "Variant Names", - "type": "array", - "items": { - "type": "string" - } - }, - "testset_id": { - "title": "Testset Id", - "type": "string" - }, - "testset_name": { - "title": "Testset Name", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "created_at": { - "title": "Created At", - "type": "string", - "format": "date-time" - }, - "updated_at": { - "title": "Updated At", - "type": "string", - "format": "date-time" - } - } - }, - "EvaluationScenario": { - "title": "EvaluationScenario", - "required": [ - "evaluation_id", - "inputs", - "outputs" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "evaluation_id": { - "title": "Evaluation Id", - "type": "string" - }, - "inputs": { - "title": "Inputs", - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationScenarioInput" - } - }, - "outputs": { - "title": "Outputs", - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationScenarioOutput" - } - }, - "vote": { - "title": "Vote", - "type": "string" - }, - "score": { - "title": "Score", - "type": "string" - }, - "evaluation": { - "title": "Evaluation", - "type": "string" - }, - "correct_answer": { - "title": "Correct Answer", - "type": "string" - }, - "is_pinned": { - "title": "Is Pinned", - "type": "boolean" - }, - "note": { - "title": "Note", - "type": "string" - } - } - }, - "EvaluationScenarioInput": { - "title": "EvaluationScenarioInput", - "required": [ - "input_name", - "input_value" - ], - "type": "object", - "properties": { - "input_name": { - "title": "Input Name", - "type": "string" - }, - "input_value": { - "title": "Input Value", - "type": "string" - } - } - }, - "EvaluationScenarioOutput": { - "title": "EvaluationScenarioOutput", - "required": [ - "variant_id", - "variant_output" - ], - "type": "object", - "properties": { - "variant_id": { - "title": "Variant Id", - "type": "string" - }, - "variant_output": { - "title": "Variant Output", - "type": "string" - } - } - }, - "EvaluationScenarioScoreUpdate": { - "title": "EvaluationScenarioScoreUpdate", - "required": [ - "score" - ], - "type": "object", - "properties": { - "score": { - "title": "Score", - "type": "number" - } - } - }, - "EvaluationScenarioUpdate": { - "title": "EvaluationScenarioUpdate", - "type": "object", - "properties": { - "vote": { - "title": "Vote", - "type": "string" - }, - "score": { - "title": "Score", - "type": "string" - }, - "correct_answer": { - "title": "Correct Answer", - "type": "string" - }, - "outputs": { - "title": "Outputs", - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationScenarioOutput" - } - }, - "inputs": { - "title": "Inputs", - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationScenarioInput" - } - }, - "is_pinned": { - "title": "Is Pinned", - "type": "boolean" - }, - "note": { - "title": "Note", - "type": "string" - } - } - }, - "EvaluationStatusEnum": { - "title": "EvaluationStatusEnum", - "enum": [ - "EVALUATION_INITIALIZED", - "EVALUATION_STARTED", - "COMPARISON_RUN_STARTED", - "EVALUATION_FINISHED" - ], - "type": "string", - "description": "An enumeration." - }, - "EvaluationType": { - "title": "EvaluationType", - "enum": [ - "auto_exact_match", - "auto_similarity_match", - "auto_regex_test", - "auto_webhook_test", - "auto_ai_critique", - "human_a_b_testing", - "human_scoring", - "custom_code_run" - ], - "type": "string", - "description": "An enumeration." - }, - "EvaluationTypeSettings": { - "title": "EvaluationTypeSettings", - "type": "object", - "properties": { - "similarity_threshold": { - "title": "Similarity Threshold", - "type": "number" - }, - "regex_pattern": { - "title": "Regex Pattern", - "type": "string" - }, - "regex_should_match": { - "title": "Regex Should Match", - "type": "boolean" - }, - "webhook_url": { - "title": "Webhook Url", - "type": "string" - }, - "custom_code_evaluation_id": { - "title": "Custom Code Evaluation Id", - "type": "string" - }, - "llm_app_prompt_template": { - "title": "Llm App Prompt Template", - "type": "string" - }, - "evaluation_prompt_template": { - "title": "Evaluation Prompt Template", - "type": "string" - } - } - }, - "EvaluationUpdate": { - "title": "EvaluationUpdate", - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/EvaluationStatusEnum" - }, - "evaluation_type_settings": { - "$ref": "#/components/schemas/EvaluationTypeSettings" - } - } - }, - "EvaluationWebhook": { - "title": "EvaluationWebhook", - "required": [ - "score" - ], - "type": "object", - "properties": { - "score": { - "title": "Score", - "type": "number" - } - } - }, - "ExecuteCustomEvaluationCode": { - "title": "ExecuteCustomEvaluationCode", - "required": [ - "inputs", - "app_id", - "variant_id", - "correct_answer", - "outputs" - ], - "type": "object", - "properties": { - "inputs": { - "title": "Inputs", - "type": "array", - "items": { - "type": "object" - } - }, - "app_id": { - "title": "App Id", - "type": "string" - }, - "variant_id": { - "title": "Variant Id", - "type": "string" - }, - "correct_answer": { - "title": "Correct Answer", - "type": "string" - }, - "outputs": { - "title": "Outputs", - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "Feedback": { - "title": "Feedback", - "required": [ - "feedback_id" - ], - "type": "object", - "properties": { - "feedback": { - "title": "Feedback", - "type": "string" - }, - "score": { - "title": "Score", - "type": "number" - }, - "meta": { - "title": "Meta", - "type": "object" - }, - "feedback_id": { - "title": "Feedback Id", - "type": "string" - }, - "created_at": { - "title": "Created At", - "type": "string", - "format": "date-time" - } - } - }, - "GetConfigReponse": { - "title": "GetConfigReponse", - "required": [ - "config_id", - "config_name", - "current_version", - "parameters" - ], - "type": "object", - "properties": { - "config_id": { - "title": "Config Id", - "type": "string" - }, - "config_name": { - "title": "Config Name", - "type": "string" - }, - "current_version": { - "title": "Current Version", - "type": "integer" - }, - "parameters": { - "title": "Parameters", - "type": "object" - } - } - }, - "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", - "properties": { - "detail": { - "title": "Detail", - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "Image": { - "title": "Image", - "required": [ - "docker_id", - "tags" - ], - "type": "object", - "properties": { - "docker_id": { - "title": "Docker Id", - "type": "string" - }, - "tags": { - "title": "Tags", - "type": "string" - }, - "organization_id": { - "title": "Organization Id", - "type": "string" - } - } - }, - "NewEvaluation": { - "title": "NewEvaluation", - "required": [ - "app_id", - "variant_ids", - "evaluation_type", - "inputs", - "testset_id", - "status" - ], - "type": "object", - "properties": { - "app_id": { - "title": "App Id", - "type": "string" - }, - "variant_ids": { - "title": "Variant Ids", - "type": "array", - "items": { - "type": "string" - } - }, - "evaluation_type": { - "$ref": "#/components/schemas/EvaluationType" - }, - "evaluation_type_settings": { - "$ref": "#/components/schemas/EvaluationTypeSettings" - }, - "inputs": { - "title": "Inputs", - "type": "array", - "items": { - "type": "string" - } - }, - "testset_id": { - "title": "Testset Id", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - } - } - }, - "NewTestset": { - "title": "NewTestset", - "required": [ - "name", - "csvdata" - ], - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "csvdata": { - "title": "Csvdata", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "Organization": { - "title": "Organization", - "required": [ - "name", - "owner" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "description": { - "title": "Description", - "type": "string" - }, - "type": { - "title": "Type", - "type": "string" - }, - "owner": { - "title": "Owner", - "type": "string" - }, - "members": { - "title": "Members", - "type": "array", - "items": { - "type": "string" - } - }, - "invitations": { - "title": "Invitations", - "type": "array", - "items": {} - } - } - }, - "RestartAppContainer": { - "title": "RestartAppContainer", - "required": [ - "variant_id" - ], - "type": "object", - "properties": { - "variant_id": { - "title": "Variant Id", - "type": "string" - } - } - }, - "SaveConfigPayload": { - "title": "SaveConfigPayload", - "required": [ - "base_id", - "config_name", - "parameters", - "overwrite" - ], - "type": "object", - "properties": { - "base_id": { - "title": "Base Id", - "type": "string" - }, - "config_name": { - "title": "Config Name", - "type": "string" - }, - "parameters": { - "title": "Parameters", - "type": "object" - }, - "overwrite": { - "title": "Overwrite", - "type": "boolean" - } - } - }, - "SimpleEvaluationOutput": { - "title": "SimpleEvaluationOutput", - "required": [ - "id", - "variant_ids", - "app_id", - "status", - "evaluation_type" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "variant_ids": { - "title": "Variant Ids", - "type": "array", - "items": { - "type": "string" - } - }, - "app_id": { - "title": "App Id", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "evaluation_type": { - "$ref": "#/components/schemas/EvaluationType" - } - } - }, - "Span": { - "title": "Span", - "required": [ - "event_name", - "start_time", - "status", - "end_time", - "span_id" - ], - "type": "object", - "properties": { - "parent_span_id": { - "title": "Parent Span Id", - "type": "string" - }, - "meta": { - "title": "Meta", - "type": "object" - }, - "event_name": { - "title": "Event Name", - "type": "string" - }, - "event_type": { - "title": "Event Type", - "type": "string" - }, - "start_time": { - "title": "Start Time", - "type": "string", - "format": "date-time" - }, - "duration": { - "title": "Duration", - "type": "integer" - }, - "status": { - "title": "Status", - "type": "string" - }, - "end_time": { - "title": "End Time", - "type": "string", - "format": "date-time" - }, - "inputs": { - "title": "Inputs", - "type": "array", - "items": { - "type": "string" - } - }, - "outputs": { - "title": "Outputs", - "type": "array", - "items": { - "type": "string" - } - }, - "prompt_template": { - "title": "Prompt Template", - "type": "string" - }, - "tokens_input": { - "title": "Tokens Input", - "type": "integer" - }, - "tokens_output": { - "title": "Tokens Output", - "type": "integer" - }, - "token_total": { - "title": "Token Total", - "type": "integer" - }, - "cost": { - "title": "Cost", - "type": "number" - }, - "tags": { - "title": "Tags", - "type": "array", - "items": { - "type": "string" - } - }, - "span_id": { - "title": "Span Id", - "type": "string" - } - } - }, - "Template": { - "title": "Template", - "required": [ - "id", - "image" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "image": { - "$ref": "#/components/schemas/TemplateImageInfo" - } - } - }, - "TemplateImageInfo": { - "title": "TemplateImageInfo", - "required": [ - "name", - "size", - "digest", - "title", - "description", - "last_pushed", - "repo_name" - ], - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "size": { - "title": "Size", - "type": "integer" - }, - "digest": { - "title": "Digest", - "type": "string" - }, - "title": { - "title": "Title", - "type": "string" - }, - "description": { - "title": "Description", - "type": "string" - }, - "last_pushed": { - "title": "Last Pushed", - "type": "string", - "format": "date-time" - }, - "repo_name": { - "title": "Repo Name", - "type": "string" - } - } - }, - "TestSetOutputResponse": { - "title": "TestSetOutputResponse", - "required": [ - "_id", - "name", - "created_at" - ], - "type": "object", - "properties": { - "_id": { - "title": " Id", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "created_at": { - "title": "Created At", - "type": "string", - "format": "date-time" - } - } - }, - "TestSetSimpleResponse": { - "title": "TestSetSimpleResponse", - "required": [ - "id", - "name", - "created_at" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "created_at": { - "title": "Created At", - "type": "string" - } - } - }, - "Trace": { - "title": "Trace", - "required": [ - "latency", - "status", - "start_time", - "end_time", - "trace_id", - "spans" - ], - "type": "object", - "properties": { - "app_id": { - "title": "App Id", - "type": "string" - }, - "variant_id": { - "title": "Variant Id", - "type": "string" - }, - "cost": { - "title": "Cost", - "type": "number" - }, - "latency": { - "title": "Latency", - "type": "number" - }, - "status": { - "title": "Status", - "type": "string" - }, - "token_consumption": { - "title": "Token Consumption", - "type": "integer" - }, - "tags": { - "title": "Tags", - "type": "array", - "items": { - "type": "string" - } - }, - "start_time": { - "title": "Start Time", - "type": "string", - "format": "date-time" - }, - "end_time": { - "title": "End Time", - "type": "string", - "format": "date-time" - }, - "trace_id": { - "title": "Trace Id", - "type": "string" - }, - "spans": { - "title": "Spans", - "type": "array", - "items": { - "type": "string" - } - }, - "feedbacks": { - "title": "Feedbacks", - "type": "array", - "items": { - "$ref": "#/components/schemas/Feedback" - } - } - } - }, - "URI": { - "title": "URI", - "required": [ - "uri" - ], - "type": "object", - "properties": { - "uri": { - "title": "Uri", - "type": "string" - } - } - }, - "UpdateFeedback": { - "title": "UpdateFeedback", - "required": [ - "feedback" - ], - "type": "object", - "properties": { - "feedback": { - "title": "Feedback", - "type": "string" - }, - "score": { - "title": "Score", - "type": "number" - }, - "meta": { - "title": "Meta", - "type": "object" - } - } - }, - "UpdateTrace": { - "title": "UpdateTrace", - "required": [ - "status" - ], - "type": "object", - "properties": { - "status": { - "title": "Status", - "type": "string" - } - } - }, - "UpdateVariantParameterPayload": { - "title": "UpdateVariantParameterPayload", - "required": [ - "parameters" - ], - "type": "object", - "properties": { - "parameters": { - "title": "Parameters", - "type": "object" - } - } - }, - "ValidationError": { - "title": "ValidationError", - "required": [ - "loc", - "msg", - "type" - ], - "type": "object", - "properties": { - "loc": { - "title": "Location", - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - } - }, - "msg": { - "title": "Message", - "type": "string" - }, - "type": { - "title": "Error Type", - "type": "string" - } - } - }, - "VariantAction": { - "title": "VariantAction", - "required": [ - "action" - ], - "type": "object", - "properties": { - "action": { - "$ref": "#/components/schemas/VariantActionEnum" - } - } - }, - "VariantActionEnum": { - "title": "VariantActionEnum", - "enum": [ - "START", - "STOP" - ], - "type": "string", - "description": "An enumeration." - } - } - } -} \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/remove-app.mdx b/docs/reference/api_docs/backend_api/remove-app.mdx deleted file mode 100644 index bb3e700b47..0000000000 --- a/docs/reference/api_docs/backend_api/remove-app.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: delete /apps/{app_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/remove-variant.mdx b/docs/reference/api_docs/backend_api/remove-variant.mdx deleted file mode 100644 index 5b9b12280e..0000000000 --- a/docs/reference/api_docs/backend_api/remove-variant.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: delete /variants/{variant_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/restart-docker-container.mdx b/docs/reference/api_docs/backend_api/restart-docker-container.mdx deleted file mode 100644 index 803b9e33c2..0000000000 --- a/docs/reference/api_docs/backend_api/restart-docker-container.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /containers/restart_container/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/save-config.mdx b/docs/reference/api_docs/backend_api/save-config.mdx deleted file mode 100644 index a86dec4ce5..0000000000 --- a/docs/reference/api_docs/backend_api/save-config.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /configs/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/start-variant.mdx b/docs/reference/api_docs/backend_api/start-variant.mdx deleted file mode 100644 index 73290c821d..0000000000 --- a/docs/reference/api_docs/backend_api/start-variant.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /variants/{variant_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/testsets/get-testset.mdx b/docs/reference/api_docs/backend_api/testsets/get-testset.mdx deleted file mode 100644 index 8a4d2dfe9b..0000000000 --- a/docs/reference/api_docs/backend_api/testsets/get-testset.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /testsets/{testset_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/testsets/get-testsets.mdx b/docs/reference/api_docs/backend_api/testsets/get-testsets.mdx deleted file mode 100644 index a7c0362301..0000000000 --- a/docs/reference/api_docs/backend_api/testsets/get-testsets.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /testsets/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-custom-evaluation.mdx b/docs/reference/api_docs/backend_api/update-custom-evaluation.mdx deleted file mode 100644 index 2c71f46ac6..0000000000 --- a/docs/reference/api_docs/backend_api/update-custom-evaluation.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /evaluations/custom_evaluation/{id} ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-evaluation-router.mdx b/docs/reference/api_docs/backend_api/update-evaluation-router.mdx deleted file mode 100644 index 6c95c23d3b..0000000000 --- a/docs/reference/api_docs/backend_api/update-evaluation-router.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /evaluations/{evaluation_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-evaluation-scenario-router.mdx b/docs/reference/api_docs/backend_api/update-evaluation-scenario-router.mdx deleted file mode 100644 index 13d6653dc1..0000000000 --- a/docs/reference/api_docs/backend_api/update-evaluation-scenario-router.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /evaluations/{evaluation_id}/evaluation_scenario/{evaluation_scenario_id}/{evaluation_type}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-evaluation-scenario-score-router.mdx b/docs/reference/api_docs/backend_api/update-evaluation-scenario-score-router.mdx deleted file mode 100644 index 458b74f71c..0000000000 --- a/docs/reference/api_docs/backend_api/update-evaluation-scenario-score-router.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /evaluations/evaluation_scenario/{evaluation_scenario_id}/score/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-feedback.mdx b/docs/reference/api_docs/backend_api/update-feedback.mdx deleted file mode 100644 index fe03c97e6d..0000000000 --- a/docs/reference/api_docs/backend_api/update-feedback.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /observability/feedbacks/{trace_id}/{feedback_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-testset.mdx b/docs/reference/api_docs/backend_api/update-testset.mdx deleted file mode 100644 index 4c2a7de6d7..0000000000 --- a/docs/reference/api_docs/backend_api/update-testset.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /testsets/{testset_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-trace-status.mdx b/docs/reference/api_docs/backend_api/update-trace-status.mdx deleted file mode 100644 index a54b130841..0000000000 --- a/docs/reference/api_docs/backend_api/update-trace-status.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /observability/traces/{trace_id}/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-variant-image.mdx b/docs/reference/api_docs/backend_api/update-variant-image.mdx deleted file mode 100644 index c78a3af397..0000000000 --- a/docs/reference/api_docs/backend_api/update-variant-image.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /variants/{variant_id}/image/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/update-variant-parameters.mdx b/docs/reference/api_docs/backend_api/update-variant-parameters.mdx deleted file mode 100644 index 9fab0e52ee..0000000000 --- a/docs/reference/api_docs/backend_api/update-variant-parameters.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: put /variants/{variant_id}/parameters/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/upload-file.mdx b/docs/reference/api_docs/backend_api/upload-file.mdx deleted file mode 100644 index f4b9f8685b..0000000000 --- a/docs/reference/api_docs/backend_api/upload-file.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /testsets/upload/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/user-profile.mdx b/docs/reference/api_docs/backend_api/user-profile.mdx deleted file mode 100644 index 19b3f03232..0000000000 --- a/docs/reference/api_docs/backend_api/user-profile.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /profile/ ---- \ No newline at end of file diff --git a/docs/reference/api_docs/backend_api/webhook-example-fake.mdx b/docs/reference/api_docs/backend_api/webhook-example-fake.mdx deleted file mode 100644 index 2eb881338c..0000000000 --- a/docs/reference/api_docs/backend_api/webhook-example-fake.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: post /evaluations/webhook_example_fake/ ---- \ No newline at end of file From 8612c070d31b13880c718af6b8688ed9a1c79b39 Mon Sep 17 00:00:00 2001 From: Mahmoud Mabrouk Date: Fri, 17 May 2024 10:54:19 +0200 Subject: [PATCH 39/45] added new ref and readme --- docs/reference/backend_api/README.txt | 21 + .../accept-workspace-invitation.mdx | 3 + .../apps/add-variant-from-image.mdx | 3 + .../create-app-and-variant-from-template.mdx | 3 + .../reference/backend_api/apps/create-app.mdx | 3 + .../backend_api/apps/get-variant-by-env.mdx | 3 + .../apps/list-app-environment-revisions.mdx | 3 + .../backend_api/apps/list-app-variants.mdx | 3 + docs/reference/backend_api/apps/list-apps.mdx | 3 + .../backend_api/apps/list-environments.mdx | 3 + .../reference/backend_api/apps/remove-app.mdx | 3 + .../backend_api/assign-role-to-user.mdx | 3 + .../backend_api/bases/list-bases.mdx | 3 + .../get-config-deployment-revision.mdx | 3 + .../backend_api/configs/get-config.mdx | 3 + .../configs/revert-deployment-revision.mdx | 3 + .../backend_api/configs/save-config.mdx | 3 + .../backend_api/containers/build-image.mdx | 3 + .../construct-app-container-url.mdx | 3 + .../containers/container-templates.mdx | 3 + .../containers/restart-docker-container.mdx | 3 + docs/reference/backend_api/create-api-key.mdx | 3 + .../backend_api/create-organization.mdx | 3 + .../backend_api/create-workspace.mdx | 3 + .../backend_api/create_doc_from_openai.sh | 1 + docs/reference/backend_api/delete-api-key.mdx | 3 + .../environments/deploy-to-environment.mdx | 3 + .../evaluations/create-evaluation.mdx | 3 + .../evaluations/delete-evaluations.mdx | 3 + .../evaluations/fetch-evaluation-ids.mdx | 3 + .../evaluations/fetch-evaluation-results.mdx | 3 + .../fetch-evaluation-scenarios-1.mdx | 3 + .../fetch-evaluation-scenarios.mdx | 3 + .../evaluations/fetch-evaluation-status.mdx | 3 + .../evaluations/fetch-evaluation.mdx | 3 + .../evaluations/fetch-list-evaluations.mdx | 3 + .../evaluations/webhook-example-fake.mdx | 3 + .../create-new-evaluator-config.mdx | 3 + .../evaluators/delete-evaluator-config.mdx | 3 + .../evaluators/get-evaluator-config.mdx | 3 + .../evaluators/get-evaluator-configs.mdx | 3 + .../evaluators/get-evaluators-endpoint.mdx | 3 + .../evaluators/update-evaluator-config.mdx | 3 + .../fetch-organization-details.mdx | 3 + .../get-all-workspace-permissions.mdx | 3 + .../backend_api/get-all-workspace-roles.mdx | 3 + .../backend_api/get-user-organization.mdx | 3 + docs/reference/backend_api/health-check.mdx | 3 + .../human-evaluations/create-evaluation.mdx | 3 + .../human-evaluations/delete-evaluations.mdx | 3 + .../fetch-evaluation-scenarios.mdx | 3 + .../fetch-human-evaluation.mdx | 3 + .../fetch-list-human-evaluations.mdx | 3 + .../human-evaluations/fetch-results.mdx | 3 + .../get-evaluation-scenario-score-router.mdx | 3 + .../update-evaluation-scenario-router.mdx | 3 + ...pdate-evaluation-scenario-score-router.mdx | 3 + .../update-human-evaluation.mdx | 3 + .../backend_api/invite-user-to-workspace.mdx | 3 + docs/reference/backend_api/list-api-keys.mdx | 3 + .../backend_api/list-organizations.mdx | 3 + .../observability/create-traces.mdx | 3 + .../observability/delete-spans-of-trace.mdx | 3 + .../observability/delete-traces.mdx | 3 + .../observability/get-dashboard-data.mdx | 3 + .../observability/get-span-of-trace.mdx | 3 + .../observability/get-spans-of-trace.mdx | 3 + .../observability/get-trace-detail.mdx | 3 + .../backend_api/observability/get-traces.mdx | 3 + docs/reference/backend_api/openapi.json | 6789 +++++++++++++++++ .../remove-user-from-workspace.mdx | 3 + .../resend-workspace-invitation.mdx | 3 + .../backend_api/testsets/create-testset.mdx | 3 + .../backend_api/testsets/delete-testsets.mdx | 3 + .../testsets/get-single-testset.mdx | 3 + .../backend_api/testsets/get-testsets.mdx | 3 + .../backend_api/testsets/import-testset.mdx | 3 + .../backend_api/testsets/update-testset.mdx | 3 + .../backend_api/testsets/upload-file.mdx | 3 + .../backend_api/unassign-role-from-user.mdx | 3 + .../backend_api/update-organization.mdx | 3 + .../backend_api/update-workspace.mdx | 3 + docs/reference/backend_api/user-profile.mdx | 3 + .../backend_api/validate-api-key.mdx | 3 + .../add-variant-from-base-and-config.mdx | 3 + .../variants/get-variant-revision.mdx | 3 + .../variants/get-variant-revisions.mdx | 3 + .../backend_api/variants/get-variant.mdx | 3 + .../backend_api/variants/remove-variant.mdx | 3 + .../variants/retrieve-variant-logs.mdx | 3 + .../backend_api/variants/start-variant.mdx | 3 + .../variants/update-variant-image.mdx | 3 + .../variants/update-variant-parameters.mdx | 3 + 93 files changed, 7081 insertions(+) create mode 100644 docs/reference/backend_api/README.txt create mode 100644 docs/reference/backend_api/accept-workspace-invitation.mdx create mode 100644 docs/reference/backend_api/apps/add-variant-from-image.mdx create mode 100644 docs/reference/backend_api/apps/create-app-and-variant-from-template.mdx create mode 100644 docs/reference/backend_api/apps/create-app.mdx create mode 100644 docs/reference/backend_api/apps/get-variant-by-env.mdx create mode 100644 docs/reference/backend_api/apps/list-app-environment-revisions.mdx create mode 100644 docs/reference/backend_api/apps/list-app-variants.mdx create mode 100644 docs/reference/backend_api/apps/list-apps.mdx create mode 100644 docs/reference/backend_api/apps/list-environments.mdx create mode 100644 docs/reference/backend_api/apps/remove-app.mdx create mode 100644 docs/reference/backend_api/assign-role-to-user.mdx create mode 100644 docs/reference/backend_api/bases/list-bases.mdx create mode 100644 docs/reference/backend_api/configs/get-config-deployment-revision.mdx create mode 100644 docs/reference/backend_api/configs/get-config.mdx create mode 100644 docs/reference/backend_api/configs/revert-deployment-revision.mdx create mode 100644 docs/reference/backend_api/configs/save-config.mdx create mode 100644 docs/reference/backend_api/containers/build-image.mdx create mode 100644 docs/reference/backend_api/containers/construct-app-container-url.mdx create mode 100644 docs/reference/backend_api/containers/container-templates.mdx create mode 100644 docs/reference/backend_api/containers/restart-docker-container.mdx create mode 100644 docs/reference/backend_api/create-api-key.mdx create mode 100644 docs/reference/backend_api/create-organization.mdx create mode 100644 docs/reference/backend_api/create-workspace.mdx create mode 100755 docs/reference/backend_api/create_doc_from_openai.sh create mode 100644 docs/reference/backend_api/delete-api-key.mdx create mode 100644 docs/reference/backend_api/environments/deploy-to-environment.mdx create mode 100644 docs/reference/backend_api/evaluations/create-evaluation.mdx create mode 100644 docs/reference/backend_api/evaluations/delete-evaluations.mdx create mode 100644 docs/reference/backend_api/evaluations/fetch-evaluation-ids.mdx create mode 100644 docs/reference/backend_api/evaluations/fetch-evaluation-results.mdx create mode 100644 docs/reference/backend_api/evaluations/fetch-evaluation-scenarios-1.mdx create mode 100644 docs/reference/backend_api/evaluations/fetch-evaluation-scenarios.mdx create mode 100644 docs/reference/backend_api/evaluations/fetch-evaluation-status.mdx create mode 100644 docs/reference/backend_api/evaluations/fetch-evaluation.mdx create mode 100644 docs/reference/backend_api/evaluations/fetch-list-evaluations.mdx create mode 100644 docs/reference/backend_api/evaluations/webhook-example-fake.mdx create mode 100644 docs/reference/backend_api/evaluators/create-new-evaluator-config.mdx create mode 100644 docs/reference/backend_api/evaluators/delete-evaluator-config.mdx create mode 100644 docs/reference/backend_api/evaluators/get-evaluator-config.mdx create mode 100644 docs/reference/backend_api/evaluators/get-evaluator-configs.mdx create mode 100644 docs/reference/backend_api/evaluators/get-evaluators-endpoint.mdx create mode 100644 docs/reference/backend_api/evaluators/update-evaluator-config.mdx create mode 100644 docs/reference/backend_api/fetch-organization-details.mdx create mode 100644 docs/reference/backend_api/get-all-workspace-permissions.mdx create mode 100644 docs/reference/backend_api/get-all-workspace-roles.mdx create mode 100644 docs/reference/backend_api/get-user-organization.mdx create mode 100644 docs/reference/backend_api/health-check.mdx create mode 100644 docs/reference/backend_api/human-evaluations/create-evaluation.mdx create mode 100644 docs/reference/backend_api/human-evaluations/delete-evaluations.mdx create mode 100644 docs/reference/backend_api/human-evaluations/fetch-evaluation-scenarios.mdx create mode 100644 docs/reference/backend_api/human-evaluations/fetch-human-evaluation.mdx create mode 100644 docs/reference/backend_api/human-evaluations/fetch-list-human-evaluations.mdx create mode 100644 docs/reference/backend_api/human-evaluations/fetch-results.mdx create mode 100644 docs/reference/backend_api/human-evaluations/get-evaluation-scenario-score-router.mdx create mode 100644 docs/reference/backend_api/human-evaluations/update-evaluation-scenario-router.mdx create mode 100644 docs/reference/backend_api/human-evaluations/update-evaluation-scenario-score-router.mdx create mode 100644 docs/reference/backend_api/human-evaluations/update-human-evaluation.mdx create mode 100644 docs/reference/backend_api/invite-user-to-workspace.mdx create mode 100644 docs/reference/backend_api/list-api-keys.mdx create mode 100644 docs/reference/backend_api/list-organizations.mdx create mode 100644 docs/reference/backend_api/observability/create-traces.mdx create mode 100644 docs/reference/backend_api/observability/delete-spans-of-trace.mdx create mode 100644 docs/reference/backend_api/observability/delete-traces.mdx create mode 100644 docs/reference/backend_api/observability/get-dashboard-data.mdx create mode 100644 docs/reference/backend_api/observability/get-span-of-trace.mdx create mode 100644 docs/reference/backend_api/observability/get-spans-of-trace.mdx create mode 100644 docs/reference/backend_api/observability/get-trace-detail.mdx create mode 100644 docs/reference/backend_api/observability/get-traces.mdx create mode 100644 docs/reference/backend_api/openapi.json create mode 100644 docs/reference/backend_api/remove-user-from-workspace.mdx create mode 100644 docs/reference/backend_api/resend-workspace-invitation.mdx create mode 100644 docs/reference/backend_api/testsets/create-testset.mdx create mode 100644 docs/reference/backend_api/testsets/delete-testsets.mdx create mode 100644 docs/reference/backend_api/testsets/get-single-testset.mdx create mode 100644 docs/reference/backend_api/testsets/get-testsets.mdx create mode 100644 docs/reference/backend_api/testsets/import-testset.mdx create mode 100644 docs/reference/backend_api/testsets/update-testset.mdx create mode 100644 docs/reference/backend_api/testsets/upload-file.mdx create mode 100644 docs/reference/backend_api/unassign-role-from-user.mdx create mode 100644 docs/reference/backend_api/update-organization.mdx create mode 100644 docs/reference/backend_api/update-workspace.mdx create mode 100644 docs/reference/backend_api/user-profile.mdx create mode 100644 docs/reference/backend_api/validate-api-key.mdx create mode 100644 docs/reference/backend_api/variants/add-variant-from-base-and-config.mdx create mode 100644 docs/reference/backend_api/variants/get-variant-revision.mdx create mode 100644 docs/reference/backend_api/variants/get-variant-revisions.mdx create mode 100644 docs/reference/backend_api/variants/get-variant.mdx create mode 100644 docs/reference/backend_api/variants/remove-variant.mdx create mode 100644 docs/reference/backend_api/variants/retrieve-variant-logs.mdx create mode 100644 docs/reference/backend_api/variants/start-variant.mdx create mode 100644 docs/reference/backend_api/variants/update-variant-image.mdx create mode 100644 docs/reference/backend_api/variants/update-variant-parameters.mdx diff --git a/docs/reference/backend_api/README.txt b/docs/reference/backend_api/README.txt new file mode 100644 index 0000000000..f48d695c1e --- /dev/null +++ b/docs/reference/backend_api/README.txt @@ -0,0 +1,21 @@ +To generate the reference documentation: +- Add the openapi.json to this folder +- Add the following to the openapi.json + "servers": [ + { + "url": "https://cloud.agenta.ai/api", + "description": "Agenta Cloud" + }, + { + "url": "http:/localhost/api", + "description": "Local Development" + } + ], +- Run ./create_doc_from_openapi.sh +- Add the output of the script to mint.json +- Make sure that + "openapi": [ + "/reference/backend_api/openapi.json" + ], + +is in the mint.json \ No newline at end of file diff --git a/docs/reference/backend_api/accept-workspace-invitation.mdx b/docs/reference/backend_api/accept-workspace-invitation.mdx new file mode 100644 index 0000000000..3da60d5b6a --- /dev/null +++ b/docs/reference/backend_api/accept-workspace-invitation.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /organizations/{org_id}/workspaces/{workspace_id}/invite/accept +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/add-variant-from-image.mdx b/docs/reference/backend_api/apps/add-variant-from-image.mdx new file mode 100644 index 0000000000..0226b6dd80 --- /dev/null +++ b/docs/reference/backend_api/apps/add-variant-from-image.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /apps/{app_id}/variant/from-image +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/create-app-and-variant-from-template.mdx b/docs/reference/backend_api/apps/create-app-and-variant-from-template.mdx new file mode 100644 index 0000000000..ab07395647 --- /dev/null +++ b/docs/reference/backend_api/apps/create-app-and-variant-from-template.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /apps/app_and_variant_from_template +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/create-app.mdx b/docs/reference/backend_api/apps/create-app.mdx new file mode 100644 index 0000000000..0a2ec5395e --- /dev/null +++ b/docs/reference/backend_api/apps/create-app.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /apps +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/get-variant-by-env.mdx b/docs/reference/backend_api/apps/get-variant-by-env.mdx new file mode 100644 index 0000000000..2d92893d6f --- /dev/null +++ b/docs/reference/backend_api/apps/get-variant-by-env.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /apps/get_variant_by_env +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/list-app-environment-revisions.mdx b/docs/reference/backend_api/apps/list-app-environment-revisions.mdx new file mode 100644 index 0000000000..f68737a3ae --- /dev/null +++ b/docs/reference/backend_api/apps/list-app-environment-revisions.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /apps/{app_id}/revisions/{environment_name} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/list-app-variants.mdx b/docs/reference/backend_api/apps/list-app-variants.mdx new file mode 100644 index 0000000000..d32a44f983 --- /dev/null +++ b/docs/reference/backend_api/apps/list-app-variants.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /apps/{app_id}/variants +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/list-apps.mdx b/docs/reference/backend_api/apps/list-apps.mdx new file mode 100644 index 0000000000..19881d0525 --- /dev/null +++ b/docs/reference/backend_api/apps/list-apps.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /apps +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/list-environments.mdx b/docs/reference/backend_api/apps/list-environments.mdx new file mode 100644 index 0000000000..2848779195 --- /dev/null +++ b/docs/reference/backend_api/apps/list-environments.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /apps/{app_id}/environments +--- \ No newline at end of file diff --git a/docs/reference/backend_api/apps/remove-app.mdx b/docs/reference/backend_api/apps/remove-app.mdx new file mode 100644 index 0000000000..ddbaa6aee9 --- /dev/null +++ b/docs/reference/backend_api/apps/remove-app.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /apps/{app_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/assign-role-to-user.mdx b/docs/reference/backend_api/assign-role-to-user.mdx new file mode 100644 index 0000000000..08a492962e --- /dev/null +++ b/docs/reference/backend_api/assign-role-to-user.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /workspaces/{workspace_id}/roles +--- \ No newline at end of file diff --git a/docs/reference/backend_api/bases/list-bases.mdx b/docs/reference/backend_api/bases/list-bases.mdx new file mode 100644 index 0000000000..edc21416e4 --- /dev/null +++ b/docs/reference/backend_api/bases/list-bases.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /bases +--- \ No newline at end of file diff --git a/docs/reference/backend_api/configs/get-config-deployment-revision.mdx b/docs/reference/backend_api/configs/get-config-deployment-revision.mdx new file mode 100644 index 0000000000..fd66dd70a2 --- /dev/null +++ b/docs/reference/backend_api/configs/get-config-deployment-revision.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /configs/deployment/{deployment_revision_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/configs/get-config.mdx b/docs/reference/backend_api/configs/get-config.mdx new file mode 100644 index 0000000000..b0a85ab787 --- /dev/null +++ b/docs/reference/backend_api/configs/get-config.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /configs +--- \ No newline at end of file diff --git a/docs/reference/backend_api/configs/revert-deployment-revision.mdx b/docs/reference/backend_api/configs/revert-deployment-revision.mdx new file mode 100644 index 0000000000..91b3801aca --- /dev/null +++ b/docs/reference/backend_api/configs/revert-deployment-revision.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /configs/deployment/{deployment_revision_id}/revert +--- \ No newline at end of file diff --git a/docs/reference/backend_api/configs/save-config.mdx b/docs/reference/backend_api/configs/save-config.mdx new file mode 100644 index 0000000000..90a8b02d5c --- /dev/null +++ b/docs/reference/backend_api/configs/save-config.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /configs +--- \ No newline at end of file diff --git a/docs/reference/backend_api/containers/build-image.mdx b/docs/reference/backend_api/containers/build-image.mdx new file mode 100644 index 0000000000..79000f4676 --- /dev/null +++ b/docs/reference/backend_api/containers/build-image.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /containers/build_image +--- \ No newline at end of file diff --git a/docs/reference/backend_api/containers/construct-app-container-url.mdx b/docs/reference/backend_api/containers/construct-app-container-url.mdx new file mode 100644 index 0000000000..441d157f4e --- /dev/null +++ b/docs/reference/backend_api/containers/construct-app-container-url.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /containers/container_url +--- \ No newline at end of file diff --git a/docs/reference/backend_api/containers/container-templates.mdx b/docs/reference/backend_api/containers/container-templates.mdx new file mode 100644 index 0000000000..6209333fc8 --- /dev/null +++ b/docs/reference/backend_api/containers/container-templates.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /containers/templates +--- \ No newline at end of file diff --git a/docs/reference/backend_api/containers/restart-docker-container.mdx b/docs/reference/backend_api/containers/restart-docker-container.mdx new file mode 100644 index 0000000000..37beaff0b9 --- /dev/null +++ b/docs/reference/backend_api/containers/restart-docker-container.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /containers/restart_container +--- \ No newline at end of file diff --git a/docs/reference/backend_api/create-api-key.mdx b/docs/reference/backend_api/create-api-key.mdx new file mode 100644 index 0000000000..29330884e0 --- /dev/null +++ b/docs/reference/backend_api/create-api-key.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /keys +--- \ No newline at end of file diff --git a/docs/reference/backend_api/create-organization.mdx b/docs/reference/backend_api/create-organization.mdx new file mode 100644 index 0000000000..7d7d377be0 --- /dev/null +++ b/docs/reference/backend_api/create-organization.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /organizations +--- \ No newline at end of file diff --git a/docs/reference/backend_api/create-workspace.mdx b/docs/reference/backend_api/create-workspace.mdx new file mode 100644 index 0000000000..de6514e91f --- /dev/null +++ b/docs/reference/backend_api/create-workspace.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /organizations/{org_id}/workspaces +--- \ No newline at end of file diff --git a/docs/reference/backend_api/create_doc_from_openai.sh b/docs/reference/backend_api/create_doc_from_openai.sh new file mode 100755 index 0000000000..8c681b84b8 --- /dev/null +++ b/docs/reference/backend_api/create_doc_from_openai.sh @@ -0,0 +1 @@ +npx @mintlify/scraping@latest openapi-file openapi.json \ No newline at end of file diff --git a/docs/reference/backend_api/delete-api-key.mdx b/docs/reference/backend_api/delete-api-key.mdx new file mode 100644 index 0000000000..e09064d9fd --- /dev/null +++ b/docs/reference/backend_api/delete-api-key.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /keys/{key_prefix} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/environments/deploy-to-environment.mdx b/docs/reference/backend_api/environments/deploy-to-environment.mdx new file mode 100644 index 0000000000..88e5dba33a --- /dev/null +++ b/docs/reference/backend_api/environments/deploy-to-environment.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /environments/deploy +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/create-evaluation.mdx b/docs/reference/backend_api/evaluations/create-evaluation.mdx new file mode 100644 index 0000000000..ad9a54fd5a --- /dev/null +++ b/docs/reference/backend_api/evaluations/create-evaluation.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /evaluations +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/delete-evaluations.mdx b/docs/reference/backend_api/evaluations/delete-evaluations.mdx new file mode 100644 index 0000000000..08436300f6 --- /dev/null +++ b/docs/reference/backend_api/evaluations/delete-evaluations.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /evaluations +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/fetch-evaluation-ids.mdx b/docs/reference/backend_api/evaluations/fetch-evaluation-ids.mdx new file mode 100644 index 0000000000..9721cfb019 --- /dev/null +++ b/docs/reference/backend_api/evaluations/fetch-evaluation-ids.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluations/by_resource +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/fetch-evaluation-results.mdx b/docs/reference/backend_api/evaluations/fetch-evaluation-results.mdx new file mode 100644 index 0000000000..e8e98013d5 --- /dev/null +++ b/docs/reference/backend_api/evaluations/fetch-evaluation-results.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluations/{evaluation_id}/results +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/fetch-evaluation-scenarios-1.mdx b/docs/reference/backend_api/evaluations/fetch-evaluation-scenarios-1.mdx new file mode 100644 index 0000000000..af9c40b5a8 --- /dev/null +++ b/docs/reference/backend_api/evaluations/fetch-evaluation-scenarios-1.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluations/evaluation_scenarios/comparison-results +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/fetch-evaluation-scenarios.mdx b/docs/reference/backend_api/evaluations/fetch-evaluation-scenarios.mdx new file mode 100644 index 0000000000..37694319b2 --- /dev/null +++ b/docs/reference/backend_api/evaluations/fetch-evaluation-scenarios.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluations/{evaluation_id}/evaluation_scenarios +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/fetch-evaluation-status.mdx b/docs/reference/backend_api/evaluations/fetch-evaluation-status.mdx new file mode 100644 index 0000000000..f234945f81 --- /dev/null +++ b/docs/reference/backend_api/evaluations/fetch-evaluation-status.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluations/{evaluation_id}/status +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/fetch-evaluation.mdx b/docs/reference/backend_api/evaluations/fetch-evaluation.mdx new file mode 100644 index 0000000000..970004042c --- /dev/null +++ b/docs/reference/backend_api/evaluations/fetch-evaluation.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluations/{evaluation_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/fetch-list-evaluations.mdx b/docs/reference/backend_api/evaluations/fetch-list-evaluations.mdx new file mode 100644 index 0000000000..307c93d306 --- /dev/null +++ b/docs/reference/backend_api/evaluations/fetch-list-evaluations.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluations +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluations/webhook-example-fake.mdx b/docs/reference/backend_api/evaluations/webhook-example-fake.mdx new file mode 100644 index 0000000000..e98d860c88 --- /dev/null +++ b/docs/reference/backend_api/evaluations/webhook-example-fake.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /evaluations/webhook_example_fake +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluators/create-new-evaluator-config.mdx b/docs/reference/backend_api/evaluators/create-new-evaluator-config.mdx new file mode 100644 index 0000000000..86e5ca3290 --- /dev/null +++ b/docs/reference/backend_api/evaluators/create-new-evaluator-config.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /evaluators/configs +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluators/delete-evaluator-config.mdx b/docs/reference/backend_api/evaluators/delete-evaluator-config.mdx new file mode 100644 index 0000000000..d795c1aa12 --- /dev/null +++ b/docs/reference/backend_api/evaluators/delete-evaluator-config.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /evaluators/configs/{evaluator_config_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluators/get-evaluator-config.mdx b/docs/reference/backend_api/evaluators/get-evaluator-config.mdx new file mode 100644 index 0000000000..9a588a8212 --- /dev/null +++ b/docs/reference/backend_api/evaluators/get-evaluator-config.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluators/configs/{evaluator_config_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluators/get-evaluator-configs.mdx b/docs/reference/backend_api/evaluators/get-evaluator-configs.mdx new file mode 100644 index 0000000000..31a0bf2883 --- /dev/null +++ b/docs/reference/backend_api/evaluators/get-evaluator-configs.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluators/configs +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluators/get-evaluators-endpoint.mdx b/docs/reference/backend_api/evaluators/get-evaluators-endpoint.mdx new file mode 100644 index 0000000000..4b0208c336 --- /dev/null +++ b/docs/reference/backend_api/evaluators/get-evaluators-endpoint.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /evaluators +--- \ No newline at end of file diff --git a/docs/reference/backend_api/evaluators/update-evaluator-config.mdx b/docs/reference/backend_api/evaluators/update-evaluator-config.mdx new file mode 100644 index 0000000000..10e077acef --- /dev/null +++ b/docs/reference/backend_api/evaluators/update-evaluator-config.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /evaluators/configs/{evaluator_config_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/fetch-organization-details.mdx b/docs/reference/backend_api/fetch-organization-details.mdx new file mode 100644 index 0000000000..9d6548d929 --- /dev/null +++ b/docs/reference/backend_api/fetch-organization-details.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /organizations/{org_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/get-all-workspace-permissions.mdx b/docs/reference/backend_api/get-all-workspace-permissions.mdx new file mode 100644 index 0000000000..ce6ff55059 --- /dev/null +++ b/docs/reference/backend_api/get-all-workspace-permissions.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /workspaces/permissions +--- \ No newline at end of file diff --git a/docs/reference/backend_api/get-all-workspace-roles.mdx b/docs/reference/backend_api/get-all-workspace-roles.mdx new file mode 100644 index 0000000000..45cb4f6cae --- /dev/null +++ b/docs/reference/backend_api/get-all-workspace-roles.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /workspaces/roles +--- \ No newline at end of file diff --git a/docs/reference/backend_api/get-user-organization.mdx b/docs/reference/backend_api/get-user-organization.mdx new file mode 100644 index 0000000000..3371d03f11 --- /dev/null +++ b/docs/reference/backend_api/get-user-organization.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /organizations/own +--- \ No newline at end of file diff --git a/docs/reference/backend_api/health-check.mdx b/docs/reference/backend_api/health-check.mdx new file mode 100644 index 0000000000..f27caa880e --- /dev/null +++ b/docs/reference/backend_api/health-check.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /health +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/create-evaluation.mdx b/docs/reference/backend_api/human-evaluations/create-evaluation.mdx new file mode 100644 index 0000000000..62255c2e93 --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/create-evaluation.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /human-evaluations +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/delete-evaluations.mdx b/docs/reference/backend_api/human-evaluations/delete-evaluations.mdx new file mode 100644 index 0000000000..691d79b285 --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/delete-evaluations.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /human-evaluations +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/fetch-evaluation-scenarios.mdx b/docs/reference/backend_api/human-evaluations/fetch-evaluation-scenarios.mdx new file mode 100644 index 0000000000..1b5f80d73a --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/fetch-evaluation-scenarios.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /human-evaluations/{evaluation_id}/evaluation_scenarios +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/fetch-human-evaluation.mdx b/docs/reference/backend_api/human-evaluations/fetch-human-evaluation.mdx new file mode 100644 index 0000000000..00474e7f03 --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/fetch-human-evaluation.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /human-evaluations/{evaluation_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/fetch-list-human-evaluations.mdx b/docs/reference/backend_api/human-evaluations/fetch-list-human-evaluations.mdx new file mode 100644 index 0000000000..0bd77f2e3b --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/fetch-list-human-evaluations.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /human-evaluations +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/fetch-results.mdx b/docs/reference/backend_api/human-evaluations/fetch-results.mdx new file mode 100644 index 0000000000..a2315f7e09 --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/fetch-results.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /human-evaluations/{evaluation_id}/results +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/get-evaluation-scenario-score-router.mdx b/docs/reference/backend_api/human-evaluations/get-evaluation-scenario-score-router.mdx new file mode 100644 index 0000000000..6647738a77 --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/get-evaluation-scenario-score-router.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /human-evaluations/evaluation_scenario/{evaluation_scenario_id}/score +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/update-evaluation-scenario-router.mdx b/docs/reference/backend_api/human-evaluations/update-evaluation-scenario-router.mdx new file mode 100644 index 0000000000..93e8bcb1dc --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/update-evaluation-scenario-router.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /human-evaluations/{evaluation_id}/evaluation_scenario/{evaluation_scenario_id}/{evaluation_type} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/update-evaluation-scenario-score-router.mdx b/docs/reference/backend_api/human-evaluations/update-evaluation-scenario-score-router.mdx new file mode 100644 index 0000000000..b64a70c14e --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/update-evaluation-scenario-score-router.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /human-evaluations/evaluation_scenario/{evaluation_scenario_id}/score +--- \ No newline at end of file diff --git a/docs/reference/backend_api/human-evaluations/update-human-evaluation.mdx b/docs/reference/backend_api/human-evaluations/update-human-evaluation.mdx new file mode 100644 index 0000000000..41b4bfec79 --- /dev/null +++ b/docs/reference/backend_api/human-evaluations/update-human-evaluation.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /human-evaluations/{evaluation_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/invite-user-to-workspace.mdx b/docs/reference/backend_api/invite-user-to-workspace.mdx new file mode 100644 index 0000000000..3854dee2d9 --- /dev/null +++ b/docs/reference/backend_api/invite-user-to-workspace.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /organizations/{org_id}/workspaces/{workspace_id}/invite +--- \ No newline at end of file diff --git a/docs/reference/backend_api/list-api-keys.mdx b/docs/reference/backend_api/list-api-keys.mdx new file mode 100644 index 0000000000..519fa18db4 --- /dev/null +++ b/docs/reference/backend_api/list-api-keys.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /keys +--- \ No newline at end of file diff --git a/docs/reference/backend_api/list-organizations.mdx b/docs/reference/backend_api/list-organizations.mdx new file mode 100644 index 0000000000..fd2d3f4d14 --- /dev/null +++ b/docs/reference/backend_api/list-organizations.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /organizations +--- \ No newline at end of file diff --git a/docs/reference/backend_api/observability/create-traces.mdx b/docs/reference/backend_api/observability/create-traces.mdx new file mode 100644 index 0000000000..aeca98374f --- /dev/null +++ b/docs/reference/backend_api/observability/create-traces.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /observability/trace/ +--- \ No newline at end of file diff --git a/docs/reference/backend_api/observability/delete-spans-of-trace.mdx b/docs/reference/backend_api/observability/delete-spans-of-trace.mdx new file mode 100644 index 0000000000..a009d7aca8 --- /dev/null +++ b/docs/reference/backend_api/observability/delete-spans-of-trace.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /observability/spans/ +--- \ No newline at end of file diff --git a/docs/reference/backend_api/observability/delete-traces.mdx b/docs/reference/backend_api/observability/delete-traces.mdx new file mode 100644 index 0000000000..27da7e4861 --- /dev/null +++ b/docs/reference/backend_api/observability/delete-traces.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /observability/traces/ +--- \ No newline at end of file diff --git a/docs/reference/backend_api/observability/get-dashboard-data.mdx b/docs/reference/backend_api/observability/get-dashboard-data.mdx new file mode 100644 index 0000000000..c439879e02 --- /dev/null +++ b/docs/reference/backend_api/observability/get-dashboard-data.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /observability/dashboard/ +--- \ No newline at end of file diff --git a/docs/reference/backend_api/observability/get-span-of-trace.mdx b/docs/reference/backend_api/observability/get-span-of-trace.mdx new file mode 100644 index 0000000000..a2ee6c73a3 --- /dev/null +++ b/docs/reference/backend_api/observability/get-span-of-trace.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /observability/spans/{span_id}/ +--- \ No newline at end of file diff --git a/docs/reference/backend_api/observability/get-spans-of-trace.mdx b/docs/reference/backend_api/observability/get-spans-of-trace.mdx new file mode 100644 index 0000000000..4987cabc47 --- /dev/null +++ b/docs/reference/backend_api/observability/get-spans-of-trace.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /observability/spans/ +--- \ No newline at end of file diff --git a/docs/reference/backend_api/observability/get-trace-detail.mdx b/docs/reference/backend_api/observability/get-trace-detail.mdx new file mode 100644 index 0000000000..571e9735b5 --- /dev/null +++ b/docs/reference/backend_api/observability/get-trace-detail.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /observability/traces/{trace_id}/ +--- \ No newline at end of file diff --git a/docs/reference/backend_api/observability/get-traces.mdx b/docs/reference/backend_api/observability/get-traces.mdx new file mode 100644 index 0000000000..dfe53f6348 --- /dev/null +++ b/docs/reference/backend_api/observability/get-traces.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /observability/traces/ +--- \ No newline at end of file diff --git a/docs/reference/backend_api/openapi.json b/docs/reference/backend_api/openapi.json new file mode 100644 index 0000000000..552c332923 --- /dev/null +++ b/docs/reference/backend_api/openapi.json @@ -0,0 +1,6789 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Agenta Backend", + "version": "0.1.0", + "description": "Agenta Backend API", + "contact": { + "name": "Agenta", + "url": "https://agenta.ai", + "email": "team@agenta.ai" + } + }, + "servers": [ + { + "url": "https://cloud.agenta.ai/api", + "description": "Agenta Cloud" + }, + { + "url": "http:/localhost/api", + "description": "Local Development" + } + ], + "paths": { + "/observability/dashboard/": { + "get": { + "tags": [ + "Observability" + ], + "summary": "Get Dashboard Data", + "operationId": "observability_dashboard", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Timerange", + "default": "24_hours" + }, + "name": "timeRange", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Environment" + }, + "name": "environment", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Variant" + }, + "name": "variant", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/observability/trace/": { + "post": { + "tags": [ + "Observability" + ], + "summary": "Create Traces", + "operationId": "create_traces", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTrace" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTraceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/observability/traces/": { + "get": { + "tags": [ + "Observability" + ], + "summary": "Get Traces", + "operationId": "get_traces", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "minimum": 1.0, + "title": "Page", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "minimum": 1.0, + "title": "Pagesize", + "default": 10 + }, + "name": "pageSize", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Type", + "default": "generation" + }, + "name": "type", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Trace Id" + }, + "name": "trace_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Environment" + }, + "name": "environment", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Variant" + }, + "name": "variant", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Created At", + "default": "desc" + }, + "name": "created_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WithPagination" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Observability" + ], + "summary": "Delete Traces", + "operationId": "delete_traces", + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Ids" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Delete Traces" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/observability/traces/{trace_id}/": { + "get": { + "tags": [ + "Observability" + ], + "summary": "Get Trace Detail", + "operationId": "get_trace_detail", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Trace Id" + }, + "name": "trace_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceDetail" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/observability/spans/": { + "get": { + "tags": [ + "Observability" + ], + "summary": "Get Spans Of Trace", + "operationId": "get_spans_of_generation", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "minimum": 1.0, + "title": "Page", + "default": 1 + }, + "name": "page", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "minimum": 1.0, + "title": "Pagesize", + "default": 10 + }, + "name": "pageSize", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Type", + "default": "generation" + }, + "name": "type", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Trace Id" + }, + "name": "trace_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Environment" + }, + "name": "environment", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Variant" + }, + "name": "variant", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Created At", + "default": "desc" + }, + "name": "created_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Observability" + ], + "summary": "Delete Spans Of Trace", + "operationId": "delete_spans_of_trace", + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Ids" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Delete Spans Of Trace" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/observability/spans/{span_id}/": { + "get": { + "tags": [ + "Observability" + ], + "summary": "Get Span Of Trace", + "operationId": "get_span_of_generation", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Span Id" + }, + "name": "span_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Type", + "default": "generation" + }, + "name": "type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpanDetail" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/keys": { + "get": { + "summary": "List Api Keys", + "description": "List all API keys associated with the authenticated user.\n\nArgs:\n request (Request): The incoming request object.\n\nReturns:\n List[ListAPIKeysResponse]: A list of API Keys associated with the user.", + "operationId": "list_api_keys", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ListAPIKeysResponse" + }, + "type": "array", + "title": "Response List Api Keys" + } + } + } + } + } + }, + "post": { + "summary": "Create Api Key", + "description": "Creates an API key for a user.\n\nArgs:\n request (Request): The request object containing the user ID in the request state.\n\nReturns:\n str: The created API key.", + "operationId": "create_api_key", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Create Api Key" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/keys/{key_prefix}": { + "delete": { + "summary": "Delete Api Key", + "description": "Delete an API key with the given key prefix for the authenticated user.\n\nArgs:\n key_prefix (str): The prefix of the API key to be deleted.\n request (Request): The incoming request object.\n\nReturns:\n dict: A dictionary containing a success message upon successful deletion.\n\nRaises:\n HTTPException: If the API key is not found or does not belong to the user.", + "operationId": "delete_api_key", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Key Prefix" + }, + "name": "key_prefix", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Delete Api Key" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/keys/{key_prefix}/validate": { + "get": { + "summary": "Validate Api Key", + "description": "This Function is called by the CLI and is used to validate an API key provided by a user in agenta init setup.\nReturns:\n bool: True. If the request reaches this point, the API key is valid.", + "operationId": "validate_api_key", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Key Prefix" + }, + "name": "key_prefix", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Validate Api Key" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations": { + "get": { + "summary": "List Organizations", + "description": "Returns a list of organizations associated with the user's session.\n\nArgs:\n stoken_session (SessionContainer): The user's session token.\n\nReturns:\n list[Organization]: A list of organizations associated with the user's session.\n\nRaises:\n HTTPException: If there is an error retrieving the organizations from the database.", + "operationId": "list_organizations", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Organization" + }, + "type": "array", + "title": "Response List Organizations" + } + } + } + } + } + }, + "post": { + "summary": "Create Organization", + "operationId": "create_organization", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrganization" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/own": { + "get": { + "summary": "Get User Organization", + "operationId": "get_own_org", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationOutput" + } + } + } + } + } + } + }, + "/organizations/{org_id}": { + "get": { + "summary": "Fetch Organization Details", + "description": "Get an organization's details.\n\nRaises:\n HTTPException: _description_\n Permission Denied\n\nReturns:\n OrganizationDB Instance", + "operationId": "fetch_organization_details", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "summary": "Update Organization", + "operationId": "update_organization", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces/{workspace_id}/invite": { + "post": { + "summary": "Invite User To Workspace", + "operationId": "invite_user_to_workspace", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/InviteRequest" + }, + "type": "array", + "title": "Payload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces/{workspace_id}/invite/resend": { + "post": { + "summary": "Resend Workspace Invitation", + "description": "Resend an invitation to a user to an Organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Resent invitation to user; status_code: 200", + "operationId": "resend_invitation", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReseendInviteRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces/{workspace_id}/invite/accept": { + "post": { + "summary": "Accept Workspace Invitation", + "description": "Accept an invitation to a workspace.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Accepted invitation to workspace; status_code: 200", + "operationId": "accept_invitation", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteToken" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces": { + "post": { + "summary": "Create Workspace", + "operationId": "create_workspace", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorkspace" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/organizations/{org_id}/workspaces/{workspace_id}": { + "put": { + "summary": "Update Workspace", + "operationId": "update_workspace", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWorkspace" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/workspaces/roles": { + "get": { + "summary": "Get All Workspace Roles", + "description": "Get all workspace roles.\n\nReturns a list of all available workspace roles.\n\nReturns:\n List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.\n\nRaises:\n HTTPException: If an error occurs while retrieving the workspace roles.", + "operationId": "get_all_workspace_roles", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/WorkspaceRoleResponse" + }, + "type": "array", + "title": "Response Get All Workspace Roles" + } + } + } + } + } + } + }, + "/workspaces/permissions": { + "get": { + "summary": "Get All Workspace Permissions", + "description": "Get all workspace permissions.\n\nReturns a list of all available workspace permissions.\n\nReturns:\n List[Permission]: A list of Permission objects representing the available workspace permissions.\n\nRaises:\n HTTPException: If there is an error retrieving the workspace permissions.", + "operationId": "get_all_workspace_permissions", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Permission" + }, + "type": "array" + } + } + } + } + } + } + }, + "/workspaces/{workspace_id}/roles": { + "post": { + "summary": "Assign Role To User", + "description": "Assigns a role to a user in a workspace.\n\nArgs:\n payload (UserRole): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.", + "operationId": "assign_role_to_user", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRole" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Assign Role To User" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "summary": "Unassign Role From User", + "description": "Delete a role assignment from a user in a workspace.\n\nArgs:\n workspace_id (str): The ID of the workspace.\n email (str): The email of the user to remove the role from.\n org_id (str): The ID of the organization.\n role (str): The role to remove from the user.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role assignment was successfully deleted.\n\nRaises:\n HTTPException: If there is an error in the request or the user does not have permission to perform the action.\n HTTPException: If there is an error in updating the user's roles.", + "operationId": "unassign_role_from_user", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Email" + }, + "name": "email", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Role" + }, + "name": "role", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/workspaces/{workspace_id}/users": { + "delete": { + "summary": "Remove User From Workspace", + "description": "Remove a user from a workspace.\n\nParameters:\n- payload (UserRole): The payload containing the user email and organization ID.\n- workspace_id (str): The ID of the workspace.\n- request (Request): The FastAPI request object.\n\nReturns:\n- WorkspaceResponse: The updated workspace.\n\nRaises:\n- HTTPException: If the user does not have permission to perform this action.\n- HTTPException: If there is an error during the removal process.", + "operationId": "remove_user_from_workspace", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Email" + }, + "name": "email", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/health": { + "get": { + "summary": "Health Check", + "operationId": "health_check", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/profile": { + "get": { + "summary": "User Profile", + "operationId": "user_profile", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/apps/{app_id}/variants": { + "get": { + "tags": [ + "Apps" + ], + "summary": "List App Variants", + "description": "Retrieve a list of app variants for a given app ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve variants for.\n stoken_session (SessionContainer, optional): The session container to verify the user's session. Defaults to Depends(verify_session()).\n\nReturns:\n List[AppVariantResponse]: A list of app variants for the given app ID.", + "operationId": "list_app_variants", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AppVariantResponse_" + }, + "type": "array", + "title": "Response List App Variants" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/get_variant_by_env": { + "get": { + "tags": [ + "Apps" + ], + "summary": "Get Variant By Env", + "description": "Retrieve the app variant based on the provided app_id and environment.\n\nArgs:\n app_id (str): The ID of the app to retrieve the variant for.\n environment (str): The environment of the app variant to retrieve.\n stoken_session (SessionContainer, optional): The session token container. Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500).\n\nReturns:\n AppVariantResponse: The retrieved app variant.", + "operationId": "get_variant_by_env", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Environment" + }, + "name": "environment", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppVariantResponse_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps": { + "get": { + "tags": [ + "Apps" + ], + "summary": "List Apps", + "description": "Retrieve a list of apps filtered by app_name and org_id.\n\nArgs:\n app_name (Optional[str]): The name of the app to filter by.\n org_id (Optional[str]): The ID of the organization to filter by.\n stoken_session (SessionContainer): The session container.\n\nReturns:\n List[App]: A list of apps filtered by app_name and org_id.\n\nRaises:\n HTTPException: If there was an error retrieving the list of apps.", + "operationId": "list_apps", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "App Name" + }, + "name": "app_name", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Org Id" + }, + "name": "org_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Workspace Id" + }, + "name": "workspace_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/App" + }, + "type": "array", + "title": "Response List Apps" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Apps" + ], + "summary": "Create App", + "description": "Create a new app for a user or organization.\n\nArgs:\n payload (CreateApp): The payload containing the app name and organization ID (optional).\n stoken_session (SessionContainer): The session container containing the user's session token.\n\nReturns:\n CreateAppOutput: The output containing the newly created app's ID and name.\n\nRaises:\n HTTPException: If there is an error creating the app or the user does not have permission to access the app.", + "operationId": "create_app", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApp_" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAppOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/variant/from-image": { + "post": { + "tags": [ + "Apps" + ], + "summary": "Add Variant From Image", + "description": "Add a new variant to an app based on a Docker image.\n\nArgs:\n app_id (str): The ID of the app to add the variant to.\n payload (AddVariantFromImagePayload): The payload containing information about the variant to add.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If the feature flag is set to \"demo\" or if the image does not have a tag starting with the registry name (agenta-server) or if the image is not found or if the user does not have access to the app.\n\nReturns:\n dict: The newly added variant.", + "operationId": "add_variant_from_image", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVariantFromImagePayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}": { + "delete": { + "tags": [ + "Apps" + ], + "summary": "Remove App", + "description": "Remove app, all its variant, containers and images\n\nArguments:\n app -- App to remove", + "operationId": "remove_app", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/app_and_variant_from_template": { + "post": { + "tags": [ + "Apps" + ], + "summary": "Create App And Variant From Template", + "description": "Create an app and variant from a template.\n\nArgs:\n payload (CreateAppVariant): The payload containing the app and variant information.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If the user has reached the app limit or if an app with the same name already exists.\n\nReturns:\n AppVariantResponse: The output of the created app variant.", + "operationId": "create_app_and_variant_from_template", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAppVariant_" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppVariantResponse_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/environments": { + "get": { + "tags": [ + "Apps" + ], + "summary": "List Environments", + "description": "Retrieve a list of environments for a given app ID.\n\nArgs:\n app_id (str): The ID of the app to retrieve environments for.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nReturns:\n List[EnvironmentOutput]: A list of environment objects.", + "operationId": "list_environments", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EnvironmentOutput_" + }, + "type": "array", + "title": "Response List Environments" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/apps/{app_id}/revisions/{environment_name}": { + "get": { + "tags": [ + "Apps" + ], + "summary": "List App Environment Revisions", + "operationId": "environment_revisions", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Environment Name" + }, + "name": "environment_name", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentOutputExtended_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/from-base": { + "post": { + "tags": [ + "Variants" + ], + "summary": "Add Variant From Base And Config", + "description": "Add a new variant based on an existing one.\nSame as POST /config\n\nArgs:\n payload (AddVariantFromBasePayload): Payload containing base variant ID, new variant name, and parameters.\n stoken_session (SessionContainer, optional): Session container. Defaults to result of verify_session().\n\nRaises:\n HTTPException: Raised if the variant could not be added or accessed.\n\nReturns:\n Union[AppVariantResponse, Any]: New variant details or exception.", + "operationId": "add_variant_from_base_and_config", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddVariantFromBasePayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppVariantResponse_" + }, + {} + ], + "title": "Response Add Variant From Base And Config" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}": { + "get": { + "tags": [ + "Variants" + ], + "summary": "Get Variant", + "operationId": "get_variant", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppVariantResponse_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": [ + "Variants" + ], + "summary": "Start Variant", + "description": "Start a variant of an app.\n\nArgs:\n variant_id (str): The ID of the variant to start.\n action (VariantAction): The action to perform on the variant (start).\n env_vars (Optional[DockerEnvVars], optional): The environment variables to inject to the Docker container. Defaults to None.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nReturns:\n URI: The URL of the started variant.\n\nRaises:\n HTTPException: If the app container cannot be started.", + "operationId": "start_variant", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_start_variant" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/URI" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Variants" + ], + "summary": "Remove Variant", + "description": "Remove a variant from the server.\nIn the case it's the last variant using the image, stop the container and remove the image.\n\nArguments:\n app_variant -- AppVariant to remove\n\nRaises:\n HTTPException: If there is a problem removing the app variant", + "operationId": "remove_variant", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/parameters": { + "put": { + "tags": [ + "Variants" + ], + "summary": "Update Variant Parameters", + "description": "Updates the parameters for an app variant.\n\nArgs:\n variant_id (str): The ID of the app variant to update.\n payload (UpdateVariantParameterPayload): The payload containing the updated parameters.\n stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If there is an error while trying to update the app variant.\n\nReturns:\n JSONResponse: A JSON response containing the updated app variant parameters.", + "operationId": "update_variant_parameters", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVariantParameterPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/image": { + "put": { + "tags": [ + "Variants" + ], + "summary": "Update Variant Image", + "description": "Updates the image used in an app variant.\n\nArgs:\n variant_id (str): The ID of the app variant to update.\n image (Image): The image information to update.\n\nRaises:\n HTTPException: If an error occurs while trying to update the app variant.\n\nReturns:\n JSONResponse: A JSON response indicating whether the update was successful or not.", + "operationId": "update_variant_image", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Image_" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/logs": { + "get": { + "tags": [ + "Variants" + ], + "summary": "Retrieve Variant Logs", + "operationId": "retrieve_variant_logs", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/revisions": { + "get": { + "tags": [ + "Variants" + ], + "summary": "Get Variant Revisions", + "operationId": "get_variant_revisions", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AppVariantRevision" + }, + "type": "array", + "title": "Response Get Variant Revisions" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/variants/{variant_id}/revisions/{revision_number}": { + "get": { + "tags": [ + "Variants" + ], + "summary": "Get Variant Revision", + "operationId": "get_variant_revision", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Revision Number" + }, + "name": "revision_number", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppVariantRevision" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/by_resource": { + "get": { + "tags": [ + "Evaluations" + ], + "summary": "Fetch Evaluation Ids", + "description": "Fetches evaluation ids for a given resource type and id.\n\nArguments:\n app_id (str): The ID of the app for which to fetch evaluations.\n resource_type (str): The type of resource for which to fetch evaluations.\n resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations.\n\nRaises:\n HTTPException: If the resource_type is invalid or access is denied.\n\nReturns:\n List[str]: A list of evaluation ids.", + "operationId": "fetch_evaluation_ids_evaluations_by_resource_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Resource Type" + }, + "name": "resource_type", + "in": "query" + }, + { + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Resource Ids" + }, + "name": "resource_ids", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string", + "example": "5eb7cf5a86d9755df3a6c593" + }, + "type": "array", + "title": "Response Fetch Evaluation Ids Evaluations By Resource Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations": { + "get": { + "tags": [ + "Evaluations" + ], + "summary": "Fetch List Evaluations", + "description": "Fetches a list of evaluations, optionally filtered by an app ID.\n\nArgs:\n app_id (Optional[str]): An optional app ID to filter the evaluations.\n\nReturns:\n List[Evaluation]: A list of evaluations.", + "operationId": "fetch_list_evaluations_evaluations_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Evaluation" + }, + "type": "array", + "title": "Response Fetch List Evaluations Evaluations Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Evaluations" + ], + "summary": "Create Evaluation", + "description": "Creates a new comparison table document\nRaises:\n HTTPException: _description_\nReturns:\n _description_", + "operationId": "create_evaluation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewEvaluation" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Evaluation" + }, + "type": "array", + "title": "Response Create Evaluation" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Evaluations" + ], + "summary": "Delete Evaluations", + "description": "Delete specific comparison tables based on their unique IDs.\n\nArgs:\ndelete_evaluations (List[str]): The unique identifiers of the comparison tables to delete.\n\nReturns:\nA list of the deleted comparison tables' IDs.", + "operationId": "delete_evaluations", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEvaluation" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Delete Evaluations" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/{evaluation_id}/status": { + "get": { + "tags": [ + "Evaluations" + ], + "summary": "Fetch Evaluation Status", + "description": "Fetches the status of the evaluation.\n\nArgs:\n evaluation_id (str): the evaluation id\n request (Request): the request object\n\nReturns:\n (str): the evaluation status", + "operationId": "fetch_evaluation_status", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/{evaluation_id}/results": { + "get": { + "tags": [ + "Evaluations" + ], + "summary": "Fetch Evaluation Results", + "description": "Fetches the results of the evaluation\n\nArgs:\n evaluation_id (str): the evaluation id\n request (Request): the request object\n\nReturns:\n _type_: _description_", + "operationId": "fetch_evaluation_results", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/{evaluation_id}/evaluation_scenarios": { + "get": { + "tags": [ + "Evaluations" + ], + "summary": "Fetch Evaluation Scenarios", + "description": "Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.", + "operationId": "fetch_evaluation_scenarios", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EvaluationScenario" + }, + "type": "array", + "title": "Response Fetch Evaluation Scenarios" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/{evaluation_id}": { + "get": { + "tags": [ + "Evaluations" + ], + "summary": "Fetch Evaluation", + "description": "Fetches a single evaluation based on its ID.\n\nArgs:\n evaluation_id (str): The ID of the evaluation to fetch.\n\nReturns:\n Evaluation: The fetched evaluation.", + "operationId": "fetch_evaluation", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Evaluation" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluations/webhook_example_fake": { + "post": { + "tags": [ + "Evaluations" + ], + "summary": "Webhook Example Fake", + "description": "Returns a fake score response for example webhook evaluation\n\nReturns:\n _description_", + "operationId": "webhook_example_fake", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationWebhook" + } + } + } + } + } + } + }, + "/evaluations/evaluation_scenarios/comparison-results": { + "get": { + "tags": [ + "Evaluations" + ], + "summary": "Fetch Evaluation Scenarios", + "description": "Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.", + "operationId": "fetch_evaluation_scenarios_evaluations_evaluation_scenarios_comparison_results_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluations Ids" + }, + "name": "evaluations_ids", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "title": "Response Fetch Evaluation Scenarios Evaluations Evaluation Scenarios Comparison Results Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations": { + "get": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Fetch List Human Evaluations", + "description": "Fetches a list of evaluations, optionally filtered by an app ID.\n\nArgs:\n app_id (Optional[str]): An optional app ID to filter the evaluations.\n\nReturns:\n List[HumanEvaluation]: A list of evaluations.", + "operationId": "fetch_list_human_evaluations_human_evaluations_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/HumanEvaluation" + }, + "type": "array", + "title": "Response Fetch List Human Evaluations Human Evaluations Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Create Evaluation", + "description": "Creates a new comparison table document\nRaises:\n HTTPException: _description_\nReturns:\n _description_", + "operationId": "create_evaluation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewHumanEvaluation" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleEvaluationOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Delete Evaluations", + "description": "Delete specific comparison tables based on their unique IDs.\n\nArgs:\ndelete_evaluations (List[str]): The unique identifiers of the comparison tables to delete.\n\nReturns:\nA list of the deleted comparison tables' IDs.", + "operationId": "delete_evaluations_human_evaluations_delete", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEvaluation" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Delete Evaluations Human Evaluations Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/{evaluation_id}": { + "get": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Fetch Human Evaluation", + "description": "Fetches a single evaluation based on its ID.\n\nArgs:\n evaluation_id (str): The ID of the evaluation to fetch.\n\nReturns:\n HumanEvaluation: The fetched evaluation.", + "operationId": "fetch_human_evaluation_human_evaluations__evaluation_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanEvaluation" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Update Human Evaluation", + "description": "Updates an evaluation's status.\n\nRaises:\n HTTPException: If the columns in the test set do not match with the inputs in the variant.\n\nReturns:\n None: A 204 No Content status code, indicating that the update was successful.", + "operationId": "update_human_evaluation", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanEvaluationUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/{evaluation_id}/evaluation_scenarios": { + "get": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Fetch Evaluation Scenarios", + "description": "Fetches evaluation scenarios for a given evaluation ID.\n\nArguments:\n evaluation_id (str): The ID of the evaluation for which to fetch scenarios.\n\nRaises:\n HTTPException: If the evaluation is not found or access is denied.\n\nReturns:\n List[EvaluationScenario]: A list of evaluation scenarios.", + "operationId": "fetch_evaluation_scenarios", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenario" + }, + "type": "array", + "title": "Response Fetch Evaluation Scenarios" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/{evaluation_id}/evaluation_scenario/{evaluation_scenario_id}/{evaluation_type}": { + "put": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Update Evaluation Scenario Router", + "description": "Updates an evaluation scenario's vote or score based on its type.\n\nRaises:\n HTTPException: If update fails or unauthorized.\n\nReturns:\n None: 204 No Content status code upon successful update.", + "operationId": "update_evaluation_scenario_router_human_evaluations__evaluation_id__evaluation_scenario__evaluation_scenario_id___evaluation_type__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Scenario Id" + }, + "name": "evaluation_scenario_id", + "in": "path" + }, + { + "required": true, + "schema": { + "$ref": "#/components/schemas/EvaluationType" + }, + "name": "evaluation_type", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanEvaluationScenarioUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/evaluation_scenario/{evaluation_scenario_id}/score": { + "get": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Get Evaluation Scenario Score Router", + "description": "Fetch the score of a specific evaluation scenario.\n\nArgs:\n evaluation_scenario_id: The ID of the evaluation scenario to fetch.\n stoken_session: Session data, verified by `verify_session`.\n\nReturns:\n Dictionary containing the scenario ID and its score.", + "operationId": "get_evaluation_scenario_score_router_human_evaluations_evaluation_scenario__evaluation_scenario_id__score_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Scenario Id" + }, + "name": "evaluation_scenario_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Response Get Evaluation Scenario Score Router Human Evaluations Evaluation Scenario Evaluation Scenario Id Score Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Update Evaluation Scenario Score Router", + "description": "Updates the score of an evaluation scenario.\n\nRaises:\n HTTPException: Server error if the evaluation update fails.\n\nReturns:\n None: 204 No Content status code upon successful update.", + "operationId": "update_evaluation_scenario_score_router_human_evaluations_evaluation_scenario__evaluation_scenario_id__score_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Scenario Id" + }, + "name": "evaluation_scenario_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationScenarioScoreUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/human-evaluations/{evaluation_id}/results": { + "get": { + "tags": [ + "Human-Evaluations" + ], + "summary": "Fetch Results", + "description": "Fetch all the results for one the comparison table\n\nArguments:\n evaluation_id -- _description_\n\nReturns:\n _description_", + "operationId": "fetch_results", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluation Id" + }, + "name": "evaluation_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluators": { + "get": { + "tags": [ + "Evaluators" + ], + "summary": "Get Evaluators Endpoint", + "description": "Endpoint to fetch a list of evaluators.\n\nReturns:\n List[Evaluator]: A list of evaluator objects.", + "operationId": "get_evaluators_endpoint_evaluators_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Evaluator" + }, + "type": "array", + "title": "Response Get Evaluators Endpoint Evaluators Get" + } + } + } + } + } + } + }, + "/evaluators/configs": { + "get": { + "tags": [ + "Evaluators" + ], + "summary": "Get Evaluator Configs", + "description": "Endpoint to fetch evaluator configurations for a specific app.\n\nArgs:\n app_id (str): The ID of the app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.", + "operationId": "get_evaluator_configs_evaluators_configs_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EvaluatorConfig" + }, + "type": "array", + "title": "Response Get Evaluator Configs Evaluators Configs Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Evaluators" + ], + "summary": "Create New Evaluator Config", + "description": "Endpoint to fetch evaluator configurations for a specific app.\n\nArgs:\n app_id (str): The ID of the app.\n\nReturns:\n EvaluatorConfigDB: Evaluator configuration api model.", + "operationId": "create_new_evaluator_config_evaluators_configs_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewEvaluatorConfig" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorConfig" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/evaluators/configs/{evaluator_config_id}": { + "get": { + "tags": [ + "Evaluators" + ], + "summary": "Get Evaluator Config", + "description": "Endpoint to fetch evaluator configurations for a specific app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.", + "operationId": "get_evaluator_config_evaluators_configs__evaluator_config_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluator Config Id" + }, + "name": "evaluator_config_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorConfig" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": [ + "Evaluators" + ], + "summary": "Update Evaluator Config", + "description": "Endpoint to update evaluator configurations for a specific app.\n\nReturns:\n List[EvaluatorConfigDB]: A list of evaluator configuration objects.", + "operationId": "update_evaluator_config_evaluators_configs__evaluator_config_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluator Config Id" + }, + "name": "evaluator_config_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEvaluatorConfig" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorConfig" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Evaluators" + ], + "summary": "Delete Evaluator Config", + "description": "Endpoint to delete a specific evaluator configuration.\n\nArgs:\n evaluator_config_id (str): The unique identifier of the evaluator configuration.\n\nReturns:\n bool: True if deletion was successful, False otherwise.", + "operationId": "delete_evaluator_config_evaluators_configs__evaluator_config_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Evaluator Config Id" + }, + "name": "evaluator_config_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Delete Evaluator Config Evaluators Configs Evaluator Config Id Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets/upload": { + "post": { + "tags": [ + "Testsets" + ], + "summary": "Upload File", + "description": "Uploads a CSV or JSON file and saves its data to MongoDB.\n\nArgs:\nupload_type : Either a json or csv file.\n file (UploadFile): The CSV or JSON file to upload.\n testset_name (Optional): the name of the testset if provided.\n\nReturns:\n dict: The result of the upload process.", + "operationId": "upload_file", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_upload_file" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestSetSimpleResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets/endpoint": { + "post": { + "tags": [ + "Testsets" + ], + "summary": "Import Testset", + "description": "Import JSON testset data from an endpoint and save it to MongoDB.\n\nArgs:\n endpoint (str): An endpoint URL to import data from.\n testset_name (str): the name of the testset if provided.\n\nReturns:\n dict: The result of the import process.", + "operationId": "import_testset", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/Body_import_testset" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestSetSimpleResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets/{app_id}": { + "post": { + "tags": [ + "Testsets" + ], + "summary": "Create Testset", + "description": "Create a testset with given name and app_name, save the testset to MongoDB.\n\nArgs:\nname (str): name of the test set.\napp_name (str): name of the application.\ntestset (Dict[str, str]): test set data.\n\nReturns:\nstr: The id of the test set created.", + "operationId": "create_testset", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewTestset" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestSetSimpleResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets/{testset_id}": { + "get": { + "tags": [ + "Testsets" + ], + "summary": "Get Single Testset", + "description": "Fetch a specific testset in a MongoDB collection using its _id.\n\nArgs:\n testset_id (str): The _id of the testset to fetch.\n\nReturns:\n The requested testset if found, else an HTTPException.", + "operationId": "get_single_testset", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Testset Id" + }, + "name": "testset_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": [ + "Testsets" + ], + "summary": "Update Testset", + "description": "Update a testset with given id, update the testset in MongoDB.\n\nArgs:\ntestset_id (str): id of the test set to be updated.\ncsvdata (NewTestset): New data to replace the old testset.\n\nReturns:\nstr: The id of the test set updated.", + "operationId": "update_testset", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Testset Id" + }, + "name": "testset_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewTestset" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/testsets": { + "get": { + "tags": [ + "Testsets" + ], + "summary": "Get Testsets", + "description": "Get all testsets.\n\nReturns:\n- A list of testset objects.\n\nRaises:\n- `HTTPException` with status code 404 if no testsets are found.", + "operationId": "get_testsets", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/TestSetOutputResponse" + }, + "type": "array", + "title": "Response Get Testsets" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Testsets" + ], + "summary": "Delete Testsets", + "description": "Delete specific testsets based on their unique IDs.\n\nArgs:\ntestset_ids (List[str]): The unique identifiers of the testsets to delete.\n\nReturns:\nA list of the deleted testsets' IDs.", + "operationId": "delete_testsets", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTestsets" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Delete Testsets" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/containers/build_image": { + "post": { + "tags": [ + "Containers" + ], + "summary": "Build Image", + "description": "Builds a Docker image from a tar file containing the application code.\n\nArgs:\n app_id (str): The ID of the application to build the image for.\n base_name (str): The base name of the image to build.\n tar_file (UploadFile): The tar file containing the application code.\n stoken_session (SessionContainer): The session container for the user making the request.\n\nReturns:\n Image: The Docker image that was built.", + "operationId": "build_image", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Base Name" + }, + "name": "base_name", + "in": "query" + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_build_image" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Image_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/containers/restart_container": { + "post": { + "tags": [ + "Containers" + ], + "summary": "Restart Docker Container", + "description": "Restart docker container.\n\nArgs:\n payload (RestartAppContainer) -- the required data (app_name and variant_name)", + "operationId": "restart_container", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartAppContainer" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Restart Container" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/containers/templates": { + "get": { + "tags": [ + "Containers" + ], + "summary": "Container Templates", + "description": "Returns a list of templates available for creating new containers.\n\nParameters:\nstoken_session (SessionContainer): The session container for the user.\n\nReturns:\n\nUnion[List[Template], str]: A list of templates or an error message.", + "operationId": "container_templates", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Template" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "title": "Response Container Templates" + } + } + } + } + } + } + }, + "/containers/container_url": { + "get": { + "tags": [ + "Containers" + ], + "summary": "Construct App Container Url", + "description": "Constructs the URL for an app container based on the provided base_id or variant_id.\n\nArgs:\n base_id (Optional[str]): The ID of the base to use for the app container.\n variant_id (Optional[str]): The ID of the variant to use for the app container.\n request (Request): The request object.\n\nReturns:\n URI: The URI for the app container.\n\nRaises:\n HTTPException: If the base or variant cannot be found or the user does not have access.", + "operationId": "construct_app_container_url", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Base Id" + }, + "name": "base_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Variant Id" + }, + "name": "variant_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/URI" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/environments/deploy": { + "post": { + "tags": [ + "Environments" + ], + "summary": "Deploy To Environment", + "description": "Deploys a given variant to an environment\n\nArgs:\n environment_name: Name of the environment to deploy to.\n variant_id: variant id to deploy.\n stoken_session: . Defaults to Depends(verify_session()).\n\nRaises:\n HTTPException: If the deployment fails.", + "operationId": "deploy_to_environment", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeployToEnvironmentPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/bases": { + "get": { + "tags": [ + "Bases" + ], + "summary": "List Bases", + "description": "Retrieve a list of bases filtered by app_id and base_name.\n\nArgs:\n request (Request): The incoming request.\n app_id (Optional[str], optional): The ID of the app to filter by. Defaults to None.\n base_name (Optional[str], optional): The name of the base to filter by. Defaults to None.\n\nReturns:\n List[BaseOutput]: A list of BaseOutput objects representing the filtered bases.\n\nRaises:\n HTTPException: If there was an error retrieving the bases.", + "operationId": "list_bases", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "App Id" + }, + "name": "app_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Base Name" + }, + "name": "base_name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/BaseOutput" + }, + "type": "array", + "title": "Response List Bases" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/configs": { + "get": { + "tags": [ + "Configs" + ], + "summary": "Get Config", + "operationId": "get_config", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Base Id" + }, + "name": "base_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Config Name" + }, + "name": "config_name", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Environment Name" + }, + "name": "environment_name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConfigResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Configs" + ], + "summary": "Save Config", + "operationId": "save_config", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveConfigPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/configs/deployment/{deployment_revision_id}": { + "get": { + "tags": [ + "Configs" + ], + "summary": "Get Config Deployment Revision", + "operationId": "get_config_deployment_revision", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Deployment Revision Id" + }, + "name": "deployment_revision_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/configs/deployment/{deployment_revision_id}/revert": { + "post": { + "tags": [ + "Configs" + ], + "summary": "Revert Deployment Revision", + "operationId": "revert_deployment_revision", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Deployment Revision Id" + }, + "name": "deployment_revision_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AddVariantFromBasePayload": { + "properties": { + "base_id": { + "type": "string", + "title": "Base Id" + }, + "new_variant_name": { + "type": "string", + "title": "New Variant Name" + }, + "new_config_name": { + "type": "string", + "title": "New Config Name" + }, + "parameters": { + "type": "object", + "title": "Parameters" + } + }, + "type": "object", + "required": [ + "base_id", + "new_variant_name", + "new_config_name", + "parameters" + ], + "title": "AddVariantFromBasePayload" + }, + "AddVariantFromImagePayload": { + "properties": { + "variant_name": { + "type": "string", + "title": "Variant Name" + }, + "docker_id": { + "type": "string", + "title": "Docker Id" + }, + "tags": { + "type": "string", + "title": "Tags" + }, + "base_name": { + "type": "string", + "title": "Base Name" + }, + "config_name": { + "type": "string", + "title": "Config Name" + } + }, + "type": "object", + "required": [ + "variant_name", + "docker_id", + "tags" + ], + "title": "AddVariantFromImagePayload" + }, + "AggregatedResult": { + "properties": { + "evaluator_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorConfig" + }, + { + "type": "object" + } + ], + "title": "Evaluator Config" + }, + "result": { + "$ref": "#/components/schemas/Result" + } + }, + "type": "object", + "required": [ + "evaluator_config", + "result" + ], + "title": "AggregatedResult" + }, + "App": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "app_name": { + "type": "string", + "title": "App Name" + } + }, + "type": "object", + "required": [ + "app_id", + "app_name" + ], + "title": "App" + }, + "AppVariantResponse_": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "app_name": { + "type": "string", + "title": "App Name" + }, + "variant_id": { + "type": "string", + "title": "Variant Id" + }, + "variant_name": { + "type": "string", + "title": "Variant Name" + }, + "parameters": { + "type": "object", + "title": "Parameters" + }, + "previous_variant_name": { + "type": "string", + "title": "Previous Variant Name" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "base_name": { + "type": "string", + "title": "Base Name" + }, + "base_id": { + "type": "string", + "title": "Base Id" + }, + "config_name": { + "type": "string", + "title": "Config Name" + }, + "uri": { + "type": "string", + "title": "Uri" + }, + "revision": { + "type": "integer", + "title": "Revision" + }, + "organization_id": { + "type": "string", + "title": "Organization Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "app_id", + "app_name", + "variant_id", + "variant_name", + "user_id", + "base_name", + "base_id", + "config_name", + "revision" + ], + "title": "AppVariantResponse_" + }, + "AppVariantRevision": { + "properties": { + "revision": { + "type": "integer", + "title": "Revision" + }, + "modified_by": { + "type": "string", + "title": "Modified By" + }, + "config": { + "$ref": "#/components/schemas/ConfigDB" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "revision", + "modified_by", + "config", + "created_at" + ], + "title": "AppVariantRevision" + }, + "BaseOutput": { + "properties": { + "base_id": { + "type": "string", + "title": "Base Id" + }, + "base_name": { + "type": "string", + "title": "Base Name" + } + }, + "type": "object", + "required": [ + "base_id", + "base_name" + ], + "title": "BaseOutput" + }, + "Body_build_image": { + "properties": { + "tar_file": { + "type": "string", + "format": "binary", + "title": "Tar File" + } + }, + "type": "object", + "required": [ + "tar_file" + ], + "title": "Body_build_image" + }, + "Body_import_testset": { + "properties": { + "endpoint": { + "type": "string", + "title": "Endpoint" + }, + "testset_name": { + "type": "string", + "title": "Testset Name" + }, + "app_id": { + "type": "string", + "title": "App Id" + } + }, + "type": "object", + "title": "Body_import_testset" + }, + "Body_start_variant": { + "properties": { + "action": { + "$ref": "#/components/schemas/VariantAction" + }, + "env_vars": { + "$ref": "#/components/schemas/DockerEnvVars" + } + }, + "type": "object", + "required": [ + "action" + ], + "title": "Body_start_variant" + }, + "Body_upload_file": { + "properties": { + "upload_type": { + "type": "string", + "title": "Upload Type" + }, + "file": { + "type": "string", + "format": "binary", + "title": "File" + }, + "testset_name": { + "type": "string", + "title": "Testset Name" + }, + "app_id": { + "type": "string", + "title": "App Id" + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_upload_file" + }, + "ConfigDB": { + "properties": { + "config_name": { + "type": "string", + "title": "Config Name" + }, + "parameters": { + "type": "object", + "title": "Parameters" + } + }, + "type": "object", + "required": [ + "config_name" + ], + "title": "ConfigDB" + }, + "CreateAppOutput": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "app_name": { + "type": "string", + "title": "App Name" + } + }, + "type": "object", + "required": [ + "app_id", + "app_name" + ], + "title": "CreateAppOutput" + }, + "CreateAppVariant_": { + "properties": { + "app_name": { + "type": "string", + "title": "App Name" + }, + "template_id": { + "type": "string", + "title": "Template Id" + }, + "env_vars": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Env Vars" + }, + "organization_id": { + "type": "string", + "title": "Organization Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "app_name", + "template_id", + "env_vars" + ], + "title": "CreateAppVariant_" + }, + "CreateApp_": { + "properties": { + "app_name": { + "type": "string", + "title": "App Name" + }, + "organization_id": { + "type": "string", + "title": "Organization Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "app_name" + ], + "title": "CreateApp_" + }, + "CreateOrganization": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "type": { + "type": "string", + "title": "Type" + }, + "owner": { + "type": "string", + "title": "Owner" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateOrganization" + }, + "CreateSpan": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "variant_id": { + "type": "string", + "title": "Variant Id" + }, + "variant_name": { + "type": "string", + "title": "Variant Name" + }, + "inputs": { + "type": "object", + "title": "Inputs" + }, + "outputs": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Outputs" + }, + "config": { + "type": "object", + "title": "Config" + }, + "environment": { + "type": "string", + "title": "Environment" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags" + }, + "token_consumption": { + "type": "integer", + "title": "Token Consumption" + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_span_id": { + "type": "string", + "title": "Parent Span Id" + }, + "attributes": { + "type": "object", + "title": "Attributes" + }, + "spankind": { + "type": "string", + "title": "Spankind" + }, + "status": { + "type": "string", + "title": "Status" + }, + "user": { + "type": "string", + "title": "User" + }, + "start_time": { + "type": "string", + "format": "date-time", + "title": "Start Time" + }, + "end_time": { + "type": "string", + "format": "date-time", + "title": "End Time" + }, + "tokens": { + "$ref": "#/components/schemas/LLMTokens" + }, + "cost": { + "type": "number", + "title": "Cost" + } + }, + "type": "object", + "required": [ + "id", + "name", + "spankind", + "status", + "start_time", + "end_time" + ], + "title": "CreateSpan" + }, + "CreateTrace": { + "properties": { + "trace": { + "type": "string", + "title": "Trace" + }, + "spans": { + "items": { + "$ref": "#/components/schemas/CreateSpan" + }, + "type": "array", + "title": "Spans" + } + }, + "type": "object", + "required": [ + "trace", + "spans" + ], + "title": "CreateTrace" + }, + "CreateTraceResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message" + }, + "data": { + "type": "object", + "title": "Data" + } + }, + "type": "object", + "required": [ + "message", + "data" + ], + "title": "CreateTraceResponse" + }, + "CreateWorkspace": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "type": { + "type": "string", + "title": "Type" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateWorkspace" + }, + "DeleteEvaluation": { + "properties": { + "evaluations_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Evaluations Ids" + } + }, + "type": "object", + "required": [ + "evaluations_ids" + ], + "title": "DeleteEvaluation" + }, + "DeleteTestsets": { + "properties": { + "testset_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Testset Ids" + } + }, + "type": "object", + "required": [ + "testset_ids" + ], + "title": "DeleteTestsets" + }, + "DeployToEnvironmentPayload": { + "properties": { + "environment_name": { + "type": "string", + "title": "Environment Name" + }, + "variant_id": { + "type": "string", + "title": "Variant Id" + } + }, + "type": "object", + "required": [ + "environment_name", + "variant_id" + ], + "title": "DeployToEnvironmentPayload" + }, + "DockerEnvVars": { + "properties": { + "env_vars": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Env Vars" + } + }, + "type": "object", + "required": [ + "env_vars" + ], + "title": "DockerEnvVars" + }, + "EnvironmentOutputExtended_": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "deployed_app_variant_id": { + "type": "string", + "title": "Deployed App Variant Id" + }, + "deployed_variant_name": { + "type": "string", + "title": "Deployed Variant Name" + }, + "deployed_app_variant_revision_id": { + "type": "string", + "title": "Deployed App Variant Revision Id" + }, + "revision": { + "type": "integer", + "title": "Revision" + }, + "revisions": { + "items": { + "$ref": "#/components/schemas/EnvironmentRevision" + }, + "type": "array", + "title": "Revisions" + }, + "organization_id": { + "type": "string", + "title": "Organization Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "name", + "app_id", + "revisions" + ], + "title": "EnvironmentOutputExtended_" + }, + "EnvironmentOutput_": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "deployed_app_variant_id": { + "type": "string", + "title": "Deployed App Variant Id" + }, + "deployed_variant_name": { + "type": "string", + "title": "Deployed Variant Name" + }, + "deployed_app_variant_revision_id": { + "type": "string", + "title": "Deployed App Variant Revision Id" + }, + "revision": { + "type": "integer", + "title": "Revision" + }, + "organization_id": { + "type": "string", + "title": "Organization Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "name", + "app_id" + ], + "title": "EnvironmentOutput_" + }, + "EnvironmentRevision": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "revision": { + "type": "integer", + "title": "Revision" + }, + "modified_by": { + "type": "string", + "title": "Modified By" + }, + "deployed_app_variant_revision": { + "type": "string", + "title": "Deployed App Variant Revision" + }, + "deployment": { + "type": "string", + "title": "Deployment" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "id", + "revision", + "modified_by", + "created_at" + ], + "title": "EnvironmentRevision" + }, + "Error": { + "properties": { + "message": { + "type": "string", + "title": "Message" + }, + "stacktrace": { + "type": "string", + "title": "Stacktrace" + } + }, + "type": "object", + "required": [ + "message" + ], + "title": "Error" + }, + "Evaluation": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "user_username": { + "type": "string", + "title": "User Username" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "variant_names": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Names" + }, + "variant_revision_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Revision Ids" + }, + "revisions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Revisions" + }, + "testset_id": { + "type": "string", + "title": "Testset Id" + }, + "testset_name": { + "type": "string", + "title": "Testset Name" + }, + "status": { + "$ref": "#/components/schemas/Result" + }, + "aggregated_results": { + "items": { + "$ref": "#/components/schemas/AggregatedResult" + }, + "type": "array", + "title": "Aggregated Results" + }, + "average_cost": { + "$ref": "#/components/schemas/Result" + }, + "total_cost": { + "$ref": "#/components/schemas/Result" + }, + "average_latency": { + "$ref": "#/components/schemas/Result" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "user_id", + "user_username", + "variant_ids", + "variant_names", + "variant_revision_ids", + "revisions", + "status", + "aggregated_results", + "created_at", + "updated_at" + ], + "title": "Evaluation" + }, + "EvaluationScenario": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "evaluation_id": { + "type": "string", + "title": "Evaluation Id" + }, + "inputs": { + "items": { + "$ref": "#/components/schemas/EvaluationScenarioInput" + }, + "type": "array", + "title": "Inputs" + }, + "outputs": { + "items": { + "$ref": "#/components/schemas/EvaluationScenarioOutput" + }, + "type": "array", + "title": "Outputs" + }, + "evaluation": { + "type": "string", + "title": "Evaluation" + }, + "correct_answer": { + "type": "string", + "title": "Correct Answer" + }, + "is_pinned": { + "type": "boolean", + "title": "Is Pinned" + }, + "note": { + "type": "string", + "title": "Note" + }, + "results": { + "items": { + "$ref": "#/components/schemas/EvaluationScenarioResult" + }, + "type": "array", + "title": "Results" + } + }, + "type": "object", + "required": [ + "evaluation_id", + "inputs", + "outputs", + "results" + ], + "title": "EvaluationScenario" + }, + "EvaluationScenarioInput": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "title": "Type" + }, + "value": { + "title": "Value" + } + }, + "type": "object", + "required": [ + "name", + "type" + ], + "title": "EvaluationScenarioInput" + }, + "EvaluationScenarioOutput": { + "properties": { + "result": { + "$ref": "#/components/schemas/Result" + }, + "cost": { + "type": "number", + "title": "Cost" + }, + "latency": { + "type": "number", + "title": "Latency" + } + }, + "type": "object", + "required": [ + "result" + ], + "title": "EvaluationScenarioOutput" + }, + "EvaluationScenarioResult": { + "properties": { + "evaluator_config": { + "type": "string", + "title": "Evaluator Config" + }, + "result": { + "$ref": "#/components/schemas/Result" + } + }, + "type": "object", + "required": [ + "evaluator_config", + "result" + ], + "title": "EvaluationScenarioResult" + }, + "EvaluationScenarioScoreUpdate": { + "properties": { + "score": { + "type": "number", + "title": "Score" + } + }, + "type": "object", + "required": [ + "score" + ], + "title": "EvaluationScenarioScoreUpdate" + }, + "EvaluationStatusEnum": { + "type": "string", + "enum": [ + "EVALUATION_INITIALIZED", + "EVALUATION_STARTED", + "EVALUATION_FINISHED", + "EVALUATION_FINISHED_WITH_ERRORS", + "EVALUATION_FAILED" + ], + "title": "EvaluationStatusEnum", + "description": "An enumeration." + }, + "EvaluationType": { + "type": "string", + "enum": [ + "human_a_b_testing", + "single_model_test" + ], + "title": "EvaluationType", + "description": "An enumeration." + }, + "EvaluationWebhook": { + "properties": { + "score": { + "type": "number", + "title": "Score" + } + }, + "type": "object", + "required": [ + "score" + ], + "title": "EvaluationWebhook" + }, + "Evaluator": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "key": { + "type": "string", + "title": "Key" + }, + "direct_use": { + "type": "boolean", + "title": "Direct Use" + }, + "settings_template": { + "type": "object", + "title": "Settings Template" + }, + "description": { + "type": "string", + "title": "Description" + } + }, + "type": "object", + "required": [ + "name", + "key", + "direct_use", + "settings_template" + ], + "title": "Evaluator" + }, + "EvaluatorConfig": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "evaluator_key": { + "type": "string", + "title": "Evaluator Key" + }, + "settings_values": { + "type": "object", + "title": "Settings Values" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "name", + "evaluator_key", + "created_at", + "updated_at" + ], + "title": "EvaluatorConfig" + }, + "GetConfigResponse": { + "properties": { + "config_name": { + "type": "string", + "title": "Config Name" + }, + "current_version": { + "type": "integer", + "title": "Current Version" + }, + "parameters": { + "type": "object", + "title": "Parameters" + } + }, + "type": "object", + "required": [ + "config_name", + "current_version", + "parameters" + ], + "title": "GetConfigResponse" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "HumanEvaluation": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "user_username": { + "type": "string", + "title": "User Username" + }, + "evaluation_type": { + "type": "string", + "title": "Evaluation Type" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "variant_names": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Names" + }, + "variants_revision_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variants Revision Ids" + }, + "revisions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Revisions" + }, + "testset_id": { + "type": "string", + "title": "Testset Id" + }, + "testset_name": { + "type": "string", + "title": "Testset Name" + }, + "status": { + "type": "string", + "title": "Status" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "app_id", + "user_id", + "user_username", + "evaluation_type", + "variant_ids", + "variant_names", + "variants_revision_ids", + "revisions", + "testset_id", + "testset_name", + "status", + "created_at", + "updated_at" + ], + "title": "HumanEvaluation" + }, + "HumanEvaluationScenario": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "evaluation_id": { + "type": "string", + "title": "Evaluation Id" + }, + "inputs": { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenarioInput" + }, + "type": "array", + "title": "Inputs" + }, + "outputs": { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenarioOutput" + }, + "type": "array", + "title": "Outputs" + }, + "vote": { + "type": "string", + "title": "Vote" + }, + "score": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "title": "Score" + }, + "evaluation": { + "type": "string", + "title": "Evaluation" + }, + "correct_answer": { + "type": "string", + "title": "Correct Answer" + }, + "is_pinned": { + "type": "boolean", + "title": "Is Pinned" + }, + "note": { + "type": "string", + "title": "Note" + } + }, + "type": "object", + "required": [ + "evaluation_id", + "inputs", + "outputs" + ], + "title": "HumanEvaluationScenario" + }, + "HumanEvaluationScenarioInput": { + "properties": { + "input_name": { + "type": "string", + "title": "Input Name" + }, + "input_value": { + "type": "string", + "title": "Input Value" + } + }, + "type": "object", + "required": [ + "input_name", + "input_value" + ], + "title": "HumanEvaluationScenarioInput" + }, + "HumanEvaluationScenarioOutput": { + "properties": { + "variant_id": { + "type": "string", + "title": "Variant Id" + }, + "variant_output": { + "type": "string", + "title": "Variant Output" + } + }, + "type": "object", + "required": [ + "variant_id", + "variant_output" + ], + "title": "HumanEvaluationScenarioOutput" + }, + "HumanEvaluationScenarioUpdate": { + "properties": { + "vote": { + "type": "string", + "title": "Vote" + }, + "score": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "title": "Score" + }, + "correct_answer": { + "type": "string", + "title": "Correct Answer" + }, + "outputs": { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenarioOutput" + }, + "type": "array", + "title": "Outputs" + }, + "inputs": { + "items": { + "$ref": "#/components/schemas/HumanEvaluationScenarioInput" + }, + "type": "array", + "title": "Inputs" + }, + "is_pinned": { + "type": "boolean", + "title": "Is Pinned" + }, + "note": { + "type": "string", + "title": "Note" + } + }, + "type": "object", + "title": "HumanEvaluationScenarioUpdate" + }, + "HumanEvaluationUpdate": { + "properties": { + "status": { + "$ref": "#/components/schemas/EvaluationStatusEnum" + } + }, + "type": "object", + "title": "HumanEvaluationUpdate" + }, + "Image_": { + "properties": { + "type": { + "type": "string", + "title": "Type" + }, + "docker_id": { + "type": "string", + "title": "Docker Id" + }, + "tags": { + "type": "string", + "title": "Tags" + }, + "organization_id": { + "type": "string", + "title": "Organization Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + } + }, + "type": "object", + "required": [ + "docker_id", + "tags" + ], + "title": "Image_" + }, + "InviteRequest": { + "properties": { + "email": { + "type": "string", + "title": "Email" + }, + "roles": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Roles" + } + }, + "type": "object", + "required": [ + "email", + "roles" + ], + "title": "InviteRequest" + }, + "InviteToken": { + "properties": { + "token": { + "type": "string", + "title": "Token" + } + }, + "type": "object", + "required": [ + "token" + ], + "title": "InviteToken" + }, + "LLMRunRateLimit": { + "properties": { + "batch_size": { + "type": "integer", + "title": "Batch Size" + }, + "max_retries": { + "type": "integer", + "title": "Max Retries" + }, + "retry_delay": { + "type": "integer", + "title": "Retry Delay" + }, + "delay_between_batches": { + "type": "integer", + "title": "Delay Between Batches" + } + }, + "type": "object", + "required": [ + "batch_size", + "max_retries", + "retry_delay", + "delay_between_batches" + ], + "title": "LLMRunRateLimit" + }, + "LLMTokens": { + "properties": { + "prompt_tokens": { + "type": "integer", + "title": "Prompt Tokens", + "default": 0 + }, + "completion_tokens": { + "type": "integer", + "title": "Completion Tokens", + "default": 0 + }, + "total_tokens": { + "type": "integer", + "title": "Total Tokens", + "default": 0 + } + }, + "type": "object", + "title": "LLMTokens" + }, + "ListAPIKeysResponse": { + "properties": { + "prefix": { + "type": "string", + "title": "Prefix" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "last_used_at": { + "type": "string", + "format": "date-time", + "title": "Last Used At" + }, + "expiration_date": { + "type": "string", + "format": "date-time", + "title": "Expiration Date" + } + }, + "type": "object", + "required": [ + "prefix", + "created_at" + ], + "title": "ListAPIKeysResponse" + }, + "NewEvaluation": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "evaluators_configs": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Evaluators Configs" + }, + "testset_id": { + "type": "string", + "title": "Testset Id" + }, + "rate_limit": { + "$ref": "#/components/schemas/LLMRunRateLimit" + }, + "lm_providers_keys": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Lm Providers Keys" + }, + "correct_answer_column": { + "type": "string", + "title": "Correct Answer Column" + } + }, + "type": "object", + "required": [ + "app_id", + "variant_ids", + "evaluators_configs", + "testset_id", + "rate_limit" + ], + "title": "NewEvaluation" + }, + "NewEvaluatorConfig": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "evaluator_key": { + "type": "string", + "title": "Evaluator Key" + }, + "settings_values": { + "type": "object", + "title": "Settings Values" + } + }, + "type": "object", + "required": [ + "app_id", + "name", + "evaluator_key", + "settings_values" + ], + "title": "NewEvaluatorConfig" + }, + "NewHumanEvaluation": { + "properties": { + "app_id": { + "type": "string", + "title": "App Id" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "evaluation_type": { + "$ref": "#/components/schemas/EvaluationType" + }, + "inputs": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Inputs" + }, + "testset_id": { + "type": "string", + "title": "Testset Id" + }, + "status": { + "type": "string", + "title": "Status" + } + }, + "type": "object", + "required": [ + "app_id", + "variant_ids", + "evaluation_type", + "inputs", + "testset_id", + "status" + ], + "title": "NewHumanEvaluation" + }, + "NewTestset": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "csvdata": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array", + "title": "Csvdata" + } + }, + "type": "object", + "required": [ + "name", + "csvdata" + ], + "title": "NewTestset" + }, + "Organization": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "type": { + "type": "string", + "title": "Type" + }, + "owner": { + "type": "string", + "title": "Owner" + }, + "members": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Members" + }, + "invitations": { + "items": {}, + "type": "array", + "title": "Invitations" + }, + "is_paying": { + "type": "boolean", + "title": "Is Paying" + } + }, + "type": "object", + "required": [ + "name", + "owner" + ], + "title": "Organization" + }, + "OrganizationOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "OrganizationOutput" + }, + "OrganizationUpdate": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "title": "OrganizationUpdate" + }, + "Permission": { + "type": "string", + "enum": [ + "read_system", + "view_application", + "edit_application", + "create_application", + "delete_application", + "create_app_variant", + "delete_app_variant", + "modify_variant_configurations", + "delete_application_variant", + "view_app_environment_deployment", + "edit_app_environment_deployment", + "create_app_environment_deployment", + "view_testset", + "edit_testset", + "create_testset", + "delete_testset", + "view_evaluation", + "run_evaluations", + "edit_evaluation", + "create_evaluation", + "delete_evaluation", + "deploy_application", + "view_workspace", + "edit_workspace", + "create_workspace", + "delete_workspace", + "modify_user_roles", + "add_new_user_to_workspace", + "edit_organization", + "delete_organization", + "add_new_user_to_organization" + ], + "title": "Permission", + "description": "An enumeration." + }, + "ReseendInviteRequest": { + "properties": { + "email": { + "type": "string", + "title": "Email" + } + }, + "type": "object", + "required": [ + "email" + ], + "title": "ReseendInviteRequest" + }, + "RestartAppContainer": { + "properties": { + "variant_id": { + "type": "string", + "title": "Variant Id" + } + }, + "type": "object", + "required": [ + "variant_id" + ], + "title": "RestartAppContainer" + }, + "Result": { + "properties": { + "type": { + "type": "string", + "title": "Type" + }, + "value": { + "title": "Value" + }, + "error": { + "$ref": "#/components/schemas/Error" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "Result" + }, + "SaveConfigPayload": { + "properties": { + "base_id": { + "type": "string", + "title": "Base Id" + }, + "config_name": { + "type": "string", + "title": "Config Name" + }, + "parameters": { + "type": "object", + "title": "Parameters" + }, + "overwrite": { + "type": "boolean", + "title": "Overwrite" + } + }, + "type": "object", + "required": [ + "base_id", + "config_name", + "parameters", + "overwrite" + ], + "title": "SaveConfigPayload" + }, + "SimpleEvaluationOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "variant_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Variant Ids" + }, + "app_id": { + "type": "string", + "title": "App Id" + }, + "status": { + "type": "string", + "title": "Status" + }, + "evaluation_type": { + "$ref": "#/components/schemas/EvaluationType" + } + }, + "type": "object", + "required": [ + "id", + "variant_ids", + "app_id", + "status", + "evaluation_type" + ], + "title": "SimpleEvaluationOutput" + }, + "Span": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_span_id": { + "type": "string", + "title": "Parent Span Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "variant": { + "$ref": "#/components/schemas/SpanVariant" + }, + "environment": { + "type": "string", + "title": "Environment" + }, + "spankind": { + "$ref": "#/components/schemas/SpanKind" + }, + "status": { + "$ref": "#/components/schemas/SpanStatusCode" + }, + "metadata": { + "type": "object", + "title": "Metadata" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "content": { + "type": "object", + "title": "Content" + }, + "children": { + "items": { + "$ref": "#/components/schemas/Span" + }, + "type": "array", + "title": "Children" + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_at", + "variant", + "spankind", + "status", + "metadata", + "content" + ], + "title": "Span" + }, + "SpanDetail": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_span_id": { + "type": "string", + "title": "Parent Span Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "variant": { + "$ref": "#/components/schemas/SpanVariant" + }, + "environment": { + "type": "string", + "title": "Environment" + }, + "spankind": { + "$ref": "#/components/schemas/SpanKind" + }, + "status": { + "$ref": "#/components/schemas/SpanStatusCode" + }, + "metadata": { + "type": "object", + "title": "Metadata" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "content": { + "type": "object", + "title": "Content" + }, + "children": { + "items": { + "$ref": "#/components/schemas/Span" + }, + "type": "array", + "title": "Children" + }, + "config": { + "type": "object", + "title": "Config" + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_at", + "variant", + "spankind", + "status", + "metadata", + "content" + ], + "title": "SpanDetail" + }, + "SpanKind": { + "enum": [ + "TOOL", + "CHAIN", + "LLM", + "WORKFLOW", + "RETRIEVER", + "EMBEDDING", + "AGENT", + "UNKNOWN" + ], + "title": "SpanKind", + "description": "An enumeration." + }, + "SpanStatusCode": { + "enum": [ + "UNSET", + "OK", + "ERROR" + ], + "title": "SpanStatusCode", + "description": "An enumeration." + }, + "SpanVariant": { + "properties": { + "variant_id": { + "type": "string", + "title": "Variant Id" + }, + "variant_name": { + "type": "string", + "title": "Variant Name" + }, + "revision": { + "type": "integer", + "title": "Revision" + } + }, + "type": "object", + "title": "SpanVariant" + }, + "Template": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "image": { + "$ref": "#/components/schemas/TemplateImageInfo" + } + }, + "type": "object", + "required": [ + "id", + "image" + ], + "title": "Template" + }, + "TemplateImageInfo": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "size": { + "type": "integer", + "title": "Size" + }, + "digest": { + "type": "string", + "title": "Digest" + }, + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "type": "string", + "title": "Description" + }, + "last_pushed": { + "type": "string", + "format": "date-time", + "title": "Last Pushed" + }, + "repo_name": { + "type": "string", + "title": "Repo Name" + }, + "template_uri": { + "type": "string", + "title": "Template Uri" + } + }, + "type": "object", + "required": [ + "name", + "title", + "description" + ], + "title": "TemplateImageInfo" + }, + "TestSetOutputResponse": { + "properties": { + "_id": { + "type": "string", + "title": " Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "_id", + "name", + "created_at" + ], + "title": "TestSetOutputResponse" + }, + "TestSetSimpleResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "created_at": { + "type": "string", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_at" + ], + "title": "TestSetSimpleResponse" + }, + "TraceDetail": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "parent_span_id": { + "type": "string", + "title": "Parent Span Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "variant": { + "$ref": "#/components/schemas/SpanVariant" + }, + "environment": { + "type": "string", + "title": "Environment" + }, + "spankind": { + "$ref": "#/components/schemas/SpanKind" + }, + "status": { + "$ref": "#/components/schemas/SpanStatusCode" + }, + "metadata": { + "type": "object", + "title": "Metadata" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "content": { + "type": "object", + "title": "Content" + }, + "children": { + "items": { + "$ref": "#/components/schemas/Span" + }, + "type": "array", + "title": "Children" + }, + "config": { + "type": "object", + "title": "Config" + } + }, + "type": "object", + "required": [ + "id", + "name", + "created_at", + "variant", + "spankind", + "status", + "metadata", + "content", + "config" + ], + "title": "TraceDetail" + }, + "URI": { + "properties": { + "uri": { + "type": "string", + "title": "Uri" + } + }, + "type": "object", + "required": [ + "uri" + ], + "title": "URI" + }, + "UpdateEvaluatorConfig": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "evaluator_key": { + "type": "string", + "title": "Evaluator Key" + }, + "settings_values": { + "type": "object", + "title": "Settings Values" + } + }, + "type": "object", + "title": "UpdateEvaluatorConfig" + }, + "UpdateVariantParameterPayload": { + "properties": { + "parameters": { + "type": "object", + "title": "Parameters" + } + }, + "type": "object", + "required": [ + "parameters" + ], + "title": "UpdateVariantParameterPayload" + }, + "UpdateWorkspace": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "title": "UpdateWorkspace" + }, + "UserRole": { + "properties": { + "email": { + "type": "string", + "title": "Email" + }, + "organization_id": { + "type": "string", + "title": "Organization Id" + }, + "role": { + "$ref": "#/components/schemas/WorkspaceRole" + } + }, + "type": "object", + "required": [ + "email", + "organization_id" + ], + "title": "UserRole" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + }, + "VariantAction": { + "properties": { + "action": { + "$ref": "#/components/schemas/VariantActionEnum" + } + }, + "type": "object", + "required": [ + "action" + ], + "title": "VariantAction" + }, + "VariantActionEnum": { + "type": "string", + "enum": [ + "START", + "STOP" + ], + "title": "VariantActionEnum", + "description": "An enumeration." + }, + "WithPagination": { + "properties": { + "data": { + "items": {}, + "type": "array", + "title": "Data" + }, + "total": { + "type": "integer", + "title": "Total" + }, + "page": { + "type": "integer", + "title": "Page" + }, + "pageSize": { + "type": "integer", + "title": "Pagesize" + } + }, + "type": "object", + "required": [ + "data", + "total", + "page", + "pageSize" + ], + "title": "WithPagination" + }, + "WorkspaceMemberResponse": { + "properties": { + "user": { + "type": "object", + "title": "User" + }, + "roles": { + "items": { + "$ref": "#/components/schemas/WorkspacePermission" + }, + "type": "array", + "title": "Roles" + } + }, + "type": "object", + "required": [ + "user", + "roles" + ], + "title": "WorkspaceMemberResponse" + }, + "WorkspacePermission": { + "properties": { + "role_name": { + "$ref": "#/components/schemas/WorkspaceRole" + }, + "role_description": { + "type": "string", + "title": "Role Description" + }, + "permissions": { + "items": { + "$ref": "#/components/schemas/Permission" + }, + "type": "array" + } + }, + "type": "object", + "required": [ + "role_name" + ], + "title": "WorkspacePermission" + }, + "WorkspaceResponse": { + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "default": "2024-05-15T13:56:52.061787" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At", + "default": "2024-05-15T13:56:52.061801" + }, + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "type": { + "type": "string", + "title": "Type" + }, + "organization": { + "type": "string", + "title": "Organization" + }, + "members": { + "items": { + "$ref": "#/components/schemas/WorkspaceMemberResponse" + }, + "type": "array", + "title": "Members" + } + }, + "type": "object", + "required": [ + "id", + "name", + "organization" + ], + "title": "WorkspaceResponse" + }, + "WorkspaceRole": { + "type": "string", + "enum": [ + "owner", + "viewer", + "editor", + "evaluator", + "workspace_admin", + "deployment_manager" + ], + "title": "WorkspaceRole", + "description": "An enumeration." + }, + "WorkspaceRoleResponse": { + "properties": { + "role_name": { + "$ref": "#/components/schemas/WorkspaceRole" + }, + "role_description": { + "type": "string", + "title": "Role Description" + } + }, + "type": "object", + "required": [ + "role_name" + ], + "title": "WorkspaceRoleResponse" + } + }, + "securitySchemes": { + "APIKeyHeader": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } + }, + "tags": [ + { + "name": "Variants" + }, + { + "name": "Evaluations" + }, + { + "name": "Evaluators" + }, + { + "name": "Apps" + }, + { + "name": "Human-Evaluations" + }, + { + "name": "Testsets" + }, + { + "name": "Containers" + }, + { + "name": "Environments" + }, + { + "name": "Observability" + }, + { + "name": "Organizations" + }, + { + "name": "Bases" + }, + { + "name": "Configs" + } + ], + "security": [ + { + "APIKeyHeader": [] + } + ] +} \ No newline at end of file diff --git a/docs/reference/backend_api/remove-user-from-workspace.mdx b/docs/reference/backend_api/remove-user-from-workspace.mdx new file mode 100644 index 0000000000..492ddd6a93 --- /dev/null +++ b/docs/reference/backend_api/remove-user-from-workspace.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /workspaces/{workspace_id}/users +--- \ No newline at end of file diff --git a/docs/reference/backend_api/resend-workspace-invitation.mdx b/docs/reference/backend_api/resend-workspace-invitation.mdx new file mode 100644 index 0000000000..99dc8f915e --- /dev/null +++ b/docs/reference/backend_api/resend-workspace-invitation.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /organizations/{org_id}/workspaces/{workspace_id}/invite/resend +--- \ No newline at end of file diff --git a/docs/reference/backend_api/testsets/create-testset.mdx b/docs/reference/backend_api/testsets/create-testset.mdx new file mode 100644 index 0000000000..cc26599562 --- /dev/null +++ b/docs/reference/backend_api/testsets/create-testset.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /testsets/{app_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/testsets/delete-testsets.mdx b/docs/reference/backend_api/testsets/delete-testsets.mdx new file mode 100644 index 0000000000..4b49090420 --- /dev/null +++ b/docs/reference/backend_api/testsets/delete-testsets.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /testsets +--- \ No newline at end of file diff --git a/docs/reference/backend_api/testsets/get-single-testset.mdx b/docs/reference/backend_api/testsets/get-single-testset.mdx new file mode 100644 index 0000000000..4cd6cf53cd --- /dev/null +++ b/docs/reference/backend_api/testsets/get-single-testset.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /testsets/{testset_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/testsets/get-testsets.mdx b/docs/reference/backend_api/testsets/get-testsets.mdx new file mode 100644 index 0000000000..143b1ba80c --- /dev/null +++ b/docs/reference/backend_api/testsets/get-testsets.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /testsets +--- \ No newline at end of file diff --git a/docs/reference/backend_api/testsets/import-testset.mdx b/docs/reference/backend_api/testsets/import-testset.mdx new file mode 100644 index 0000000000..21abd8f832 --- /dev/null +++ b/docs/reference/backend_api/testsets/import-testset.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /testsets/endpoint +--- \ No newline at end of file diff --git a/docs/reference/backend_api/testsets/update-testset.mdx b/docs/reference/backend_api/testsets/update-testset.mdx new file mode 100644 index 0000000000..5377169f21 --- /dev/null +++ b/docs/reference/backend_api/testsets/update-testset.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /testsets/{testset_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/testsets/upload-file.mdx b/docs/reference/backend_api/testsets/upload-file.mdx new file mode 100644 index 0000000000..cc679ab528 --- /dev/null +++ b/docs/reference/backend_api/testsets/upload-file.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /testsets/upload +--- \ No newline at end of file diff --git a/docs/reference/backend_api/unassign-role-from-user.mdx b/docs/reference/backend_api/unassign-role-from-user.mdx new file mode 100644 index 0000000000..cc5222959f --- /dev/null +++ b/docs/reference/backend_api/unassign-role-from-user.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /workspaces/{workspace_id}/roles +--- \ No newline at end of file diff --git a/docs/reference/backend_api/update-organization.mdx b/docs/reference/backend_api/update-organization.mdx new file mode 100644 index 0000000000..a08bc9fa93 --- /dev/null +++ b/docs/reference/backend_api/update-organization.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /organizations/{org_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/update-workspace.mdx b/docs/reference/backend_api/update-workspace.mdx new file mode 100644 index 0000000000..d8fa0ae6e2 --- /dev/null +++ b/docs/reference/backend_api/update-workspace.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /organizations/{org_id}/workspaces/{workspace_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/user-profile.mdx b/docs/reference/backend_api/user-profile.mdx new file mode 100644 index 0000000000..2a1ceba5e7 --- /dev/null +++ b/docs/reference/backend_api/user-profile.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /profile +--- \ No newline at end of file diff --git a/docs/reference/backend_api/validate-api-key.mdx b/docs/reference/backend_api/validate-api-key.mdx new file mode 100644 index 0000000000..0483e36d34 --- /dev/null +++ b/docs/reference/backend_api/validate-api-key.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /keys/{key_prefix}/validate +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/add-variant-from-base-and-config.mdx b/docs/reference/backend_api/variants/add-variant-from-base-and-config.mdx new file mode 100644 index 0000000000..340ee4b6f2 --- /dev/null +++ b/docs/reference/backend_api/variants/add-variant-from-base-and-config.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /variants/from-base +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/get-variant-revision.mdx b/docs/reference/backend_api/variants/get-variant-revision.mdx new file mode 100644 index 0000000000..f0c69c1a1e --- /dev/null +++ b/docs/reference/backend_api/variants/get-variant-revision.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /variants/{variant_id}/revisions/{revision_number} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/get-variant-revisions.mdx b/docs/reference/backend_api/variants/get-variant-revisions.mdx new file mode 100644 index 0000000000..e27edbcb00 --- /dev/null +++ b/docs/reference/backend_api/variants/get-variant-revisions.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /variants/{variant_id}/revisions +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/get-variant.mdx b/docs/reference/backend_api/variants/get-variant.mdx new file mode 100644 index 0000000000..69cee69c79 --- /dev/null +++ b/docs/reference/backend_api/variants/get-variant.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /variants/{variant_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/remove-variant.mdx b/docs/reference/backend_api/variants/remove-variant.mdx new file mode 100644 index 0000000000..31af2332e5 --- /dev/null +++ b/docs/reference/backend_api/variants/remove-variant.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /variants/{variant_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/retrieve-variant-logs.mdx b/docs/reference/backend_api/variants/retrieve-variant-logs.mdx new file mode 100644 index 0000000000..b116889a70 --- /dev/null +++ b/docs/reference/backend_api/variants/retrieve-variant-logs.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /variants/{variant_id}/logs +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/start-variant.mdx b/docs/reference/backend_api/variants/start-variant.mdx new file mode 100644 index 0000000000..7a91ad1712 --- /dev/null +++ b/docs/reference/backend_api/variants/start-variant.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /variants/{variant_id} +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/update-variant-image.mdx b/docs/reference/backend_api/variants/update-variant-image.mdx new file mode 100644 index 0000000000..04f39fe4bf --- /dev/null +++ b/docs/reference/backend_api/variants/update-variant-image.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /variants/{variant_id}/image +--- \ No newline at end of file diff --git a/docs/reference/backend_api/variants/update-variant-parameters.mdx b/docs/reference/backend_api/variants/update-variant-parameters.mdx new file mode 100644 index 0000000000..86b70f68e7 --- /dev/null +++ b/docs/reference/backend_api/variants/update-variant-parameters.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /variants/{variant_id}/parameters +--- \ No newline at end of file From 68d4f37a99670143a5ec1f4c89ed064816b7350e Mon Sep 17 00:00:00 2001 From: aakrem Date: Fri, 17 May 2024 10:56:14 +0200 Subject: [PATCH 40/45] adjust cli from camel_case to kebab-case and rename variables --- agenta-cli/agenta/cli/main.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/agenta-cli/agenta/cli/main.py b/agenta-cli/agenta/cli/main.py index d1170adc1f..e4e088aa83 100644 --- a/agenta-cli/agenta/cli/main.py +++ b/agenta-cli/agenta/cli/main.py @@ -78,10 +78,10 @@ def cli(): @click.command() -@click.option("--app_name", default="") -@click.option("--backend_host", default="") -@click.option("--organisation", default="") -def init(app_name: str, backend_host: str, organisation: str): +@click.option("--app-name", "--app_name", default=None) +@click.option("--backend-host", "backend_host", default=None) +@click.option("--organisation-name", "organisation_name", default=None, help="The name of the organisation") +def init(app_name: str, backend_host: str, organisation_name: str): init_option = "Blank App" if backend_host != "" and app_name != "" else "" """Initialize a new Agenta app with the template files.""" @@ -170,19 +170,19 @@ def init(app_name: str, backend_host: str, organisation: str): click.echo(click.style(f"Error: {ex}", fg="red")) sys.exit(1) - filtered_org = None + organization = None if where_question == "On agenta cloud": - if not organisation: + if not organisation_name: which_organization = questionary.select( "Which organization do you want to create the app for?", choices=[ f"{org.name}: {org.description}" for org in user_organizations ], ).ask() - organisation = which_organization.split(":")[0] + organisation_name = which_organization.split(":")[0] - filtered_org = next( - (org for org in user_organizations if org.name == organisation), + organization = next( + (org for org in user_organizations if org.name == organisation_name), None, ) @@ -190,7 +190,7 @@ def init(app_name: str, backend_host: str, organisation: str): try: app_id = client.apps.create_app( app_name=app_name, - organization_id=filtered_org.id if filtered_org else None, + organization_id=organization.id if organization else None, ).app_id except Exception as ex: click.echo(click.style(f"Error: {ex}", fg="red")) From 2c23bc5af46f5eecef08b657b1af744a92d55a3f Mon Sep 17 00:00:00 2001 From: aakrem Date: Fri, 17 May 2024 10:57:02 +0200 Subject: [PATCH 41/45] adjust workflow and docs with new kebab-case convention --- .github/workflows/cli-commands-tests.yml | 4 ++-- docs/reference/cli/init.mdx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli-commands-tests.yml b/.github/workflows/cli-commands-tests.yml index 95168f5923..3740c2e72a 100644 --- a/.github/workflows/cli-commands-tests.yml +++ b/.github/workflows/cli-commands-tests.yml @@ -36,7 +36,7 @@ jobs: run: | APP_NAME="gh-cli-$(date +'%d-%m-%y_%H-%M-%S')" cd examples/baby_name_generator - agenta init --app_name $APP_NAME --backend_host ${{ secrets.BACKEND_HOST }} + agenta init --app-name $APP_NAME --backend-host ${{ secrets.BACKEND_HOST }} shell: bash continue-on-error: false @@ -83,7 +83,7 @@ jobs: run: | APP_NAME="gh-cli-$(date +'%d-%m-%y_%H-%M-%S')" cd examples/baby_name_generator - AGENTA_API_KEY=${{ secrets.AGENTA_API_KEY }} agenta init --app_name $APP_NAME --backend_host https://cloud.agenta.ai --organisation team + AGENTA_API_KEY=${{ secrets.AGENTA_API_KEY }} agenta init --app-name $APP_NAME --backend-host https://cloud.agenta.ai --organisation-name team shell: bash continue-on-error: false diff --git a/docs/reference/cli/init.mdx b/docs/reference/cli/init.mdx index a141a15d94..2b13bf96ca 100644 --- a/docs/reference/cli/init.mdx +++ b/docs/reference/cli/init.mdx @@ -41,7 +41,7 @@ Here you can select where the agenta platform is hosted. - Select local machine if you are running the OSS version of agenta on your local machine ([http://localhost](http://localhost)) - Select remote machine, in case you are running the OSS version of agenta on a remote machine. In that case you will prompted to enter the remote machine URL. -You can skip the questions and initialize a new app in one line: `agenta init --app_name test --backend_host https://cloud.agenta.ai/` +You can skip the questions and initialize a new app in one line: `agenta init --app-name test --backend-host https://cloud.agenta.ai/` In case you are running agenta enterprise, please refer to the enterprise documentation on how to set up your agenta project From 898f5a2015e5ca1effebec977822a9b5310bb098 Mon Sep 17 00:00:00 2001 From: aakrem Date: Fri, 17 May 2024 11:18:35 +0200 Subject: [PATCH 42/45] small refactor --- agenta-cli/agenta/cli/main.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/agenta-cli/agenta/cli/main.py b/agenta-cli/agenta/cli/main.py index e4e088aa83..ab3bf4a7ba 100644 --- a/agenta-cli/agenta/cli/main.py +++ b/agenta-cli/agenta/cli/main.py @@ -79,8 +79,13 @@ def cli(): @click.command() @click.option("--app-name", "--app_name", default=None) -@click.option("--backend-host", "backend_host", default=None) -@click.option("--organisation-name", "organisation_name", default=None, help="The name of the organisation") +@click.option("--backend-host", "backend_host", default=None) +@click.option( + "--organisation-name", + "organisation_name", + default=None, + help="The name of the organisation", +) def init(app_name: str, backend_host: str, organisation_name: str): init_option = "Blank App" if backend_host != "" and app_name != "" else "" """Initialize a new Agenta app with the template files.""" @@ -171,20 +176,19 @@ def init(app_name: str, backend_host: str, organisation_name: str): sys.exit(1) organization = None + organization_choices = {} if where_question == "On agenta cloud": if not organisation_name: + organization_choices = { + f"{org.name}": org for org in user_organizations + } which_organization = questionary.select( "Which organization do you want to create the app for?", - choices=[ - f"{org.name}: {org.description}" for org in user_organizations - ], + choices=list(organization_choices.keys()), ).ask() - organisation_name = which_organization.split(":")[0] + organisation_name = which_organization - organization = next( - (org for org in user_organizations if org.name == organisation_name), - None, - ) + organization = organization_choices.get(organisation_name) # Get app_id after creating new app in the backend server try: From f4a504eda319e2a1541c61ddbc430ea5410524e7 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Fri, 17 May 2024 12:18:00 +0100 Subject: [PATCH 43/45] Fix key prop issue in ModelName component --- .../src/components/Playground/Views/GroupedSelect.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agenta-web/src/components/Playground/Views/GroupedSelect.tsx b/agenta-web/src/components/Playground/Views/GroupedSelect.tsx index 5ec7a51061..67770d8ea5 100644 --- a/agenta-web/src/components/Playground/Views/GroupedSelect.tsx +++ b/agenta-web/src/components/Playground/Views/GroupedSelect.tsx @@ -62,12 +62,12 @@ const getTextContent = (element: React.ReactNode): string => { const filterOption = (input: string, option?: {label: React.ReactNode; value: string}) => getTextContent(option?.label).toLowerCase().includes(input.toLowerCase()) -export const ModelName: React.FC<{label: string; key: string}> = ({label, key}) => { +export const ModelName: React.FC<{label: string; value: string}> = ({label, value}) => { const classes = useStyles() return (
- {iconMap[key] ? React.createElement(iconMap[key]) : null} + {iconMap[value] ? React.createElement(iconMap[value]) : null} {label}
) @@ -81,9 +81,9 @@ export const GroupedSelect: React.FC = ({ const classes = useStyles() const options = Object.entries(choices).map(([groupLabel, groupChoices]) => ({ - label: , + label: , options: groupChoices.map((choice) => ({ - label: , + label: , value: choice, })), })) From 87c1d81c0fde9f3ad0bec4e68e10bcda61febdde Mon Sep 17 00:00:00 2001 From: aakrem Date: Thu, 2 May 2024 19:13:35 +0200 Subject: [PATCH 44/45] access to all columns --- .../services/evaluators_service.py | 68 ++++++++++++------- .../agenta_backend/tasks/evaluations.py | 5 +- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/agenta-backend/agenta_backend/services/evaluators_service.py b/agenta-backend/agenta_backend/services/evaluators_service.py index 6a8219e056..b374804e8a 100644 --- a/agenta-backend/agenta_backend/services/evaluators_service.py +++ b/agenta-backend/agenta_backend/services/evaluators_service.py @@ -1,7 +1,7 @@ import re import json import httpx -from typing import Any, Dict, Tuple +from typing import Any, Dict, Tuple, List from agenta_backend.services.security import sandbox from agenta_backend.models.db_models import Error, Result @@ -18,13 +18,14 @@ def auto_exact_match( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], ) -> Result: try: - exact_match = True if output == correct_answer else False + exact_match = True if output == data_point[correct_answer_key] else False result = Result(type="bool", value=exact_match) return result except Exception as e: @@ -40,14 +41,15 @@ def auto_exact_match( def auto_similarity_match( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], ) -> Result: try: set1 = set(output.split()) - set2 = set(correct_answer.split()) + set2 = set(data_point[correct_answer_key].split()) intersect = set1.intersection(set2) union = set1.union(set2) @@ -72,7 +74,8 @@ def auto_similarity_match( def auto_regex_test( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -96,14 +99,17 @@ def auto_regex_test( def field_match_test( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], ) -> Result: try: output_json = json.loads(output) - result = output_json[settings_values["json_field"]] == correct_answer + result = ( + output_json[settings_values["json_field"]] == data_point[correct_answer_key] + ) return Result(type="bool", value=result) except Exception as e: logging.debug("Field Match Test Failed because of Error: " + str(e)) @@ -113,7 +119,8 @@ def field_match_test( def auto_webhook_test( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -121,7 +128,7 @@ def auto_webhook_test( try: with httpx.Client() as client: payload = { - "correct_answer": correct_answer, + "correct_answer": data_point[correct_answer_key], "output": output, "inputs": inputs, } @@ -168,7 +175,8 @@ def auto_webhook_test( def auto_custom_code_run( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -178,7 +186,7 @@ def auto_custom_code_run( app_params=app_params, inputs=inputs, output=output, - correct_answer=correct_answer, + data_point=data_point, code=settings_values["code"], ) return Result(type="number", value=result) @@ -195,7 +203,8 @@ def auto_custom_code_run( def auto_ai_critique( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -206,7 +215,7 @@ def auto_ai_critique( Args: inputs (Dict[str, Any]): Input parameters for the LLM app variant. output (str): The output of the LLM app variant. - correct_answer (str): Correct answer for evaluation. + correct_answer_key (str): The key name of the correct answer in the datapoint. app_params (Dict[str, Any]): Application parameters. settings_values (Dict[str, Any]): Settings for the evaluation. lm_providers_keys (Dict[str, Any]): Keys for language model providers. @@ -224,7 +233,7 @@ def auto_ai_critique( chain_run_args = { "llm_app_prompt_template": app_params.get("prompt_user", ""), "variant_output": output, - "correct_answer": correct_answer, + "data_point": data_point, } for key, value in inputs.items(): @@ -252,7 +261,8 @@ def auto_ai_critique( def auto_starts_with( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -280,7 +290,8 @@ def auto_starts_with( def auto_ends_with( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -306,7 +317,8 @@ def auto_ends_with( def auto_contains( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -332,7 +344,8 @@ def auto_contains( def auto_contains_any( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -363,7 +376,8 @@ def auto_contains_any( def auto_contains_all( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -394,7 +408,8 @@ def auto_contains_all( def auto_contains_json( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -444,13 +459,14 @@ def levenshtein_distance(s1, s2): def auto_levenshtein_distance( inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], ) -> Result: try: - distance = levenshtein_distance(output, correct_answer) + distance = levenshtein_distance(output, data_point[correct_answer_key]) if "threshold" in settings_values: threshold = settings_values["threshold"] @@ -474,7 +490,8 @@ def evaluate( evaluator_key: str, inputs: Dict[str, Any], output: str, - correct_answer: str, + data_point: Dict[str, Any], + correct_answer_key: str, app_params: Dict[str, Any], settings_values: Dict[str, Any], lm_providers_keys: Dict[str, Any], @@ -486,7 +503,8 @@ def evaluate( return evaluation_function( inputs, output, - correct_answer, + data_point, + correct_answer_key, app_params, settings_values, lm_providers_keys, diff --git a/agenta-backend/agenta_backend/tasks/evaluations.py b/agenta-backend/agenta_backend/tasks/evaluations.py index 5dd602de6e..d9496d3819 100644 --- a/agenta-backend/agenta_backend/tasks/evaluations.py +++ b/agenta-backend/agenta_backend/tasks/evaluations.py @@ -214,14 +214,15 @@ def evaluate( continue # 3. We evaluate - evaluators_results: [EvaluationScenarioResult] = [] + evaluators_results: List[EvaluationScenarioResult] = [] for evaluator_config_db in evaluator_config_dbs: logger.debug(f"Evaluating with evaluator: {evaluator_config_db}") if correct_answer_column in data_point: result = evaluators_service.evaluate( evaluator_key=evaluator_config_db.evaluator_key, output=app_output.result.value, - correct_answer=data_point[correct_answer_column], + data_point=data_point, + correct_answer_key=correct_answer_column, settings_values=evaluator_config_db.settings_values, app_params=app_variant_parameters, inputs=data_point, From b5300df25ca6f58d8524ae477a1eeca5693ef88d Mon Sep 17 00:00:00 2001 From: aakrem Date: Fri, 17 May 2024 22:09:04 +0200 Subject: [PATCH 45/45] add default correct answer in case its not provided --- .../resources/evaluators/evaluators.py | 15 +++++++++++++++ .../agenta_backend/services/evaluator_manager.py | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/agenta-backend/agenta_backend/resources/evaluators/evaluators.py b/agenta-backend/agenta_backend/resources/evaluators/evaluators.py index 97a24600ed..976e1f55dc 100644 --- a/agenta-backend/agenta_backend/resources/evaluators/evaluators.py +++ b/agenta-backend/agenta_backend/resources/evaluators/evaluators.py @@ -267,3 +267,18 @@ def get_all_evaluators(): List[dict]: A list of evaluator dictionaries. """ return evaluators + + +def get_evaluator_by_key(key: str): + """ + Returns an evaluator with the specified key + + Args: + key (str): The key of the evaluator to retrieve + + Returns: + dict or None: The evaluator dictionary if found, otherwise None + """ + return next( + (evaluator for evaluator in evaluators if evaluator["key"] == key), None + ) diff --git a/agenta-backend/agenta_backend/services/evaluator_manager.py b/agenta-backend/agenta_backend/services/evaluator_manager.py index c86a4ef946..de262987cc 100644 --- a/agenta-backend/agenta_backend/services/evaluator_manager.py +++ b/agenta-backend/agenta_backend/services/evaluator_manager.py @@ -17,6 +17,7 @@ from agenta_backend.models.converters import evaluator_config_db_to_pydantic from agenta_backend.resources.evaluators.evaluators import get_all_evaluators from agenta_backend.models.api.evaluation_model import Evaluator, EvaluatorConfig +from agenta_backend.resources.evaluators import evaluators def get_evaluators() -> Optional[List[Evaluator]]: @@ -79,6 +80,16 @@ async def create_evaluator_config( EvaluatorConfigDB: The newly created evaluator configuration object. """ app = await db_manager.fetch_app_by_id(app_id) + evaluator_config = evaluators.get_evaluator_by_key(evaluator_key) + + if evaluator_config is not None: + if "correct_answer_keys" in evaluator_config.get("settings_template", {}): + if settings_values is None: + settings_values = {} + settings_values["correct_answer_keys"] = evaluator_config[ + "settings_template" + ]["correct_answer_keys"]["default"] + evaluator_config = await db_manager.create_evaluator_config( app=app, organization=app.organization if isCloudEE() else None, # noqa,