-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from hoomano/kroussel/tag_manager_remove_tags
tag manager refacto
- Loading branch information
Showing
21 changed files
with
218 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
from mojodex_backend_logger import MojodexBackendLogger | ||
|
||
|
||
from mojodex_core.tag_manager import TagManager | ||
|
||
class ExecutionManager: | ||
execution_start_tag, execution_end_tag = "<execution>", "</execution>" | ||
|
||
def __init__(self): | ||
self.logger = MojodexBackendLogger(f"{self.__class__.__name__}") | ||
tag_manager: TagManager = TagManager("execution") | ||
|
||
def manage_execution_text(self, execution_text): | ||
@staticmethod | ||
def manage_execution_text(execution_text): | ||
try: | ||
from models.assistant.chat_assistant import ChatAssistant | ||
mojo_text = ChatAssistant.remove_tags_from_text(execution_text, self.execution_start_tag, | ||
self.execution_end_tag) | ||
mojo_text = ExecutionManager.tag_manager.remove_tags_from_text(execution_text) | ||
return mojo_text | ||
except Exception as e: | ||
raise Exception(f"{self.__class__.__name__} :: manage_execution_text :: {e}") | ||
raise Exception(f"{ExecutionManager.__class__.__name__} :: manage_execution_text :: {e}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 0 additions & 80 deletions
80
backend/app/models/produced_text_managers/task_produced_text_manager.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.