From a115a89b075a6fa68840219d1589d4a121dd287c Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Thu, 17 Apr 2025 15:24:38 +0200
Subject: [PATCH] env test
---
.github/workflows/main_poweron-gateway.yml | 2 ++
app.py | 4 +--
env_dev.env | 13 +++++-----
env_prod.env | 29 ++++++++++++++++++++++
notes/changelog.txt | 20 ++++++++++++++-
5 files changed, 59 insertions(+), 9 deletions(-)
create mode 100644 env_prod.env
diff --git a/.github/workflows/main_poweron-gateway.yml b/.github/workflows/main_poweron-gateway.yml
index 11dc5c33..02b06d96 100644
--- a/.github/workflows/main_poweron-gateway.yml
+++ b/.github/workflows/main_poweron-gateway.yml
@@ -61,6 +61,8 @@ jobs:
- name: Unzip artifact for deployment
run: unzip release.zip
+ - name: Set productive environment
+ run: cp env_prod.env .env
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v3
diff --git a/app.py b/app.py
index 7e963109..a25bd63d 100644
--- a/app.py
+++ b/app.py
@@ -32,7 +32,6 @@ import modules.gateway_model as gateway_model
import modules.lucydom_interface as lucydom_model
-
def init_logging():
# Get log level from config (default to INFO if not found)
log_level_name = APP_CONFIG.get("APP_LOG_LEVEL", "INFO")
@@ -72,7 +71,8 @@ def init_logging():
init_logging()
logger = logging.getLogger(__name__)
-app = FastAPI(title="PowerOn | Data Platform API", description="Backend-API für die Multi-Agent Platform von ValueOn AG")
+instance_label=APP_CONFIG.get("APP_ENV_LABEL")
+app = FastAPI(title="PowerOn | Data Platform API", description=f"Backend-API für die Multi-Agent Platform von ValueOn AG ({instance_label})")
# CORS-Konfiguration für Frontend-Anfragen
app.add_middleware(
diff --git a/env_dev.env b/env_dev.env
index 84d79e27..2a3541d2 100644
--- a/env_dev.env
+++ b/env_dev.env
@@ -1,9 +1,14 @@
# Development Environment Configuration
-# Using the same flattened key format as config.ini
-# Launch Configuration
+# System Configuration
+APP_ENV_TYPE = dev
+APP_ENV_LABEL = Development Instance Patrick
APP_CALL=uvicorn app:app --host 0.0.0.0 --port 8000
+# Logging Configuration
+APP_LOG_LEVEL=DEBUG
+APP_LOG_FILE=app_dev.log
+
# Database Configuration System
DB_SYSTEM_HOST=D:/Temp/_powerondb
DB_SYSTEM_DATABASE=system
@@ -22,7 +27,3 @@ APP_TOKEN_EXPIRY=300
# CORS Configuration
APP_ALLOWED_ORIGINS=["http://localhost:8080","http://localhost:3000"]
-
-# Logging Configuration
-APP_LOG_LEVEL=DEBUG
-APP_LOG_FILE=app_dev.log
diff --git a/env_prod.env b/env_prod.env
new file mode 100644
index 00000000..8ed324aa
--- /dev/null
+++ b/env_prod.env
@@ -0,0 +1,29 @@
+# Production Environment Configuration
+
+# System Configuration
+APP_ENV_TYPE = dev
+APP_ENV_LABEL = Production Instance
+APP_CALL=uvicorn app:app --host 0.0.0.0 --port 8000
+
+# Logging Configuration
+APP_LOG_LEVEL=INFO
+APP_LOG_FILE=app_prod.log
+
+# Database Configuration System
+DB_SYSTEM_HOST=/home/_powerondb
+DB_SYSTEM_DATABASE=system
+DB_SYSTEM_USER=dev_user
+DB_SYSTEM_PASSWORD_SECRET=prod_password
+
+# Database Configuration LucyDOM
+DB_LUCYDOM_HOST=/home/_powerondb
+DB_LUCYDOM_DATABASE=lucydom
+DB_LUCYDOM_USER=dev_user
+DB_LUCYDOM_PASSWORD_SECRET=prod_password
+
+# Security Configuration
+APP_JWT_SECRET_SECRET=dev_jwt_secret_token
+APP_TOKEN_EXPIRY=300
+
+# CORS Configuration
+APP_ALLOWED_ORIGINS=["http://localhost:8080","http://localhost:3000"]
diff --git a/notes/changelog.txt b/notes/changelog.txt
index 8891a0bb..b2a7c3d9 100644
--- a/notes/changelog.txt
+++ b/notes/changelog.txt
@@ -4,6 +4,24 @@
STEP 1...........................
+
+
+
+Der user liefert diesen Prompt mit vielen Dateien im Anhang: "Bitte erstellen mir eine Zusammenfassung der Dateien, dann mach einen Index der Dateien mit dem Typ pro Datei und der Summe des Speicherplatzes aller Dokumente. Dann bitte in jedem Dokument 'haben' durch 'hatte' ersetzen.".
+
+Du bist der Projektleiter, welcher dem User die Antwort liefert.
+
+Dazu erstellst Du zuerst eine Liste von Resultaten, welche der User benötigt, mit Angabe von Format.
+
+Dann erstellst Du die Antwort an den Benutzer mit den Resultaten. Dokumente lieferst Du separat als Liste. Falls Du für die Antwort oder die Resultate Inputs von Agenten benötigst, gib bitte als Liste an, wer pro Resultat was liefern muss mit Angabe von Agent,Liste der Inputdokumente, Resultatformat,Liste der Resultatnamen, Prompt für Agent als json.
+
+Diese Agenten stehen zur Verfügung:
+. Loop: Er führt repetitive Aufgaben aus. Er benötigt eine Liste von Dokumenten und einen Prompt zur Anwendung auf jedes Dokument, und Resultatformat
+. Coder: Er führt Pyton Code aus. Benötigt Prompt und Resultatformat.
+
+
+STEP 2...........................
+
We have here an ai agents workflow. a big problem is document extraction. i uploaded a pdf file with a picture inside. in the database i see, that the document has 1 contents, "text" with a endline, marked as "is_extracted=True". it is missing the picture inside the pdf.
I would like to have the following implementation for files in a workflow:
@@ -26,7 +44,7 @@ For code implementation I see a big opportunity to massively reduce code. To bui
Based on these 3 functions all operations can be done much more comfortable in the workflow, but also in connection with the ui (download file, copy file, preview file), because all references to the files are always ensured.
-STEP 2...........................
+STEP 3...........................
All routes: remove error handling details and repeating tasks like user check etc. to pack into auth module, only function calls