bluer-agent 5.176.1__tar.gz

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.
Files changed (102) hide show
  1. bluer_agent-5.176.1/LICENSE +121 -0
  2. bluer_agent-5.176.1/MANIFEST.in +1 -0
  3. bluer_agent-5.176.1/PKG-INFO +64 -0
  4. bluer_agent-5.176.1/README.md +34 -0
  5. bluer_agent-5.176.1/bluer_agent/.abcli/abcli.sh +9 -0
  6. bluer_agent-5.176.1/bluer_agent/.abcli/actions.sh +11 -0
  7. bluer_agent-5.176.1/bluer_agent/.abcli/alias.sh +17 -0
  8. bluer_agent-5.176.1/bluer_agent/.abcli/audio/install.sh +16 -0
  9. bluer_agent-5.176.1/bluer_agent/.abcli/audio/play.sh +20 -0
  10. bluer_agent-5.176.1/bluer_agent/.abcli/audio/record.sh +28 -0
  11. bluer_agent-5.176.1/bluer_agent/.abcli/audio/test.sh +6 -0
  12. bluer_agent-5.176.1/bluer_agent/.abcli/audio.sh +15 -0
  13. bluer_agent-5.176.1/bluer_agent/.abcli/bluer_agent.sh +11 -0
  14. bluer_agent-5.176.1/bluer_agent/.abcli/chat/validate.sh +8 -0
  15. bluer_agent-5.176.1/bluer_agent/.abcli/chat.sh +15 -0
  16. bluer_agent-5.176.1/bluer_agent/.abcli/crawl/collect.sh +28 -0
  17. bluer_agent-5.176.1/bluer_agent/.abcli/crawl/review.sh +20 -0
  18. bluer_agent-5.176.1/bluer_agent/.abcli/crawl.sh +15 -0
  19. bluer_agent-5.176.1/bluer_agent/.abcli/install.sh +7 -0
  20. bluer_agent-5.176.1/bluer_agent/.abcli/rag/build_corpus.sh +28 -0
  21. bluer_agent-5.176.1/bluer_agent/.abcli/rag/query.sh +24 -0
  22. bluer_agent-5.176.1/bluer_agent/.abcli/rag.sh +15 -0
  23. bluer_agent-5.176.1/bluer_agent/.abcli/tests/README.sh +8 -0
  24. bluer_agent-5.176.1/bluer_agent/.abcli/tests/audio_play.sh +11 -0
  25. bluer_agent-5.176.1/bluer_agent/.abcli/tests/audio_record.sh +19 -0
  26. bluer_agent-5.176.1/bluer_agent/.abcli/tests/chat.sh +7 -0
  27. bluer_agent-5.176.1/bluer_agent/.abcli/tests/crawl.sh +25 -0
  28. bluer_agent-5.176.1/bluer_agent/.abcli/tests/crawl_all.sh +34 -0
  29. bluer_agent-5.176.1/bluer_agent/.abcli/tests/help.sh +52 -0
  30. bluer_agent-5.176.1/bluer_agent/.abcli/tests/rag_build_corpus.sh +14 -0
  31. bluer_agent-5.176.1/bluer_agent/.abcli/tests/rag_query.sh +12 -0
  32. bluer_agent-5.176.1/bluer_agent/.abcli/tests/transcription.sh +41 -0
  33. bluer_agent-5.176.1/bluer_agent/.abcli/tests/version.sh +8 -0
  34. bluer_agent-5.176.1/bluer_agent/.abcli/tests/voice.sh +22 -0
  35. bluer_agent-5.176.1/bluer_agent/.abcli/transcribe.sh +42 -0
  36. bluer_agent-5.176.1/bluer_agent/.abcli/voice/generate.sh +29 -0
  37. bluer_agent-5.176.1/bluer_agent/.abcli/voice.sh +15 -0
  38. bluer_agent-5.176.1/bluer_agent/README/__init__.py +0 -0
  39. bluer_agent-5.176.1/bluer_agent/README/aliases.py +23 -0
  40. bluer_agent-5.176.1/bluer_agent/README/audio.py +5 -0
  41. bluer_agent-5.176.1/bluer_agent/README/build.py +28 -0
  42. bluer_agent-5.176.1/bluer_agent/README/chat.py +8 -0
  43. bluer_agent-5.176.1/bluer_agent/README/crawl.py +14 -0
  44. bluer_agent-5.176.1/bluer_agent/README/docs.py +25 -0
  45. bluer_agent-5.176.1/bluer_agent/README/rag.py +17 -0
  46. bluer_agent-5.176.1/bluer_agent/README/transcription.py +8 -0
  47. bluer_agent-5.176.1/bluer_agent/README/voice.py +8 -0
  48. bluer_agent-5.176.1/bluer_agent/__init__.py +17 -0
  49. bluer_agent-5.176.1/bluer_agent/__main__.py +17 -0
  50. bluer_agent-5.176.1/bluer_agent/audio/__init__.py +1 -0
  51. bluer_agent-5.176.1/bluer_agent/audio/__main__.py +54 -0
  52. bluer_agent-5.176.1/bluer_agent/audio/env.py +11 -0
  53. bluer_agent-5.176.1/bluer_agent/audio/play.py +51 -0
  54. bluer_agent-5.176.1/bluer_agent/audio/properties.py +102 -0
  55. bluer_agent-5.176.1/bluer_agent/audio/record.py +49 -0
  56. bluer_agent-5.176.1/bluer_agent/chat/__init__.py +0 -0
  57. bluer_agent-5.176.1/bluer_agent/chat/__main__.py +33 -0
  58. bluer_agent-5.176.1/bluer_agent/chat/functions.py +98 -0
  59. bluer_agent-5.176.1/bluer_agent/config.env +23 -0
  60. bluer_agent-5.176.1/bluer_agent/crawl/__init__.py +0 -0
  61. bluer_agent-5.176.1/bluer_agent/crawl/__main__.py +146 -0
  62. bluer_agent-5.176.1/bluer_agent/crawl/classes.py +16 -0
  63. bluer_agent-5.176.1/bluer_agent/crawl/collect.py +101 -0
  64. bluer_agent-5.176.1/bluer_agent/crawl/collector.py +291 -0
  65. bluer_agent-5.176.1/bluer_agent/crawl/file.py +89 -0
  66. bluer_agent-5.176.1/bluer_agent/crawl/functions.py +12 -0
  67. bluer_agent-5.176.1/bluer_agent/env.py +31 -0
  68. bluer_agent-5.176.1/bluer_agent/functions.py +1 -0
  69. bluer_agent-5.176.1/bluer_agent/help/__init__.py +1 -0
  70. bluer_agent-5.176.1/bluer_agent/help/__main__.py +10 -0
  71. bluer_agent-5.176.1/bluer_agent/help/audio.py +90 -0
  72. bluer_agent-5.176.1/bluer_agent/help/chat.py +22 -0
  73. bluer_agent-5.176.1/bluer_agent/help/crawl.py +70 -0
  74. bluer_agent-5.176.1/bluer_agent/help/functions.py +22 -0
  75. bluer_agent-5.176.1/bluer_agent/help/rag.py +50 -0
  76. bluer_agent-5.176.1/bluer_agent/help/transcribe.py +37 -0
  77. bluer_agent-5.176.1/bluer_agent/help/voice.py +36 -0
  78. bluer_agent-5.176.1/bluer_agent/host.py +11 -0
  79. bluer_agent-5.176.1/bluer_agent/logger.py +4 -0
  80. bluer_agent-5.176.1/bluer_agent/rag/__init__.py +0 -0
  81. bluer_agent-5.176.1/bluer_agent/rag/__main__.py +44 -0
  82. bluer_agent-5.176.1/bluer_agent/rag/corpus/__init__.py +0 -0
  83. bluer_agent-5.176.1/bluer_agent/rag/corpus/__main__.py +44 -0
  84. bluer_agent-5.176.1/bluer_agent/rag/corpus/build.py +136 -0
  85. bluer_agent-5.176.1/bluer_agent/rag/corpus/context.py +172 -0
  86. bluer_agent-5.176.1/bluer_agent/rag/corpus/embed.py +181 -0
  87. bluer_agent-5.176.1/bluer_agent/rag/prompt.py +63 -0
  88. bluer_agent-5.176.1/bluer_agent/rag/query.py +36 -0
  89. bluer_agent-5.176.1/bluer_agent/sample.env +10 -0
  90. bluer_agent-5.176.1/bluer_agent/transcription/__init__.py +0 -0
  91. bluer_agent-5.176.1/bluer_agent/transcription/__main__.py +62 -0
  92. bluer_agent-5.176.1/bluer_agent/transcription/functions.py +118 -0
  93. bluer_agent-5.176.1/bluer_agent/urls.py +2 -0
  94. bluer_agent-5.176.1/bluer_agent.egg-info/PKG-INFO +64 -0
  95. bluer_agent-5.176.1/bluer_agent.egg-info/SOURCES.txt +100 -0
  96. bluer_agent-5.176.1/bluer_agent.egg-info/dependency_links.txt +1 -0
  97. bluer_agent-5.176.1/bluer_agent.egg-info/requires.txt +4 -0
  98. bluer_agent-5.176.1/bluer_agent.egg-info/top_level.txt +1 -0
  99. bluer_agent-5.176.1/pyproject.toml +6 -0
  100. bluer_agent-5.176.1/requirements.txt +5 -0
  101. bluer_agent-5.176.1/setup.cfg +4 -0
  102. bluer_agent-5.176.1/setup.py +30 -0
