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)