blue-assistant 4.154.1__py3-none-any.whl → 4.178.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/README.py CHANGED
@@ -5,35 +5,35 @@ from blue_objects import file, README
5
5
  from blue_assistant import NAME, VERSION, ICON, REPO_NAME
6
6
 
7
7
 
8
- items = [
9
- "[`{}`]({}) [![image]({})]({}) {}".format(
10
- item["title"],
11
- item["url"],
12
- item["marquee"],
13
- item["url"],
14
- item["description"],
15
- )
16
- for item in [
8
+ items = README.Items(
9
+ [
17
10
  {
18
- "title": "orbital-data-explorer",
19
- "url": "./blue_assistant/script/repository/orbital_data_explorer/README.md",
20
- "marquee": "https://github.com/kamangir/assets/raw/main/blue-plugin/marquee.png?raw=true",
21
- "description": "Access to the [Orbital Data Explorer](https://ode.rsl.wustl.edu/), through AI.",
11
+ "name": "hue",
12
+ "url": "./blue_assistant/script/repository/hue",
13
+ "marquee": "https://github.com/kamangir/assets/blob/main/blue-assistant/hue.jpg?raw=true",
14
+ "description": '"send a color command to the Hue LED lights in my apartment." 🔥',
22
15
  },
23
16
  {
24
- "title": "blue-amo",
17
+ "name": "blue-amo",
25
18
  "url": "./blue_assistant/script/repository/blue_amo/README.md",
26
19
  "marquee": "https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true",
27
20
  "description": "A story developed and visualized, by AI.",
28
21
  },
22
+ {
23
+ "name": "orbital-data-explorer",
24
+ "url": "./blue_assistant/script/repository/orbital_data_explorer/README.md",
25
+ "marquee": "https://github.com/kamangir/assets/blob/main/blue-assistant/orbital-data-explorer.png?raw=true",
26
+ "description": "Access to the [Orbital Data Explorer](https://ode.rsl.wustl.edu/), through AI. ⏸️",
27
+ },
29
28
  ]
30
- ]
29
+ )
31
30
 
32
31
 
33
32
  def build():
34
33
  return all(
35
34
  README.build(
36
35
  items=readme.get("items", []),
36
+ cols=readme.get("cols", 3),
37
37
  path=os.path.join(file.path(__file__), readme["path"]),
38
38
  ICON=ICON,
39
39
  NAME=NAME,
@@ -41,8 +41,14 @@ def build():
41
41
  REPO_NAME=REPO_NAME,
42
42
  )
43
43
  for readme in [
44
- {"items": items, "path": ".."},
44
+ {
45
+ "items": items,
46
+ "cols": 2,
47
+ "path": "..",
48
+ },
45
49
  {"path": "script/repository/blue_amo"},
46
50
  {"path": "script/repository/orbital_data_explorer"},
51
+ {"path": "script/repository/hue/docs/round-1.md"},
52
+ {"path": "script/repository/hue/docs"},
47
53
  ]
48
54
  )
@@ -4,7 +4,7 @@ ICON = "🧠"
4
4
 
5
5
  DESCRIPTION = f"{ICON} An AI Assistant."
6
6
 
7
- VERSION = "4.154.1"
7
+ VERSION = "4.178.1"
8
8
 
9
9
  REPO_NAME = "blue-assistant"
10
10
 
@@ -24,6 +24,7 @@ class GenericScript(BaseScript):
24
24
  node_name: str,
25
25
  ) -> bool:
26
26
  action_name = self.nodes[node_name].get("action", "unknown")
27
+ logger.info(f"---- node: {node_name} ---- ")
27
28
 
28
29
  if action_name not in dict_of_actions:
29
30
  logger.error(f"{action_name}: action not found.")
@@ -1,9 +1,15 @@
1
+ from typing import Dict
1
2
  from blueness import module
3
+ from tqdm import tqdm
4
+
5
+ from openai_commands.text_generation import api
2
6
 
3
7
  from blue_assistant import NAME
8
+ from blue_assistant.web.crawl import crawl_list_of_urls
4
9
  from blue_assistant.script.repository.base.classes import BaseScript
5
10
  from blue_assistant.logger import logger
6
11
 
12
+
7
13
  NAME = module.name(__file__, NAME)
8
14
 
9
15
 
@@ -13,6 +19,24 @@ def researching_the_questions(
13
19
  ) -> bool:
14
20
  logger.info(f"{NAME}: ...")
15
21
 
