From 2b93d51267baccbadeeb3e78ed5379bd877c054c Mon Sep 17 00:00:00 2001 From: Denis Moldovan Date: Tue, 28 Oct 2025 18:27:46 +0200 Subject: [PATCH 1/9] Update AIA to 1.6.0 --- charts/ai-assistant/CHANGELOG.md | 43 +++++++++++++++++++------------- charts/ai-assistant/Chart.yaml | 4 +-- charts/ai-assistant/README.md | 2 +- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/charts/ai-assistant/CHANGELOG.md b/charts/ai-assistant/CHANGELOG.md index e97a47d..ea3e34d 100644 --- a/charts/ai-assistant/CHANGELOG.md +++ b/charts/ai-assistant/CHANGELOG.md @@ -1,70 +1,79 @@ # Changelog + - [Changelog](#changelog) + - [0.4.0 (2025-10-28)](#040-2025-10-28) + - [Changed](#changed) - [0.3.0 (2025-10-04)](#030-2025-10-04) - [Added](#added) - - [Changed](#changed) + - [Changed](#changed-1) - [0.2.0 (2025-07-04)](#020-2025-07-04) - [Added](#added-1) - - [Changed](#changed-1) - - [0.1.0 (2025-06-17)](#010-2025-06-17) - [Changed](#changed-2) - - [0.0.13 (2025-06-10)](#0013-2025-06-10) + - [0.1.0 (2025-06-17)](#010-2025-06-17) - [Changed](#changed-3) - - [0.0.12 (2025-06-10)](#0012-2025-06-10) + - [0.0.13 (2025-06-10)](#0013-2025-06-10) - [Changed](#changed-4) - - [0.0.10 (2025-06-9)](#0010-2025-06-9) + - [0.0.12 (2025-06-10)](#0012-2025-06-10) - [Changed](#changed-5) + - [0.0.10 (2025-06-9)](#0010-2025-06-9) + - [Changed](#changed-6) - [0.0.1 (2025-05-28)](#001-2025-05-28) - [Added](#added-2) +## 0.4.0 (2025-10-28) + +### Changed + +- [AI Assistant 1.6.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.6.0) + ## 0.3.0 (2025-10-04) ### Added -* `cloudNativePG` section, including `cloudNativePG.cluster` to create PostgreSQL database clusters using [CloudNativePG](https://cloudnative-pg.io/) operator. +- `cloudNativePG` section, including `cloudNativePG.cluster` to create PostgreSQL database clusters using [CloudNativePG](https://cloudnative-pg.io/) operator. ### Changed -* Removed `postgresql` Bitnami chart dependency, and the corresponding section in the values file. +- Removed `postgresql` Bitnami chart dependency, and the corresponding section in the values file. ## 0.2.0 (2025-07-04) ### Added -* Minimal CI testing +- Minimal CI testing ### Changed -* [AI Assistant 1.5.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.5.0) -* Document Engine dependency +- [AI Assistant 1.5.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.5.0) +- Document Engine dependency ## 0.1.0 (2025-06-17) ### Changed -* [AI Assistant 1.4.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.4.0) +- [AI Assistant 1.4.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.4.0) ## 0.0.13 (2025-06-10) ### Changed -* Document Engine chart dependency +- Document Engine chart dependency ## 0.0.12 (2025-06-10) ### Changed -* Changelog corrections -* Document Engine dependency +- Changelog corrections +- Document Engine dependency ## 0.0.10 (2025-06-9) ### Changed -* Cleanups and fixes of early development +- Cleanups and fixes of early development ## 0.0.1 (2025-05-28) ### Added -* Initial state +- Initial state diff --git a/charts/ai-assistant/Chart.yaml b/charts/ai-assistant/Chart.yaml index 035b9b8..ad13fb4 100644 --- a/charts/ai-assistant/Chart.yaml +++ b/charts/ai-assistant/Chart.yaml @@ -4,8 +4,8 @@ type: application description: AI Assistant is a thing that assists an AI home: https://www.nutrient.io/guides/ai-assistant/ icon: https://cdn.prod.website-files.com/65fdb7696055f07a05048833/66e58e33c3880ff24aa34027_nutrient-logo.png -version: 0.3.0 -appVersion: "1.5.0" +version: 0.4.0 +appVersion: "1.6.0" keywords: - nutrient diff --git a/charts/ai-assistant/README.md b/charts/ai-assistant/README.md index 9699ee5..2ba261a 100644 --- a/charts/ai-assistant/README.md +++ b/charts/ai-assistant/README.md @@ -1,6 +1,6 @@ # AI Assistant Helm chart -![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.5.0](https://img.shields.io/badge/AppVersion-1.5.0-informational?style=flat-square) +![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.6.0](https://img.shields.io/badge/AppVersion-1.6.0-informational?style=flat-square) AI Assistant is a thing that assists an AI From d9710f9d7d679bc5a3e3d233fcde1d22a0d82f01 Mon Sep 17 00:00:00 2001 From: Denis Moldovan Date: Wed, 29 Oct 2025 13:35:00 +0200 Subject: [PATCH 2/9] Bump DE dependency version --- charts/ai-assistant/CHANGELOG.md | 24 ++++++++++++------------ charts/ai-assistant/Chart.yaml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/charts/ai-assistant/CHANGELOG.md b/charts/ai-assistant/CHANGELOG.md index ea3e34d..286ed3a 100644 --- a/charts/ai-assistant/CHANGELOG.md +++ b/charts/ai-assistant/CHANGELOG.md @@ -24,56 +24,56 @@ ### Changed -- [AI Assistant 1.6.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.6.0) +* [AI Assistant 1.6.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.6.0) ## 0.3.0 (2025-10-04) ### Added -- `cloudNativePG` section, including `cloudNativePG.cluster` to create PostgreSQL database clusters using [CloudNativePG](https://cloudnative-pg.io/) operator. +* `cloudNativePG` section, including `cloudNativePG.cluster` to create PostgreSQL database clusters using [CloudNativePG](https://cloudnative-pg.io/) operator. ### Changed -- Removed `postgresql` Bitnami chart dependency, and the corresponding section in the values file. +* Removed `postgresql` Bitnami chart dependency, and the corresponding section in the values file. ## 0.2.0 (2025-07-04) ### Added -- Minimal CI testing +* Minimal CI testing ### Changed -- [AI Assistant 1.5.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.5.0) -- Document Engine dependency +* [AI Assistant 1.5.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.5.0) +* Document Engine dependency ## 0.1.0 (2025-06-17) ### Changed -- [AI Assistant 1.4.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.4.0) +* [AI Assistant 1.4.0](https://www.nutrient.io/guides/ai-assistant/changelog/#1.4.0) ## 0.0.13 (2025-06-10) ### Changed -- Document Engine chart dependency +* Document Engine chart dependency ## 0.0.12 (2025-06-10) ### Changed -- Changelog corrections -- Document Engine dependency +* Changelog corrections +* Document Engine dependency ## 0.0.10 (2025-06-9) ### Changed -- Cleanups and fixes of early development +* Cleanups and fixes of early development ## 0.0.1 (2025-05-28) ### Added -- Initial state +* Initial state diff --git a/charts/ai-assistant/Chart.yaml b/charts/ai-assistant/Chart.yaml index ad13fb4..7cf1e5e 100644 --- a/charts/ai-assistant/Chart.yaml +++ b/charts/ai-assistant/Chart.yaml @@ -18,6 +18,6 @@ maintainers: dependencies: - name: document-engine - version: ~6 + version: ~7 repository: https://pspdfkit.github.io/helm-charts condition: document-engine.enabled From 62c968d4cbb7123bc071fcfb3e7203165da5e15b Mon Sep 17 00:00:00 2001 From: Denis Moldovan Date: Wed, 29 Oct 2025 14:02:08 +0200 Subject: [PATCH 3/9] Increase startup probe timeout for AI Assistant --- charts/ai-assistant/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/ai-assistant/values.yaml b/charts/ai-assistant/values.yaml index d106ae9..85fae9a 100644 --- a/charts/ai-assistant/values.yaml +++ b/charts/ai-assistant/values.yaml @@ -507,11 +507,11 @@ startupProbe: path: /healthcheck port: http scheme: HTTP - initialDelaySeconds: 10 + initialDelaySeconds: 30 periodSeconds: 5 timeoutSeconds: 1 successThreshold: 1 - failureThreshold: 5 + failureThreshold: 10 # -- (object) [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) # @section -- F. Pod lifecycle # @notationType -- reference From 6cf17d6e6d48788dfb56ca9f7f019badd5902d52 Mon Sep 17 00:00:00 2001 From: Denis Moldovan Date: Wed, 29 Oct 2025 14:21:45 +0200 Subject: [PATCH 4/9] Add startup probe override for CI --- charts/ai-assistant/values.simple.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/ai-assistant/values.simple.yaml b/charts/ai-assistant/values.simple.yaml index d691733..19fe599 100644 --- a/charts/ai-assistant/values.simple.yaml +++ b/charts/ai-assistant/values.simple.yaml @@ -117,6 +117,11 @@ resources: cpu: "2" memory: 4Gi +startupProbe: + initialDelaySeconds: 60 + periodSeconds: 10 + failureThreshold: 18 + ingress: enabled: true className: nginx From 1a73ec182fac9eb1d9ba714f8849cb0698bacdbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Fri, 31 Oct 2025 13:56:11 +0100 Subject: [PATCH 5/9] Implement a proper OpenAI completions mock --- charts/ai-assistant/values.simple.yaml | 64 ++++++++++++++++++-------- 1 file changed, 44 insertions(+), 20 deletions(-) diff --git a/charts/ai-assistant/values.simple.yaml b/charts/ai-assistant/values.simple.yaml index 19fe599..d9f8690 100644 --- a/charts/ai-assistant/values.simple.yaml +++ b/charts/ai-assistant/values.simple.yaml @@ -10,7 +10,6 @@ apiAuth: publicKey: none algorithm: RS256 -# This is only necessary until `openai-mock` supports text embeddings sidecars: - name: openai-mocker image: python:3.11-alpine @@ -19,18 +18,19 @@ sidecars: - /bin/sh - -ce - |- - cat > /tmp/embeddings-mock.py << 'EOF' + cat > /tmp/openai-compat-mock.py << 'EOF' + import time, random import uvicorn from fastapi import FastAPI from pydantic import BaseModel - from typing import List, Union - import random + from typing import List, Union, Optional app = FastAPI() + # Embeddings (OpenAI-compatible) class EmbeddingRequest(BaseModel): input: Union[str, List[str]] - model: str = "text-embedding-3-small" + model: Optional[str] = "text-embedding-3-small" @app.post("/v1/embeddings") async def create_embeddings(request: EmbeddingRequest): @@ -43,21 +43,48 @@ sidecars: "index": i, "embedding": embedding }) + total_tokens = sum(len((text or "").split()) for text in inputs) return { "object": "list", "data": embeddings, "model": request.model, "usage": { - "prompt_tokens": sum(len(text.split()) for text in inputs), - "total_tokens": sum(len(text.split()) for text in inputs) + "prompt_tokens": total_tokens, + "total_tokens": total_tokens } } + # Chat Completions (OpenAI-compatible) + class ChatMessage(BaseModel): + role: str + content: Union[str, List[dict]] + + class ChatRequest(BaseModel): + model: Optional[str] = "gpt-4o-mini" + messages: List[ChatMessage] + + @app.post("/v1/chat/completions") + async def chat_completions(req: ChatRequest): + now = int(time.time()) + reply = "Hello from the local mock chat model." + return { + "id": f"chatcmpl-{now}", + "object": "chat.completion", + "created": now, + "model": req.model, + "choices": [{ + "index": 0, + "message": {"role": "assistant", "content": reply}, + "finish_reason": "stop" + }], + "usage": {"prompt_tokens": 1, "completion_tokens": 3, "total_tokens": 4} + } + if __name__ == "__main__": uvicorn.run(app, host="0.0.0.0", port=8080) EOF - pip install fastapi uvicorn && python /tmp/embeddings-mock.py + pip install fastapi uvicorn && python /tmp/openai-compat-mock.py config: serviceConfiguration: @@ -65,15 +92,17 @@ config: aiServices: chat: provider: - name: 'openai-compat' - baseUrl: 'https://api.openai-mock.com' - model: 'gpt-4' + name: "openai-compat" + baseUrl: "http://localhost:8080/v1" + model: "gpt-4" textEmbeddings: provider: - name: 'openai-compat' - # `openai-mock` does not yet support text embeddings - baseUrl: 'http://localhost:8080/v1' - model: 'text-embedding-3-small' + name: "openai-compat" + baseUrl: "http://localhost:8080/v1" + model: "text-embedding-3-small" + aiServiceProviderCredentials: + openAICompatible: + apiKey: "dummy-token" documentEngine: enabled: true url: http://document-engine:5000 @@ -117,11 +146,6 @@ resources: cpu: "2" memory: 4Gi -startupProbe: - initialDelaySeconds: 60 - periodSeconds: 10 - failureThreshold: 18 - ingress: enabled: true className: nginx From f2cff859b222043788525bd2237d8417349015e6 Mon Sep 17 00:00:00 2001 From: Denis Moldovan Date: Fri, 31 Oct 2025 16:27:57 +0200 Subject: [PATCH 6/9] Revert startup probe delay increase --- charts/ai-assistant/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/ai-assistant/values.yaml b/charts/ai-assistant/values.yaml index 85fae9a..d106ae9 100644 --- a/charts/ai-assistant/values.yaml +++ b/charts/ai-assistant/values.yaml @@ -507,11 +507,11 @@ startupProbe: path: /healthcheck port: http scheme: HTTP - initialDelaySeconds: 30 + initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 1 successThreshold: 1 - failureThreshold: 10 + failureThreshold: 5 # -- (object) [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) # @section -- F. Pod lifecycle # @notationType -- reference From a34968a9b21e0cfbf5b9b0be0591e0649288ab43 Mon Sep 17 00:00:00 2001 From: Denis Moldovan Date: Wed, 5 Nov 2025 13:38:33 +0200 Subject: [PATCH 7/9] Remove sidecar container and change the provider to mock --- charts/ai-assistant/values.simple.yaml | 93 +++----------------------- 1 file changed, 9 insertions(+), 84 deletions(-) diff --git a/charts/ai-assistant/values.simple.yaml b/charts/ai-assistant/values.simple.yaml index d9f8690..2965432 100644 --- a/charts/ai-assistant/values.simple.yaml +++ b/charts/ai-assistant/values.simple.yaml @@ -10,81 +10,6 @@ apiAuth: publicKey: none algorithm: RS256 -sidecars: - - name: openai-mocker - image: python:3.11-alpine - imagePullPolicy: IfNotPresent - command: - - /bin/sh - - -ce - - |- - cat > /tmp/openai-compat-mock.py << 'EOF' - import time, random - import uvicorn - from fastapi import FastAPI - from pydantic import BaseModel - from typing import List, Union, Optional - - app = FastAPI() - - # Embeddings (OpenAI-compatible) - class EmbeddingRequest(BaseModel): - input: Union[str, List[str]] - model: Optional[str] = "text-embedding-3-small" - - @app.post("/v1/embeddings") - async def create_embeddings(request: EmbeddingRequest): - inputs = request.input if isinstance(request.input, list) else [request.input] - embeddings = [] - for i, text in enumerate(inputs): - embedding = [random.uniform(-1, 1) for _ in range(1536)] - embeddings.append({ - "object": "embedding", - "index": i, - "embedding": embedding - }) - total_tokens = sum(len((text or "").split()) for text in inputs) - return { - "object": "list", - "data": embeddings, - "model": request.model, - "usage": { - "prompt_tokens": total_tokens, - "total_tokens": total_tokens - } - } - - # Chat Completions (OpenAI-compatible) - class ChatMessage(BaseModel): - role: str - content: Union[str, List[dict]] - - class ChatRequest(BaseModel): - model: Optional[str] = "gpt-4o-mini" - messages: List[ChatMessage] - - @app.post("/v1/chat/completions") - async def chat_completions(req: ChatRequest): - now = int(time.time()) - reply = "Hello from the local mock chat model." - return { - "id": f"chatcmpl-{now}", - "object": "chat.completion", - "created": now, - "model": req.model, - "choices": [{ - "index": 0, - "message": {"role": "assistant", "content": reply}, - "finish_reason": "stop" - }], - "usage": {"prompt_tokens": 1, "completion_tokens": 3, "total_tokens": 4} - } - - if __name__ == "__main__": - uvicorn.run(app, host="0.0.0.0", port=8080) - EOF - - pip install fastapi uvicorn && python /tmp/openai-compat-mock.py config: serviceConfiguration: @@ -92,17 +17,17 @@ config: aiServices: chat: provider: - name: "openai-compat" - baseUrl: "http://localhost:8080/v1" - model: "gpt-4" + name: "mock" + fakeResponses: + - "Hello! This is a mock response for testing." + - "Mock provider is working correctly." + - "Test response from AIA mock provider." + model: "mock-chat-model" textEmbeddings: provider: - name: "openai-compat" - baseUrl: "http://localhost:8080/v1" - model: "text-embedding-3-small" - aiServiceProviderCredentials: - openAICompatible: - apiKey: "dummy-token" + name: "mock" + fakeResponses: [] + model: "mock-embedding-model" documentEngine: enabled: true url: http://document-engine:5000 From d0d0d779157ccb255dfe32092feced36c8f9d6bd Mon Sep 17 00:00:00 2001 From: Denis Moldovan Date: Wed, 5 Nov 2025 13:44:39 +0200 Subject: [PATCH 8/9] Add mock provider to the json schema pattern --- charts/ai-assistant/values.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/ai-assistant/values.schema.json b/charts/ai-assistant/values.schema.json index 50b1acb..a04f1a4 100644 --- a/charts/ai-assistant/values.schema.json +++ b/charts/ai-assistant/values.schema.json @@ -370,7 +370,7 @@ }, "name": { "type": "string", - "pattern": "^(openai|azure|bedrock|openai-compat)$" + "pattern": "^(openai|azure|bedrock|openai-compat|mock)$" } } } @@ -393,7 +393,7 @@ }, "name": { "type": "string", - "pattern": "^(openai|azure|bedrock|openai-compat)$" + "pattern": "^(openai|azure|bedrock|openai-compat|mock)$" } } } From f320ad8d6a7d6f34ca61586b47da0d968ff5b2f3 Mon Sep 17 00:00:00 2001 From: Denis Moldovan <57831211+denisangel2k2@users.noreply.github.com> Date: Fri, 7 Nov 2025 15:57:03 +0200 Subject: [PATCH 9/9] Update charts/ai-assistant/CHANGELOG.md Co-authored-by: Ingvarr Zhmakin <19270832+lazyoldbear@users.noreply.github.com> --- charts/ai-assistant/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/ai-assistant/CHANGELOG.md b/charts/ai-assistant/CHANGELOG.md index 286ed3a..ed66e3d 100644 --- a/charts/ai-assistant/CHANGELOG.md +++ b/charts/ai-assistant/CHANGELOG.md @@ -20,7 +20,7 @@ - [0.0.1 (2025-05-28)](#001-2025-05-28) - [Added](#added-2) -## 0.4.0 (2025-10-28) +## 0.4.0 (2025-11-7) ### Changed