blue-assistant 4.66.1__py3-none-any.whl → 4.78.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/__main__.py +1 -1
- blue_assistant/script/actions/generate_text.py +5 -5
- blue_assistant/script/repository/generic/classes.py +6 -10
- {blue_assistant-4.66.1.dist-info → blue_assistant-4.78.1.dist-info}/METADATA +2 -2
- {blue_assistant-4.66.1.dist-info → blue_assistant-4.78.1.dist-info}/RECORD +9 -9
- {blue_assistant-4.66.1.dist-info → blue_assistant-4.78.1.dist-info}/LICENSE +0 -0
- {blue_assistant-4.66.1.dist-info → blue_assistant-4.78.1.dist-info}/WHEEL +0 -0
- {blue_assistant-4.66.1.dist-info → blue_assistant-4.78.1.dist-info}/top_level.txt +0 -0
blue_assistant/__init__.py
CHANGED
@@ -29,9 +29,9 @@ class GenerateTextAction(GenericAction):
|
|
29
29
|
return False
|
30
30
|
|
31
31
|
messages: List = []
|
32
|
-
|
33
|
-
logger.info("node
|
34
|
-
for successor in reversed(
|
32
|
+
node_context = self.script.get_history(node_name)
|
33
|
+
logger.info("node context: {}".format(" -> ".join(node_context)))
|
34
|
+
for successor in reversed(node_context):
|
35
35
|
messages += [
|
36
36
|
{
|
37
37
|
"role": "user",
|
@@ -46,7 +46,7 @@ class GenerateTextAction(GenericAction):
|
|
46
46
|
}
|
47
47
|
]
|
48
48
|
|
49
|
-
if self.script.
|
49
|
+
if self.script.nodes[successor]["completed"]:
|
50
50
|
messages += [
|
51
51
|
{
|
52
52
|
"role": "assistant",
|
@@ -84,7 +84,7 @@ class GenerateTextAction(GenericAction):
|
|
84
84
|
output = response.choices[0].message.content
|
85
85
|
logger.info(f"🗣️ output: {output}")
|
86
86
|
|
87
|
-
self.script.
|
87
|
+
self.script.nodes[node_name]["output"] = output
|
88
88
|
|
89
89
|
var_name = self.script.nodes[node_name].get("output", "")
|
90
90
|
if var_name:
|
@@ -25,20 +25,16 @@ class GenericScript(BaseScript):
|
|
25
25
|
if not super().run():
|
26
26
|
return False
|
27
27
|
|
28
|
-
metadata: Dict[Dict] = {"nodes": {}}
|
29
28
|
success: bool = True
|
30
|
-
while (
|
31
|
-
|
32
|
-
|
33
|
-
):
|
34
|
-
for node_name in tqdm(self.G.nodes):
|
35
|
-
if self.G.nodes[node_name]["completed"]:
|
29
|
+
while not all(self.nodes[node]["completed"] for node in self.nodes) and success:
|
30
|
+
for node_name in tqdm(self.nodes):
|
31
|
+
if self.nodes[node_name]["completed"]:
|
36
32
|
continue
|
37
33
|
|
38
34
|
pending_dependencies = [
|
39
35
|
node_name_
|
40
36
|
for node_name_ in self.G.successors(node_name)
|
41
|
-
if not self.
|
37
|
+
if not self.nodes[node_name_]["completed"]
|
42
38
|
]
|
43
39
|
if pending_dependencies:
|
44
40
|
logger.info(
|
@@ -57,12 +53,12 @@ class GenericScript(BaseScript):
|
|
57
53
|
success = False
|
58
54
|
break
|
59
55
|
|
60
|
-
self.
|
56
|
+
self.nodes[node_name]["completed"] = True
|
61
57
|
|
62
58
|
if not post_to_object(
|
63
59
|
self.object_name,
|
64
60
|
"output",
|
65
|
-
metadata,
|
61
|
+
self.metadata,
|
66
62
|
):
|
67
63
|
return False
|
68
64
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: blue_assistant
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.78.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.78.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=4cmDY3gAjWNcmT890zUPKtDkklwM_6TXtjuIHq4ChY4,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
|
@@ -26,23 +26,23 @@ blue_assistant/help/__main__.py,sha256=cVejR7OpoWPg0qLbm-PZf5TuJS27x49jzfiyCLyzE
|
|
26
26
|
blue_assistant/help/functions.py,sha256=9WsmXGMN-R7sqlkGLK0nY90Peg8Gah4rIu75QbLhImo,689
|
27
27
|
blue_assistant/help/script.py,sha256=wvS_5FWu9LAsaDDq7UoxXEadRwGseYqwu2P-9dNc5Bo,1077
|
28
28
|
blue_assistant/script/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
blue_assistant/script/__main__.py,sha256=
|
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
32
|
blue_assistant/script/actions/functions.py,sha256=0fiihOWbFiwZEXV6t9oxJaxJ5E5X-k3weqGTOKTu3sA,1233
|
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=qKzgHgf6r7dl1wR5TYN_sKxN6wfbHz-mmBZYEDDmXKA,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
39
|
blue_assistant/script/repository/blue_amo/classes.py,sha256=RY1gjZVPX8xu7nfeiZoTL8RTpu73RsoaNv4ZoGv9NNs,234
|
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=AdknknbI48XaLbfVa_L4PyuJLc3RnSeIGyF-XKaAbPU,1876
|
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.78.1.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
45
|
+
blue_assistant-4.78.1.dist-info/METADATA,sha256=1B-qVaMBQHvnXKzdEc__OeScaEia9rrFhLnd4JG1eUg,2625
|
46
|
+
blue_assistant-4.78.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
47
|
+
blue_assistant-4.78.1.dist-info/top_level.txt,sha256=ud0BkBbdOVze13bNqHuhZj1rwCztaBtDf5ChEYzASOs,15
|
48
|
+
blue_assistant-4.78.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|