16
- logger.info("🪄")
22
+ visited_urls = crawl_list_of_urls(
23
+ seed_urls=script.vars["seed_urls"],
24
+ object_name=script.object_name,
25
+ max_iterations=script.nodes[node_name]["max_iterations"],
26
+ )
27
+
28
+ success, output, _ = api.generate_text(
29
+ prompt=script.nodes[node_name]["prompt"].replace(
30
+ ":::input", " ".join([content for content in visited_urls.values()])
31
+ ),
32
+ verbose=script.verbose,
33
+ )
34
+ if not success:
35
+ return success
36
+
37
+ logger.info(output)
38
+
39
+ script.nodes[node_name]["visited_urls"] = visited_urls
40
+ script.nodes[node_name]["output"] = output
17
41
 
18
42
  return True
@@ -9,6 +9,21 @@ from blue_assistant.script.repository.orbital_data_explorer.actions import (
9
9
  class OrbitalDataExplorerScript(GenericScript):
10
10
  name = path.name(file.path(__file__))
11
11
 
12
+ def __init__(
13
+ self,
14
+ object_name: str,
15
+ test_mode: bool = False,
16
+ verbose: bool = False,
17
+ ):
18
+ super().__init__(
19
+ object_name=object_name,
20
+ test_mode=test_mode,
21
+ verbose=verbose,
22
+ )
23
+
24
+ if self.test_mode:
25
+ self.nodes["researching_the_questions"]["max_iterations"] = 3
26
+
12
27
  def perform_action(
13
28
  self,
14
29
  node_name: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: blue_assistant
3
- Version: 4.154.1
3
+ Version: 4.178.1
4
4
  Summary: 🧠 An AI Assistant.
5
5
  Home-page: https://github.com/kamangir/blue-assistant
6
6
  Author: Arash Abadpour (Kamangir)
@@ -47,10 +47,6 @@ Dynamic: summary
47
47
 
48
48
  🧠 `@assistant` runs AI scripts; DAGs that combine deterministic and AI operations.
49
49
 
50
- | | |
51
- | --- | --- |
52
- | [`orbital-data-explorer`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/orbital_data_explorer/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-plugin/marquee.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/orbital_data_explorer/README.md) Access to the [Orbital Data Explorer](https://ode.rsl.wustl.edu/), through AI. | [`blue-amo`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) A story developed and visualized, by AI. |
53
-
54
50
  ```bash
55
51
  pip install blue-assistant
56
52
  ```
@@ -78,9 +74,14 @@ graph LR
78
74
  classDef folder fill:#999,stroke:#333,stroke-width:2px;
79
75
  ```
80
76
 
77
+ | | |
78
+ | --- | --- |
79
+ | [`hue`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) [![image](https://github.com/kamangir/assets/blob/main/blue-assistant/hue.jpg?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) "send a color command to the Hue LED lights in my apartment." 🔥 | [`blue-amo`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) A story developed and visualized, by AI. |
80
+ | [`orbital-data-explorer`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/orbital_data_explorer/README.md) [![image](https://github.com/kamangir/assets/blob/main/blue-assistant/orbital-data-explorer.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/orbital_data_explorer/README.md) Access to the [Orbital Data Explorer](https://ode.rsl.wustl.edu/), through AI. ⏸️ | |
81
+
81
82
  ---
82
83
 
83
84
 
84
85
  [![pylint](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-assistant.svg)](https://pypi.org/project/blue-assistant/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-assistant)](https://pypistats.org/packages/blue-assistant)
85
86
 
86
- built by 🌀 [`blue_options-4.207.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.154.1`](https://github.com/kamangir/blue-assistant).
87
+ built by 🌀 [`blue_options-4.234.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.178.1`](https://github.com/kamangir/blue-assistant).
@@ -1,5 +1,5 @@
1
- blue_assistant/README.py,sha256=aB7xoxE3SpI_QbXzJRqh9R-QSWFJSfX3JG-ZY5nfDD4,1503
2
- blue_assistant/__init__.py,sha256=sTU1-9vRRZrZ5UxhvlCspgS_j1hjIvM-MWr2wTGXBpo,311
1
+ blue_assistant/README.py,sha256=CfWGCgzrRjJYsTzb54xEN8wMcd4i07uiXMexPXNIZPM,1892
2
+ blue_assistant/__init__.py,sha256=8yfQVOGfGfPqaXQjqOBlBoQ66rIUg0878FEVowq0dH8,311
3
3
  blue_assistant/__main__.py,sha256=URtal70XZc0--3FDTYWcLtnGOqBYjMX9gt-L1k8hDXI,361
4
4
  blue_assistant/config.env,sha256=PUR0GHwzmpm7xNdWHjIv8DzlMAesOAa1NEnYDsIUTs8,211
5
5
  blue_assistant/env.py,sha256=e3YPPpMCrKoTcOX8QmzndEwDnM-nC-hFTSUvhnaKpSc,737
@@ -45,18 +45,18 @@ blue_assistant/script/repository/blue_amo/actions/__init__.py,sha256=je2S21KvYB3
45
45
  blue_assistant/script/repository/blue_amo/actions/slicing_into_frames.py,sha256=79SI7_69FKKLeX_jHlfXnUWGtG4Sj7sBJOfeFwK8I9U,1201
46
46
  blue_assistant/script/repository/blue_amo/actions/stitching_the_frames.py,sha256=mbXriat6deEAmuo5Y1ValySnUXDENR7TZS_3nVPlQ6M,3622
47
47
  blue_assistant/script/repository/generic/__init__.py,sha256=kLffGsQMQAFJTw6IZBE5eBxvshP1x9wwHHR4hsDJblo,75
48
- blue_assistant/script/repository/generic/classes.py,sha256=XuUhtBdY85ZGdMR9IcZ7nScJmQ2IDhJBbhyMv3amDHc,2265
48
+ blue_assistant/script/repository/generic/classes.py,sha256=LqxQGRbakikvGwdQB8jjqlpsjt-PGKC9BcHMSO9wN-E,2318
49
49
  blue_assistant/script/repository/hue/__init__.py,sha256=WjL9GIlN-DBnbUMJ8O_FxTp0rcVGlsIS3H9YtXEefTk,76
50
50
  blue_assistant/script/repository/hue/classes.py,sha256=YhifmcuylnZuI0_BjBPmwrSbsO-BOHDHNJ0pSLIExiE,188
51
51
  blue_assistant/script/repository/orbital_data_explorer/__init__.py,sha256=yy5FtCeHlr9dRfqxw4QYWr7_yRjnQpwVyuAY2vLrh4Q,110
52
- blue_assistant/script/repository/orbital_data_explorer/classes.py,sha256=i4cVCR6ge8FhipPs-H1HZ_5xcok4mzxrqwRr_hLz_UI,657
52
+ blue_assistant/script/repository/orbital_data_explorer/classes.py,sha256=NEJeud6UPXarnAIEvAX_ZKFoRnyK1tiEIORSsrixLxQ,1024
53
53
  blue_assistant/script/repository/orbital_data_explorer/actions/__init__.py,sha256=RcrFUAwnvhuwNh3gC65w9G26vd_cIa7LV1lFvGFcigk,370
54
- blue_assistant/script/repository/orbital_data_explorer/actions/researching_the_questions.py,sha256=Wb8sU9UmdRRhHUhNj7_VQ74_Bio20xGajzeGz4HJqZQ,369
54
+ blue_assistant/script/repository/orbital_data_explorer/actions/researching_the_questions.py,sha256=MDhncDBCLH-T7nfHjlfiN_nKv6gsY4YmiNWguVvKq_g,1100
55
55
  blue_assistant/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  blue_assistant/web/__main__.py,sha256=wriAODGqb_WRaXxq5KF5ZJp1pOzuTMlVElDafgZo5f0,1258
57
57
  blue_assistant/web/crawl.py,sha256=Sxkxg9b0IsQxL0ecEAcb13JwPOmwkwUie8XUeDChf1c,2249
58
- blue_assistant-4.154.1.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
59
- blue_assistant-4.154.1.dist-info/METADATA,sha256=64601-HQMnP9wWL1BNdavvvJacKJq8NV_stNLRn6LEk,3815
60
- blue_assistant-4.154.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
61
- blue_assistant-4.154.1.dist-info/top_level.txt,sha256=ud0BkBbdOVze13bNqHuhZj1rwCztaBtDf5ChEYzASOs,15
62
- blue_assistant-4.154.1.dist-info/RECORD,,
58
+ blue_assistant-4.178.1.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
59
+ blue_assistant-4.178.1.dist-info/METADATA,sha256=n90TofM7cyipJiah3uwDfDM4TXU09B7yAOgUcznKLTY,4213
60
+ blue_assistant-4.178.1.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
61
+ blue_assistant-4.178.1.dist-info/top_level.txt,sha256=ud0BkBbdOVze13bNqHuhZj1rwCztaBtDf5ChEYzASOs,15
62
+ blue_assistant-4.178.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (76.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5