@@ -0,0 +1,121 @@
1
+ Creative Commons Legal Code
2
+
3
+ CC0 1.0 Universal
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.
@@ -0,0 +1 @@
1
+ include requirements.txt
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: bluer_agent
3
+ Version: 5.176.1
4
+ Summary: 👾 an AI agent.
5
+ Home-page: https://github.com/kamangir/bluer-agent
6
+ Author: Arash Abadpour (Kamangir)
7
+ Author-email: arash.abadpour@gmail.com
8
+ License: CC0-1.0
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Unix Shell
11
+ Classifier: Operating System :: OS Independent
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: bluer_ai
15
+ Requires-Dist: beautifulsoup4
16
+ Requires-Dist: joblib
17
+ Requires-Dist: scikit-learn
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: license-file
26
+ Dynamic: requires-dist
27
+ Dynamic: summary
28
+
29
+ # 👾 bluer-agent
30
+
31
+ 👾 `@agent` is a set of tools for interacting with LLMs.
32
+
33
+ ## installation
34
+
35
+ ```bash
36
+ pip install bluer-agent
37
+ ```
38
+
39
+ ## features
40
+
41
+ - [audio](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/audio.md)
42
+ - [chat](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/chat)
43
+ - [crawl](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/crawl)
44
+ - [rag](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/rag)
45
+ - [transcription](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/transcription)
46
+ - [voice](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/voice.md)
47
+
48
+ # aliases
49
+
50
+ [@audio](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/aliases/audio.md)
51
+ [@chat](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/aliases/chat.md)
52
+ [@crawl](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/aliases/crawl.md)
53
+ [@rag](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/aliases/rag.md)
54
+ [@transcribe](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/aliases/transcribe.md)
55
+ [@voice](https://github.com/kamangir/bluer-agent/blob/main/bluer_agent/docs/aliases/voice.md)
56
+
57
+ ---
58
+
59
+
60
+ [![pylint](https://github.com/kamangir/bluer-agent/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/bluer-agent/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/bluer-agent/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/bluer-agent/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/bluer-agent/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/bluer-agent/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/bluer-agent.svg)](https://pypi.org/project/bluer-agent/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/bluer-agent)](https://pypistats.org/packages/bluer-agent)
61
+
62
+ built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 👾 [`bluer_agent-5.176.1`](https://github.com/kamangir/bluer-agent).
63
+
64
+ built by 🌀 [`blueness-3.118.1`](https://github.com/kamangir/blueness).
@@ -0,0 +1,34 @@
1
+ # 👾 bluer-agent
2
+
3
+ 👾 `@agent` is a set of tools for interacting with LLMs.
4
+
5
+ ## installation
6
+
7
+ ```bash
8
+ pip install bluer-agent
9
+ ```
10
+
11
+ ## features
12
+
13
+ - [audio](./bluer_agent/docs/audio.md)
14
+ - [chat](./bluer_agent/docs/chat)
15
+ - [crawl](./bluer_agent/docs/crawl)
16
+ - [rag](./bluer_agent/docs/rag)
17
+ - [transcription](./bluer_agent/docs/transcription)
18
+ - [voice](./bluer_agent/docs/voice.md)
19
+
20
+ # aliases
21
+
22
+ [@audio](./bluer_agent/docs/aliases/audio.md)
23
+ [@chat](./bluer_agent/docs/aliases/chat.md)
24
+ [@crawl](./bluer_agent/docs/aliases/crawl.md)
25
+ [@rag](./bluer_agent/docs/aliases/rag.md)
26
+ [@transcribe](./bluer_agent/docs/aliases/transcribe.md)
27
+ [@voice](./bluer_agent/docs/aliases/voice.md)
28
+
29
+ ---
30
+
31
+
32
+ [![pylint](https://github.com/kamangir/bluer-agent/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/bluer-agent/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/bluer-agent/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/bluer-agent/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/bluer-agent/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/bluer-agent/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/bluer-agent.svg)](https://pypi.org/project/bluer-agent/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/bluer-agent)](https://pypistats.org/packages/bluer-agent)
33
+
34
+ built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 👾 [`bluer_agent-5.176.1`](https://github.com/kamangir/bluer-agent).
@@ -0,0 +1,9 @@
1
+ #! /usr/bin/env bash
2
+
3
+ bluer_ai_source_caller_suffix_path /tests
4
+
5
+ bluer_ai_env_dot_load \
6
+ caller,plugin=bluer_agent,suffix=/../..
7
+
8
+ bluer_ai_env_dot_load \
9
+ caller,filename=config.env,suffix=/..
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_action_git_before_push() {
4
+ bluer_agent build_README
5
+ [[ $? -ne 0 ]] && return 1
6
+
7
+ [[ "$(bluer_ai_git get_branch)" != "main" ]] &&
8
+ return 0
9
+
10
+ bluer_agent pypi build
11
+ }
@@ -0,0 +1,17 @@
1
+ #! /usr/bin/env bash
2
+
3
+ alias @audio=bluer_agent_audio
4
+
5
+ alias @chat=bluer_agent_chat
6
+
7
+ alias @crawl=bluer_agent_crawl
8
+
9
+ alias @rag=bluer_agent_rag
10
+
11
+ alias @transcribe=bluer_agent_transcribe
12
+
13
+ alias @voice=bluer_agent_voice
14
+
15
+ # ignore
16
+ alias @agent=bluer_agent
17
+ alias @ai_agent=bluer_agent
@@ -0,0 +1,16 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_audio_install() {
4
+ if [[ "$abcli_is_rpi" == true ]]; then
5
+ sudo apt install -y sox libsox-fmt-all libsox-fmt-alsa
6
+ return
7
+ fi
8
+
9
+ if [[ "$abcli_is_mac" == true ]]; then
10
+ brew install sox
11
+ return
12
+ fi
13
+
14
+ bluer_ai_log_error "@agent: audio: install: do not know how to install."
15
+ return 1
16
+ }
@@ -0,0 +1,20 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_audio_play() {
4
+ local options=$1
5
+ local do_download=$(bluer_ai_option_int "$options" download 0)
6
+ local filename=$(bluer_ai_option "$options" filename audio.wav)
7
+
8
+ local object_name=$(bluer_ai_clarify_object $2 .)
9
+
10
+ [[ "$do_download" == 1 ]] &&
11
+ bluer_objects_download \
12
+ filename=$filename \
13
+ $object_name
14
+
15
+ python3 -m bluer_agent.audio \
16
+ play \
17
+ --object_name $object_name \
18
+ --filename $filename \
19
+ "${@:3}"
20
+ }
@@ -0,0 +1,28 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_audio_record() {
4
+ local options=$1
5
+ local filename=$(bluer_ai_option "$options" filename audio.wav)
6
+ local do_upload=$(bluer_ai_option_int "$options" upload 0)
7
+ local do_play=$(bluer_ai_option_int "$options" play 0)
8
+
9
+ local object_name=$(bluer_ai_clarify_object $2 audio-$(bluer_ai_string_timestamp))
10
+
11
+ python3 -m bluer_agent.audio \
12
+ record \
13
+ --object_name $object_name \
14
+ --filename $filename \
15
+ "${@:3}"
16
+ [[ $? -ne 0 ]] && return 1
17
+
18
+ [[ "$do_upload" == 1 ]] &&
19
+ bluer_objects_upload \
20
+ filename=$filename \
21
+ $object_name
22
+
23
+ if [[ "$do_play" == 1 ]]; then
24
+ bluer_agent_audio_play \
25
+ filename=$filename \
26
+ $object_name
27
+ fi
28
+ }
@@ -0,0 +1,6 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_audio_test() {
4
+ bluer_ai_eval ,$options \
5
+ speaker-test -t sine -l 1
6
+ }
@@ -0,0 +1,15 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_audio() {
4
+ local task=$1
5
+
6
+ local function_name=bluer_agent_audio_$task
7
+ if [[ $(type -t $function_name) == "function" ]]; then
8
+ $function_name "${@:2}"
9
+ return
10
+ fi
11
+
12
+ python3 -m bluer_agent.audio "$@"
13
+ }
14
+
15
+ bluer_ai_source_caller_suffix_path /audio
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent() {
4
+ local task=$1
5
+
6
+ bluer_ai_generic_task \
7
+ plugin=bluer_agent,task=$task \
8
+ "${@:2}"
9
+ }
10
+
11
+ bluer_ai_log $(bluer_agent version --show_icon 1)
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_chat_validate() {
4
+ bluer_ai_eval - \
5
+ python3 -m bluer_agent.chat \
6
+ validate \
7
+ "$@"
8
+ }
@@ -0,0 +1,15 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_chat() {
4
+ local task=$1
5
+
6
+ local function_name=bluer_agent_chat_$task
7
+ if [[ $(type -t $function_name) == "function" ]]; then
8
+ $function_name "${@:2}"
9
+ return
10
+ fi
11
+
12
+ python3 -m bluer_agent.chat "$@"
13
+ }
14
+
15
+ bluer_ai_source_caller_suffix_path /chat
@@ -0,0 +1,28 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_crawl_collect() {
4
+ local options=$1
5
+ local do_dryrun=$(bluer_ai_option_int "$options" dryrun 0)
6
+ local do_download=$(bluer_ai_option_int "$options" download 0)
7
+ local do_upload=$(bluer_ai_option_int "$options" upload 0)
8
+ local root=$(bluer_ai_option "$options" root all)
9
+
10
+ local object_name=$(bluer_ai_clarify_object $2 .)
11
+
12
+ [[ "$do_download" == 1 ]] &&
13
+ bluer_objects_download - $object_name
14
+
15
+ bluer_ai_eval dryrun=$do_dryrun \
16
+ python3 -m bluer_agent.crawl \
17
+ collect \
18
+ --root $root \
19
+ --object_name $object_name \
20
+ --out auto \
21
+ "${@:3}"
22
+ local status="$?"
23
+
24
+ [[ "$do_upload" == 1 ]] &&
25
+ bluer_objects_upload - $object_name
26
+
27
+ return $status
28
+ }
@@ -0,0 +1,20 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_crawl_review() {
4
+ local options=$1
5
+ local do_dryrun=$(bluer_ai_option_int "$options" dryrun 0)
6
+ local do_download=$(bluer_ai_option_int "$options" download 1)
7
+ local root=$(bluer_ai_option "$options" root all)
8
+
9
+ local object_name=$(bluer_ai_clarify_object $2 .)
10
+
11
+ [[ "$do_download" == 1 ]] &&
12
+ bluer_objects_download - $object_name
13
+
14
+ bluer_ai_eval dryrun=$do_dryrun \
15
+ python3 -m bluer_agent.crawl \
16
+ review \
17
+ --object_name $object_name \
18
+ --root $root \
19
+ "${@:3}"
20
+ }
@@ -0,0 +1,15 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_crawl() {
4
+ local task=$1
5
+
6
+ local function_name=bluer_agent_crawl_$task
7
+ if [[ $(type -t $function_name) == "function" ]]; then
8
+ $function_name "${@:2}"
9
+ return
10
+ fi
11
+
12
+ python3 bluer_agent.crawl "$@"
13
+ }
14
+
15
+ bluer_ai_source_caller_suffix_path /crawl
@@ -0,0 +1,7 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_ai_install_bluer_agent() {
4
+ :
5
+ }
6
+
7
+ # bluer_ai_install_module bluer_agent 1.1.1
@@ -0,0 +1,28 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_rag_build_corpus() {
4
+ local options=$1
5
+ local do_dryrun=$(bluer_ai_option_int "$options" dryrun 0)
6
+ local do_download=$(bluer_ai_option_int "$options" download 0)
7
+ local do_upload=$(bluer_ai_option_int "$options" upload 0)
8
+
9
+ local crawl_object_name=$(bluer_ai_clarify_object $2 .)
10
+
11
+ local corpus_object_name=$(bluer_ai_clarify_object $3 corpus-$(bluer_ai_string_timestamp))
12
+
13
+ [[ "$do_download" == 1 ]] &&
14
+ bluer_objects_download - $crawl_object_name
15
+
16
+ bluer_ai_eval dryrun=$do_dryrun \
17
+ python3 -m bluer_agent.rag.corpus \
18
+ build_and_embed \
19
+ --crawl_object_name $crawl_object_name \
20
+ --corpus_object_name $corpus_object_name \
21
+ "${@:4}"
22
+ local status="$?"
23
+
24
+ [[ "$do_upload" == 1 ]] &&
25
+ bluer_objects_upload - $corpus_object_name
26
+
27
+ return $status
28
+ }
@@ -0,0 +1,24 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_rag_query() {
4
+ local options=$1
5
+ local do_dryrun=$(bluer_ai_option_int "$options" dryrun 0)
6
+ local do_download=$(bluer_ai_option_int "$options" download $(bluer_ai_not $do_dryrun))
7
+
8
+ local corpus_object_name=$(bluer_ai_clarify_object $2 .)
9
+
10
+ local query=${3:-void}
11
+ local encoded_query=$(printf '%s' "$query" | iconv -f UTF-8 -t UTF-8 | base64)
12
+
13
+ [[ "$do_download" == 1 ]] &&
14
+ bluer_objects_download \
15
+ policy=doesnt_exist \
16
+ $corpus_object_name
17
+
18
+ bluer_ai_eval dryrun=$do_dryrun \
19
+ python3 -m bluer_agent.rag \
20
+ query \
21
+ --object_name $corpus_object_name \
22
+ --encoded_query \"$encoded_query\" \
23
+ "${@:4}"
24
+ }
@@ -0,0 +1,15 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_agent_rag() {
4
+ local task=$1
5
+
6
+ local function_name=bluer_agent_rag_$task
7
+ if [[ $(type -t $function_name) == "function" ]]; then
8
+ $function_name "${@:2}"
9
+ return
10
+ fi
11
+
12
+ python3 bluer_agent.rag "$@"
13
+ }
14
+
15
+ bluer_ai_source_caller_suffix_path /rag
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_agent_README() {
4
+ local options=$1
5
+
6
+ bluer_ai_eval ,$options \
7
+ bluer_agent build_README
8
+ }
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_agent_audio_play() {
4
+ [[ "$abcli_is_github_workflow" == true ]] &&
5
+ return 0
6
+
7
+ bluer_agent_audio \
8
+ play \
9
+ download,filename=farsi.wav \
10
+ $BLUER_AGENT_TRANSCRIPTION_TEST_OBJECT
11
+ }
@@ -0,0 +1,19 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_agent_audio_record() {
4
+ [[ "$abcli_is_github_workflow" == true ]] &&
5
+ return 0
6
+
7
+ local object_name=test_bluer_agent_audio-$(bluer_ai_string_timestamp)
8
+ for crop_silence in 0 1; do
9
+ bluer_agent_audio \
10
+ record \
11
+ filename=listen.wav,play \
12
+ $object_name \
13
+ --crop_silence $crop_silence \
14
+ --length 10
15
+ [[ $? -ne 0 ]] && return 1
16
+
17
+ bluer_ai_hr
18
+ done
19
+ }
@@ -0,0 +1,7 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_agent_chat() {
4
+ local options=$1
5
+
6
+ bluer_agent_chat_validate
7
+ }
@@ -0,0 +1,25 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_agent_crawl() {
4
+ local options=$1
5
+
6
+ local object_name=test_bluer_agent_crawl-$(bluer_ai_string_timestamp)
7
+ local root=https://badkoobeh.com/
8
+
9
+ bluer_ai_eval ,$options \
10
+ bluer_agent_crawl \
11
+ collect \
12
+ root=$root \
13
+ $object_name \
14
+ --page-count 5 \
15
+ --max-depth 2
16
+ [[ $? -ne 0 ]] && return 1
17
+
18
+ bluer_ai_hr
19
+
20
+ bluer_ai_eval ,$options \
21
+ bluer_agent_crawl \
22
+ review \
23
+ root=$root \
24
+ $object_name
25
+ }
@@ -0,0 +1,34 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_agent_crawl_all() {
4
+ local options=$1
5
+
6
+ local object_name=test_bluer_agent_crawl-$(bluer_ai_string_timestamp)
7
+
8
+ local object_path=$ABCLI_OBJECT_ROOT/$object_name
9
+ mkdir -pv $object_path
10
+
11
+ cat >$object_path/metadata.yaml <<'EOF'
12
+ corpus:
13
+ - https://badkoobeh.com/
14
+ - https://irannovin.net/
15
+ - https://korosheh.com
16
+ EOF
17
+
18
+ bluer_ai_eval ,$options \
19
+ bluer_agent_crawl \
20
+ collect \
21
+ - \
22
+ $object_name \
23
+ --page-count 5 \
24
+ --max-depth 2
25
+ [[ $? -ne 0 ]] && return 1
26
+
27
+ bluer_ai_hr
28
+
29
+ bluer_ai_eval ,$options \
30
+ bluer_agent_crawl \
31
+ review \
32
+ - \
33
+ $object_name
34
+ }