From 8e63357190e99cdba166a275cc8a3154be23a7f7 Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Thu, 12 Jun 2025 01:15:54 +0200
Subject: [PATCH] module references clean
---
modules/workflow/managerChat.py | 4 +++-
notes/changelog.txt | 29 ++++-------------------------
2 files changed, 7 insertions(+), 26 deletions(-)
diff --git a/modules/workflow/managerChat.py b/modules/workflow/managerChat.py
index fbc2429e..510e6668 100644
--- a/modules/workflow/managerChat.py
+++ b/modules/workflow/managerChat.py
@@ -159,6 +159,8 @@ class ChatManager:
"duration": (datetime.now(UTC) - datetime.fromisoformat(workflow.startedAt)).total_seconds()
}
+ # Get user language from service
+ userLanguage = self.service.user.language
# Prepare messages for AI context
messages = [
@@ -188,7 +190,7 @@ class ChatManager:
})
# Generate feedback using AI
- feedback = await self.callAi(messages, produceUserAnswer=True, temperature=0.7)
+ feedback = await self.service.callAi(messages, produceUserAnswer=True, temperature=0.7)
return feedback
diff --git a/notes/changelog.txt b/notes/changelog.txt
index 21856505..7e04221c 100644
--- a/notes/changelog.txt
+++ b/notes/changelog.txt
@@ -1,23 +1,4 @@
-- all AI calls to route over self service (AI basic, ai special, ai...) and to streamline
-
-- integrate, then remove:
- callAi(prompt, context) -> str
- callAi4Image(prompt, context, imageData)-> str
- _callAiBasic
- _callAiAdvanced
-
-in manageChat
-- not to manipulate workflow or messages --> to use functions from servicechatclass
-- to add CRUD for tasks to workflow
-- to move methods to methods class
-
-- service object to define correctly
-- folder workflow modules --> solve problems types
-
-
-Procedure for task generation:
-
-- prompt input:
+Prompt for task definition:
- original user input (summary)
- prompt for task to do
- method list
@@ -33,12 +14,10 @@ Procedure for task generation:
- as parameter only to use available items of documentReference and connectionReference or resultLabel of a previous method.action
- required result format: json for TaskResult, nothing else
-- result parsing:
- - execute task actions by using data references stepwise, all documents in TaskResults to save as ChatDocuments, to be available for next action.
-
-TODO:
-- action output filename to be available as TaskResult with name to reference object and ChatDocument list
+TODO
+- result parsing: execute task actions by using data references stepwise, all documents in TaskResults to save as ChatDocuments, to be available for next action.
+- action execution: to use conversion functions, user DocumentReference and ConnectionReference
service (ServiceContainer)