blue-assistant 4.78.1__py3-none-any.whl → 4.87.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- blue_assistant/__init__.py +1 -1
- blue_assistant/script/actions/functions.py +0 -26
- blue_assistant/script/actions/generate_text.py +1 -1
- blue_assistant/script/repository/blue_amo/classes.py +30 -1
- blue_assistant/script/repository/generic/classes.py +25 -5
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.87.1.dist-info}/METADATA +2 -2
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.87.1.dist-info}/RECORD +10 -10
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.87.1.dist-info}/LICENSE +0 -0
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.87.1.dist-info}/WHEEL +0 -0
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.87.1.dist-info}/top_level.txt +0 -0
blue_assistant/__init__.py
CHANGED
@@ -20,29 +20,3 @@ def get_action_class(
|
|
20
20
|
|
21
21
|
logger.error(f"{action_name}: action not found.")
|
22
22
|
return False, GenericAction
|
23
|
-
|
24
|
-
|
25
|
-
def perform_action(
|
26
|
-
script: BaseScript,
|
27
|
-
node_name: str,
|
28
|
-
) -> bool:
|
29
|
-
action_name = script.nodes[node_name].get("action", "unknown")
|
30
|
-
|
31
|
-
success, action_class = get_action_class(action_name=action_name)
|
32
|
-
if not success:
|
33
|
-
return success
|
34
|
-
|
35
|
-
logger.info(
|
36
|
-
"{}.perform_action: {} == {} on {}".format(
|
37
|
-
NAME,
|
38
|
-
action_name,
|
39
|
-
action_class.__name__,
|
40
|
-
node_name,
|
41
|
-
)
|
42
|
-
)
|
43
|
-
|
44
|
-
action_object = action_class(
|
45
|
-
script=script,
|
46
|
-
)
|
47
|
-
|
48
|
-
return action_object.perform(node_name=node_name)
|
@@ -30,7 +30,7 @@ class GenerateTextAction(GenericAction):
|
|
30
30
|
|
31
31
|
messages: List = []
|
32
32
|
node_context = self.script.get_history(node_name)
|
33
|
-
logger.info("node context: {}".format("
|
33
|
+
logger.info("node context: {}".format(" <- ".join(node_context)))
|
34
34
|
for successor in reversed(node_context):
|
35
35
|
messages += [
|
36
36
|
{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from blue_objects import file, path
|
2
|
-
|
2
|
+
import copy
|
3
3
|
|
4
4
|
from blue_assistant.script.repository.generic.classes import GenericScript
|
5
5
|
from blue_assistant.logger import logger
|
@@ -7,3 +7,32 @@ from blue_assistant.logger import logger
|
|
7
7
|
|
8
8
|
class BlueAmoScript(GenericScript):
|
9
9
|
name = path.name(file.path(__file__))
|
10
|
+
|
11
|
+
def __init__(
|
12
|
+
self,
|
13
|
+
object_name: str,
|
14
|
+
verbose: bool = False,
|
15
|
+
):
|
16
|
+
super().__init__(
|
17
|
+
object_name=object_name,
|
18
|
+
verbose=verbose,
|
19
|
+
)
|
20
|
+
|
21
|
+
holder_node_name = "generating-the-frames"
|
22
|
+
|
23
|
+
holder_node = self.nodes[holder_node_name]
|
24
|
+
del self.nodes[holder_node_name]
|
25
|
+
self.G.remove_node(holder_node_name)
|
26
|
+
|
27
|
+
for index in range(self.vars["frame_count"]):
|
28
|
+
node_name = f"generating-frame-{index+1:03d}"
|
29
|
+
|
30
|
+
self.nodes[node_name] = copy.deepcopy(holder_node)
|
31
|
+
|
32
|
+
self.G.add_node(node_name)
|
33
|
+
self.G.add_edge(
|
34
|
+
node_name,
|
35
|
+
"slicing-into-frames",
|
36
|
+
)
|
37
|
+
|
38
|
+
assert self.save_graph()
|
@@ -9,7 +9,7 @@ from blue_objects.metadata import post_to_object
|
|
9
9
|
|
10
10
|
from blue_assistant import NAME
|
11
11
|
from blue_assistant.script.repository.base.classes import BaseScript
|
12
|
-
from blue_assistant.script.actions.functions import
|
12
|
+
from blue_assistant.script.actions.functions import get_action_class
|
13
13
|
from blue_assistant.logger import logger
|
14
14
|
|
15
15
|
|
@@ -19,6 +19,29 @@ NAME = module.name(__file__, NAME)
|
|
19
19
|
class GenericScript(BaseScript):
|
20
20
|
name = path.name(file.path(__file__))
|
21
21
|
|
22
|
+
def perform_action(
|
23
|
+
self,
|
24
|
+
node_name: str,
|
25
|
+
) -> bool:
|
26
|
+
action_name = self.nodes[node_name].get("action", "unknown")
|
27
|
+
|
28
|
+
success, action_class = get_action_class(action_name=action_name)
|
29
|
+
if not success:
|
30
|
+
return success
|
31
|
+
|
32
|
+
logger.info(
|
33
|
+
"{}.perform_action: {} == {} on {}".format(
|
34
|
+
NAME,
|
35
|
+
action_name,
|
36
|
+
action_class.__name__,
|
37
|
+
node_name,
|
38
|
+
)
|
39
|
+
)
|
40
|
+
|
41
|
+
action_object = action_class(script=self)
|
42
|
+
|
43
|
+
return action_object.perform(node_name=node_name)
|
44
|
+
|
22
45
|
def run(
|
23
46
|
self,
|
24
47
|
) -> bool:
|
@@ -46,10 +69,7 @@ class GenericScript(BaseScript):
|
|
46
69
|
)
|
47
70
|
continue
|
48
71
|
|
49
|
-
if not perform_action(
|
50
|
-
script=self,
|
51
|
-
node_name=node_name,
|
52
|
-
):
|
72
|
+
if not self.perform_action(node_name=node_name):
|
53
73
|
success = False
|
54
74
|
break
|
55
75
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: blue_assistant
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.87.1
|
4
4
|
Summary: 🧠 An AI Assistant.
|
5
5
|
Home-page: https://github.com/kamangir/blue-assistant
|
6
6
|
Author: Arash Abadpour (Kamangir)
|
@@ -72,4 +72,4 @@ graph LR
|
|
72
72
|
|
73
73
|
[](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [](https://pypi.org/project/blue-assistant/) [](https://pypistats.org/packages/blue-assistant)
|
74
74
|
|
75
|
-
built by 🌀 [`blue_options-4.207.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.
|
75
|
+
built by 🌀 [`blue_options-4.207.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.87.1`](https://github.com/kamangir/blue-assistant).
|
@@ -1,5 +1,5 @@
|
|
1
1
|
blue_assistant/README.py,sha256=Nzr3v-VSa8CISkqkLHd8ILyY_WiJ7x2igYPH-lYpzEY,795
|
2
|
-
blue_assistant/__init__.py,sha256=
|
2
|
+
blue_assistant/__init__.py,sha256=bHmdRdS7buZRGyYFPR7olkJj3ivLxtWFzxIOMAGY3ZY,310
|
3
3
|
blue_assistant/__main__.py,sha256=URtal70XZc0--3FDTYWcLtnGOqBYjMX9gt-L1k8hDXI,361
|
4
4
|
blue_assistant/config.env,sha256=JV9zx17FflIPmV1hK-yuM0GlrUjkGuaQ_EzPFPTkoXM,66
|
5
5
|
blue_assistant/env.py,sha256=rgIlKVsALrRD1sYJV3SkFfzIvWNavix2HN0sSy2cCi4,391
|
@@ -29,20 +29,20 @@ blue_assistant/script/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
29
29
|
blue_assistant/script/__main__.py,sha256=immGrRfasPHdPDxZJweu0coi_V0jg8_2zfqTnRxNfaU,1529
|
30
30
|
blue_assistant/script/load.py,sha256=Bd5L9HBL0Yh1MLGAyGrQX3XQLH-UiOWLsHJvzCmNs3g,773
|
31
31
|
blue_assistant/script/actions/__init__.py,sha256=8Sp6avoJGDXVORvx5mvkxTNaxjz_KevKN4Wb8qLZHsQ,487
|
32
|
-
blue_assistant/script/actions/functions.py,sha256=
|
32
|
+
blue_assistant/script/actions/functions.py,sha256=nazOu20plxxxUIcr1YCpNiWn4zmcGCCWcojWxLnZtl8,669
|
33
33
|
blue_assistant/script/actions/generate_image.py,sha256=bGDdP9XfBtFFFNL4d7DA7_FJvsFKadPOgwVAXkFgyjE,477
|
34
|
-
blue_assistant/script/actions/generate_text.py,sha256
|
34
|
+
blue_assistant/script/actions/generate_text.py,sha256=-RShuIAYvRVLtOsuAW9XRrxeaU9NPUYGYWrYUyJo_tc,2826
|
35
35
|
blue_assistant/script/actions/generic.py,sha256=dIjqocIEpLEb1BI76kHivVpDUG5QpeZHLA2onsYn1SU,731
|
36
36
|
blue_assistant/script/actions/wip.py,sha256=K4kJE4bn3u6o-QWTESPydO_eD54zOwZbU9WLAO94z1Q,171
|
37
37
|
blue_assistant/script/repository/__init__.py,sha256=WFkbe-6yyljpmeVpXgLhOPt-YRc7BwkRNzPO-7Wz0Dg,573
|
38
38
|
blue_assistant/script/repository/blue_amo/__init__.py,sha256=WjL9GIlN-DBnbUMJ8O_FxTp0rcVGlsIS3H9YtXEefTk,76
|
39
|
-
blue_assistant/script/repository/blue_amo/classes.py,sha256=
|
39
|
+
blue_assistant/script/repository/blue_amo/classes.py,sha256=LlbdXlQfV3WRqooirmgSENa5NKjfllfCvi0JWlhR3SA,994
|
40
40
|
blue_assistant/script/repository/generic/__init__.py,sha256=kLffGsQMQAFJTw6IZBE5eBxvshP1x9wwHHR4hsDJblo,75
|
41
|
-
blue_assistant/script/repository/generic/classes.py,sha256=
|
41
|
+
blue_assistant/script/repository/generic/classes.py,sha256=3E5OrRSvI98y51zfVFYZV8bnoaPXyu3bU_IruIX6G34,2413
|
42
42
|
blue_assistant/script/repository/moon_datasets/__init__.py,sha256=aCtmP2avh3yKAJ668S3GsLR9vbBOm5zt9FSFCqy_tAs,86
|
43
43
|
blue_assistant/script/repository/moon_datasets/classes.py,sha256=68zThDhjF9gGRnsw8EKNLGOMBFbCSljt0jGovuOzCAc,197
|
44
|
-
blue_assistant-4.
|
45
|
-
blue_assistant-4.
|
46
|
-
blue_assistant-4.
|
47
|
-
blue_assistant-4.
|
48
|
-
blue_assistant-4.
|
44
|
+
blue_assistant-4.87.1.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
45
|
+
blue_assistant-4.87.1.dist-info/METADATA,sha256=iEwfKly_X4g_d-UOeGVnY4yQcaFuJ_YfIbqmRW5ZCeo,2625
|
46
|
+
blue_assistant-4.87.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
47
|
+
blue_assistant-4.87.1.dist-info/top_level.txt,sha256=ud0BkBbdOVze13bNqHuhZj1rwCztaBtDf5ChEYzASOs,15
|
48
|
+
blue_assistant-4.87.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|