From bb07eeef23e7ce6ce8058a190c8f6bd42f93cb98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Lesn=C3=A9?= Date: Tue, 21 Jan 2025 11:50:03 +0100 Subject: [PATCH 1/2] security: Fix the Azure CLI version in CI --- .github/workflows/pipeline.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 4d0ec364..6e85dc38 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -15,9 +15,13 @@ on: - main env: + # CI/CD variables CONTAINER_NAME: ${{ github.repository }} CONTAINER_REGISTRY_GHCR: ghcr.io CONTAINER_PLATFORMS: linux/amd64,linux/arm64/v8 + # Tool versions + # See: https://github.com/azure/azure-cli/releases + AZURE_CLI_VERSION: 2.68.0 # https://github.com/docker/buildx/releases BUILDX_VERSION: 0.17.1 @@ -113,7 +117,9 @@ jobs: version: "0.5.x" - name: Set up Azure CLI - run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash + run: | + curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash + sudo apt-get install azure-cli=${{ env.AZURE_CLI_VERSION }}-1~$(lsb_release -cs) # - name: Login to Azure # uses: Azure/login@v2.2.0 From 516bacc6da25efb7050efc7e90b6308dade9f92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Lesn=C3=A9?= Date: Tue, 21 Jan 2025 17:59:18 +0100 Subject: [PATCH 2/2] fix: LLM call crash when no tools See #399 --- app/helpers/llm_worker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/llm_worker.py b/app/helpers/llm_worker.py index adb532e1..955ccf82 100644 --- a/app/helpers/llm_worker.py +++ b/app/helpers/llm_worker.py @@ -148,7 +148,9 @@ async def _completion_stream_worker( max_tokens=max_tokens, messages=prompt, stream=True, - tools=tools, + # AI Inference API doesn't support enpty tools array + # See: https://github.com/microsoft/call-center-ai/issues/399 + tools=tools or None, ) # Yield chuncks