biblemate 0.0.16__py3-none-any.whl → 0.0.17__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.
biblemate/README.md CHANGED
@@ -15,7 +15,7 @@ To see the full list of built-in tools and their descriptions, please see the [T
15
15
 
16
16
  ## Demo
17
17
 
18
- See BibleMate AI in action in our YouTube video: [BibleMate AI Demo](https://www.youtube.com/watch?v=2BPZVufnKJU&feature=youtu.be)
18
+ See BibleMate AI in action in our YouTube video: [BibleMate AI Demo](https://youtu.be/QvPIyHOhrP0)
19
19
 
20
20
  ## Our Other AI Projects
21
21
 
biblemate/main.py CHANGED
@@ -3,10 +3,10 @@ from biblemate.ui.prompts import getInput
3
3
  from biblemate.ui.info import get_banner
4
4
  from biblemate import config, AGENTMAKE_CONFIG
5
5
  from pathlib import Path
6
- import asyncio, re, os
6
+ import asyncio, re, os, subprocess
7
7
  from alive_progress import alive_bar
8
8
  from fastmcp import Client
9
- from agentmake import agentmake, getDictionaryOutput, edit_configurations, writeTextFile, getCurrentDateTime, AGENTMAKE_USER_DIR, USER_OS, DEVELOPER_MODE
9
+ from agentmake import agentmake, getOpenCommand, getDictionaryOutput, edit_configurations, writeTextFile, getCurrentDateTime, AGENTMAKE_USER_DIR, USER_OS, DEVELOPER_MODE
10
10
  from rich.console import Console
11
11
  from rich.markdown import Markdown
12
12
  from rich.progress import Progress, SpinnerColumn, TextColumn
@@ -101,14 +101,14 @@ Get a static text-based response directly from a text-based AI model without usi
101
101
  while not user_request == ".quit":
102
102
 
103
103
  # spinner while thinking
104
- async def thinking(process):
104
+ async def thinking(process, description=None):
105
105
  with Progress(
106
106
  SpinnerColumn(),
107
107
  TextColumn("[progress.description]{task.description}"),
108
108
  transient=True # This makes the progress bar disappear after the task is done
109
109
  ) as progress:
110
110
  # Add an indefinite task (total=None)
111
- task_id = progress.add_task("Thinking ...", total=None)
111
+ task_id = progress.add_task(description if description else "Thinking ...", total=None)
112
112
  # Create and run the async task concurrently
113
113
  async_task = asyncio.create_task(process())
114
114
  # Loop until the async task is done
@@ -172,15 +172,30 @@ Get a static text-based response directly from a text-based AI model without usi
172
172
  ".backend": "change backend",
173
173
  ".chat": "enable chat mode",
174
174
  ".agent": "enable agent mode",
175
+ ".tools": "list available tools",
176
+ ".open": "open a file or directory",
175
177
  }
176
178
  input_suggestions = list(action_list.keys())+prompt_list
177
179
  user_request = await getInput("> ", input_suggestions)
178
180
  while not user_request.strip():
179
181
  user_request = await getInput("> ", input_suggestions)
180
182
 
183
+ # system command
184
+ if user_request == ".open":
185
+ user_request = f".open {os.getcwd()}"
186
+ if user_request.startswith(".open "):
187
+ cmd = f'''{getOpenCommand()} "{user_request[6:]}"'''
188
+ subprocess.Popen(cmd, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
189
+ continue
190
+
181
191
  # TODO: ui - radio list menu
182
192
  if user_request in action_list:
183
- if user_request == ".backend":
193
+ if user_request == ".tools":
194
+ console.rule()
195
+ tools_descriptions = [f"- `{name}`: {description}" for name, description in tools.items()]
196
+ console.print(Markdown("## Available Tools\n\n"+"\n".join(tools_descriptions)))
197
+ console.rule()
198
+ elif user_request == ".backend":
184
199
  edit_configurations()
185
200
  console.rule()
186
201
  console.print("Restart to make the changes in the backend effective!", justify="center")
@@ -208,7 +223,10 @@ Get a static text-based response directly from a text-based AI model without usi
208
223
  continue
209
224
 
210
225
  # auto prompt engineering
211
- user_request = agentmake(user_request, tool="improve_prompt", **AGENTMAKE_CONFIG)[-1].get("content", "").strip()[20:-4]
226
+ async def run_prompt_engineering():
227
+ nonlocal user_request
228
+ user_request = agentmake(user_request, tool="improve_prompt", **AGENTMAKE_CONFIG)[-1].get("content", "").strip()[20:-4]
229
+ await thinking(run_prompt_engineering, "Prompt Engineering ...")
212
230
 
213
231
  # Chat mode
214
232
  if not config.agent_mode:
@@ -296,7 +314,7 @@ Available tools are: {available_tools}.
296
314
  # Extract suggested tools from the step suggestion
297
315
  suggested_tools = agentmake(next_suggestion, system=system_tool_selection, **AGENTMAKE_CONFIG)[-1].get("content", "").strip() # Note: suggested tools are printed on terminal by default, could be hidden by setting `print_on_terminal` to false
298
316
  suggested_tools = re.sub(r"^.*?(\[.*?\]).*?$", r"\1", suggested_tools, flags=re.DOTALL)
299
- suggested_tools = eval(suggested_tools) if suggested_tools.startswith("[") and suggested_tools.endswith("]") else ["get_direct_text_response"] # fallback to direct response
317
+ suggested_tools = eval(suggested_tools.replace("`", "'")) if suggested_tools.startswith("[") and suggested_tools.endswith("]") else ["get_direct_text_response"] # fallback to direct response
300
318
  await thinking(get_tool_suggestion)
301
319
  if DEVELOPER_MODE:
302
320
  console.print(Markdown(str(suggested_tools)))
@@ -1,4 +1,4 @@
1
- agentmake>=1.0.65
1
+ agentmake>=1.0.66
2
2
  agentmakemcp>=0.0.8
3
3
  fastmcp[cli]
4
4
  rich
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biblemate
3
- Version: 0.0.16
3
+ Version: 0.0.17
4
4
  Summary: BibleMate AI - Automate Your Bible Study
5
5
  Home-page: https://toolmate.ai
6
6
  Author: Eliran Wong
@@ -23,7 +23,7 @@ Classifier: Programming Language :: Python :: 3.10
23
23
  Classifier: Programming Language :: Python :: 3.11
24
24
  Classifier: Programming Language :: Python :: 3.12
25
25
  Requires-Python: >=3.8, <3.13
26
- Requires-Dist: agentmake >=1.0.65
26
+ Requires-Dist: agentmake >=1.0.66
27
27
  Requires-Dist: agentmakemcp >=0.0.8
28
28
  Requires-Dist: alive-progress
29
29
  Requires-Dist: fastmcp[cli]
@@ -48,7 +48,7 @@ To see the full list of built-in tools and their descriptions, please see the [T
48
48
 
49
49
  ## Demo
50
50
 
51
- See BibleMate AI in action in our YouTube video: [BibleMate AI Demo](https://www.youtube.com/watch?v=2BPZVufnKJU&feature=youtu.be)
51
+ See BibleMate AI in action in our YouTube video: [BibleMate AI Demo](https://youtu.be/QvPIyHOhrP0)
52
52
 
53
53
  ## Our Other AI Projects
54
54
 
@@ -1,15 +1,15 @@
1
- biblemate/README.md,sha256=Q2CfAjq0D4vMe6iFSrv-818eKEmMgnmqO38fX3Y7xl0,4136
1
+ biblemate/README.md,sha256=JKyibK8Hdu5yAZrUkIH164W7_0SOKLmChHAYzDQQtFU,4104
2
2
  biblemate/__init__.py,sha256=aFO4_EperOrwwDBdrkTKfDMt2Fh18Y0A2G_nUC_cmmM,78
3
3
  biblemate/bible_study_mcp.py,sha256=LwdxlyaXRZ2dkieW6gzH-3emKMAej9V72N3b6HgJXlQ,15865
4
4
  biblemate/config.py,sha256=ktpLv_5qdbf3FErxUIdCvVc9MO6kQH4Zt_omoJ7msIs,15
5
- biblemate/main.py,sha256=mrXs1y9iK2GN8qJmNA_OYpMCpR4vnuFp8ejCTUPP_Xc,18502
5
+ biblemate/main.py,sha256=Y8vBYRWhAQS5kznDaVFBPnCwLdrAG6DhHtPGfG_5TeA,19568
6
6
  biblemate/package_name.txt,sha256=WkkuEEkgw7EKpXV8GshpzhZlwRor1wpotTS7vP24b_g,9
7
- biblemate/requirements.txt,sha256=_R2QI82CzbgXzl3QGlowj7R_L6LE47w2XUnM2NN_dFE,70
7
+ biblemate/requirements.txt,sha256=H-GPMzAgF8huredQOKpmdVbCdY8g9egwjJ7AxxBn7k0,70
8
8
  biblemate/core/systems.py,sha256=nG_NgcLSRhdaHuxuCPN5ZfJUhP88kdfwhRCvRk4RLjI,1874
9
9
  biblemate/ui/info.py,sha256=QRCno0CYUHVoOtVkZIxVamZONmtI7KRmOT2YoUagY5s,811
10
10
  biblemate/ui/prompts.py,sha256=mxdC5BU7NMok9MOm1E39MHSrxB9gSRqGY7HsOc--rRg,3484
11
- biblemate-0.0.16.dist-info/METADATA,sha256=L-ei9e3YP2YEynKVzOXoTCJsdRbV8NR-rvFpjHrkexc,5631
12
- biblemate-0.0.16.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
13
- biblemate-0.0.16.dist-info/entry_points.txt,sha256=tbEfTFr6LhPR1E_zP3CsPwJsmG-G4MCnJ3FcQEMiqo0,50
14
- biblemate-0.0.16.dist-info/top_level.txt,sha256=pq9uX0tAS0bizZcZ5GW5zIoDLQBa-b5QDlDGsdHNgiU,10
15
- biblemate-0.0.16.dist-info/RECORD,,
11
+ biblemate-0.0.17.dist-info/METADATA,sha256=6A4WCDDJbBsfuZct-frVG0jAl_Q26uVT60sqvClS2Tw,5599
12
+ biblemate-0.0.17.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
13
+ biblemate-0.0.17.dist-info/entry_points.txt,sha256=tbEfTFr6LhPR1E_zP3CsPwJsmG-G4MCnJ3FcQEMiqo0,50
14
+ biblemate-0.0.17.dist-info/top_level.txt,sha256=pq9uX0tAS0bizZcZ5GW5zIoDLQBa-b5QDlDGsdHNgiU,10
15
+ biblemate-0.0.17.dist-info/RECORD,,