dialoghelper 0.0.19__py3-none-any.whl → 0.0.20__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.
Potentially problematic release.
This version of dialoghelper might be problematic. Click here for more details.
- dialoghelper/__init__.py +1 -1
- dialoghelper/_modidx.py +1 -0
- dialoghelper/core.py +11 -3
- {dialoghelper-0.0.19.dist-info → dialoghelper-0.0.20.dist-info}/METADATA +1 -1
- dialoghelper-0.0.20.dist-info/RECORD +10 -0
- dialoghelper-0.0.19.dist-info/RECORD +0 -10
- {dialoghelper-0.0.19.dist-info → dialoghelper-0.0.20.dist-info}/WHEEL +0 -0
- {dialoghelper-0.0.19.dist-info → dialoghelper-0.0.20.dist-info}/entry_points.txt +0 -0
- {dialoghelper-0.0.19.dist-info → dialoghelper-0.0.20.dist-info}/licenses/LICENSE +0 -0
- {dialoghelper-0.0.19.dist-info → dialoghelper-0.0.20.dist-info}/top_level.txt +0 -0
dialoghelper/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.20"
|
|
2
2
|
from .core import *
|
dialoghelper/_modidx.py
CHANGED
|
@@ -10,6 +10,7 @@ d = { 'settings': { 'branch': 'main',
|
|
|
10
10
|
'dialoghelper.core.add_html': ('core.html#add_html', 'dialoghelper/core.py'),
|
|
11
11
|
'dialoghelper.core.add_msg': ('core.html#add_msg', 'dialoghelper/core.py'),
|
|
12
12
|
'dialoghelper.core.call_endp': ('core.html#call_endp', 'dialoghelper/core.py'),
|
|
13
|
+
'dialoghelper.core.curr_dialog': ('core.html#curr_dialog', 'dialoghelper/core.py'),
|
|
13
14
|
'dialoghelper.core.del_msg': ('core.html#del_msg', 'dialoghelper/core.py'),
|
|
14
15
|
'dialoghelper.core.find_msg_id': ('core.html#find_msg_id', 'dialoghelper/core.py'),
|
|
15
16
|
'dialoghelper.core.find_msgs': ('core.html#find_msgs', 'dialoghelper/core.py'),
|
dialoghelper/core.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_core.ipynb.
|
|
2
2
|
|
|
3
3
|
# %% auto 0
|
|
4
|
-
__all__ = ['Placements', 'empty', 'find_var', 'call_endp', 'find_msgs', 'find_msg_id', 'msg_idx', 'read_msg',
|
|
5
|
-
'del_msg', 'add_msg', 'update_msg', 'load_gist', 'gist_file', 'import_string', 'is_usable_tool',
|
|
4
|
+
__all__ = ['Placements', 'empty', 'find_var', 'call_endp', 'curr_dialog', 'find_msgs', 'find_msg_id', 'msg_idx', 'read_msg',
|
|
5
|
+
'add_html', 'del_msg', 'add_msg', 'update_msg', 'load_gist', 'gist_file', 'import_string', 'is_usable_tool',
|
|
6
6
|
'mk_toollist', 'import_gist', 'tool_info', 'asdict']
|
|
7
7
|
|
|
8
8
|
# %% ../nbs/00_core.ipynb
|
|
@@ -42,13 +42,20 @@ def call_endp(path, json=False, raiseex=False, **data):
|
|
|
42
42
|
if raiseex: res.raise_for_status()
|
|
43
43
|
return res.json() if json else res.text
|
|
44
44
|
|
|
45
|
+
# %% ../nbs/00_core.ipynb
|
|
46
|
+
def curr_dialog(
|
|
47
|
+
with_messages:bool=False # Include messages as well?
|
|
48
|
+
):
|
|
49
|
+
"Get the current dialog info."
|
|
50
|
+
return call_endp('curr_dialog_', json=True, with_messages=with_messages)
|
|
51
|
+
|
|
45
52
|
# %% ../nbs/00_core.ipynb
|
|
46
53
|
def find_msgs(
|
|
47
54
|
re_pattern:str='', # Optional regex to search for (re.DOTALL+re.MULTILINE is used)
|
|
48
55
|
msg_type:str=None, # optional limit by message type ('code', 'note', or 'prompt')
|
|
49
56
|
limit:int=None, # Optionally limit number of returned items
|
|
50
57
|
include_output:bool=True # Include output in returned dict?
|
|
51
|
-
)
|
|
58
|
+
):
|
|
52
59
|
"Find `list[dict]` of messages in current specific dialog that contain the given information. To refer to a message found later, use its `id` field."
|
|
53
60
|
res = call_endp('find_msgs_', json=True, re_pattern=re_pattern, msg_type=msg_type, limit=limit)['msgs']
|
|
54
61
|
if not include_output:
|
|
@@ -228,6 +235,7 @@ def import_gist(
|
|
|
228
235
|
def tool_info():
|
|
229
236
|
cts='''Tools available from `dialoghelper`:
|
|
230
237
|
|
|
238
|
+
- &`curr_dialog`: Get the current dialog info.
|
|
231
239
|
- &`add_html`: Send HTML to the browser to be swapped into the DOM using hx-swap-oob.
|
|
232
240
|
- &`find_msg_id`: Get the current message id.
|
|
233
241
|
- &`find_msgs`: Find messages in current specific dialog that contain the given information.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
dialoghelper/__init__.py,sha256=mkmmPV_a7e3EgojncsapZLZfAn0jyTfnZIQiO1GWA0M,43
|
|
2
|
+
dialoghelper/_modidx.py,sha256=wWjLy97PBuZVMAydnBUSJlkZuN9x2bkYyY0SHwZQkrk,2654
|
|
3
|
+
dialoghelper/core.py,sha256=AlhLbCO4flkphUItM6bHT7jcdsgVZ0a7Yx3zmwhnkBA,10819
|
|
4
|
+
dialoghelper/db_dc.py,sha256=mi2Q2am_SoAPGpNQg7KPFS5pR9WEapRXT8ypkNmMfw0,2330
|
|
5
|
+
dialoghelper-0.0.20.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
6
|
+
dialoghelper-0.0.20.dist-info/METADATA,sha256=LRTH4iHmFc3OvCFpl1SpxvEgq9dRS2ZcQ_C_Ny18LsQ,2565
|
|
7
|
+
dialoghelper-0.0.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
dialoghelper-0.0.20.dist-info/entry_points.txt,sha256=wvDeX-XTS_XVjWiiPQe6yVfmyNwy9eCr36ewp9baFIg,46
|
|
9
|
+
dialoghelper-0.0.20.dist-info/top_level.txt,sha256=VXLlkgltFs_q-XB9imt2G64I_-MPm1RnxlpvUWPuLKM,13
|
|
10
|
+
dialoghelper-0.0.20.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
dialoghelper/__init__.py,sha256=mzZnqA6mbnOz6zhKbalyue_2PRAFgiqVOeO3zW7n9Ys,43
|
|
2
|
-
dialoghelper/_modidx.py,sha256=72qT7cHwYbkCIIGIxbikkMQjS0W0zuFeFvkh-Qp4iFE,2535
|
|
3
|
-
dialoghelper/core.py,sha256=4UFZgOKZ9w5NvITz5y5H7efWA-4XrCNoIFh-U4Szl-Y,10552
|
|
4
|
-
dialoghelper/db_dc.py,sha256=mi2Q2am_SoAPGpNQg7KPFS5pR9WEapRXT8ypkNmMfw0,2330
|
|
5
|
-
dialoghelper-0.0.19.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
6
|
-
dialoghelper-0.0.19.dist-info/METADATA,sha256=0ZoKROKIc1r5xqchnGp1TvPP-1J06t9i3oG9CfYblaM,2565
|
|
7
|
-
dialoghelper-0.0.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
dialoghelper-0.0.19.dist-info/entry_points.txt,sha256=wvDeX-XTS_XVjWiiPQe6yVfmyNwy9eCr36ewp9baFIg,46
|
|
9
|
-
dialoghelper-0.0.19.dist-info/top_level.txt,sha256=VXLlkgltFs_q-XB9imt2G64I_-MPm1RnxlpvUWPuLKM,13
|
|
10
|
-
dialoghelper-0.0.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|