blue-assistant 4.154.1__py3-none-any.whl → 4.160.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.
@@ -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.160.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.160.1
4
4
  Summary: 🧠 An AI Assistant.
5
5
  Home-page: https://github.com/kamangir/blue-assistant
6
6
  Author: Arash Abadpour (Kamangir)
@@ -83,4 +83,4 @@ graph LR
83
83
 
84
84
  [![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
85
 
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).
86
+ built by 🌀 [`blue_options-4.207.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.160.1`](https://github.com/kamangir/blue-assistant).
@@ -1,5 +1,5 @@
1
1
  blue_assistant/README.py,sha256=aB7xoxE3SpI_QbXzJRqh9R-QSWFJSfX3JG-ZY5nfDD4,1503
2
- blue_assistant/__init__.py,sha256=sTU1-9vRRZrZ5UxhvlCspgS_j1hjIvM-MWr2wTGXBpo,311
2
+ blue_assistant/__init__.py,sha256=WwBC7ilsQL-S4VBJbFyzEXspyz3ujbwoED6Ly9784dE,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.160.1.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
59
+ blue_assistant-4.160.1.dist-info/METADATA,sha256=MPHWU6NQKI00s7zknbWuygD6Jlb1F7O_m_xon7iAxHc,3815
60
+ blue_assistant-4.160.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
61
+ blue_assistant-4.160.1.dist-info/top_level.txt,sha256=ud0BkBbdOVze13bNqHuhZj1rwCztaBtDf5ChEYzASOs,15
62
+ blue_assistant-4.160.1.dist-info/RECORD,,