dialoghelper 0.0.20__py3-none-any.whl → 0.0.21__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 CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.0.20"
1
+ __version__ = "0.0.21"
2
2
  from .core import *
dialoghelper/core.py CHANGED
@@ -69,9 +69,9 @@ def find_msg_id():
69
69
 
70
70
  # %% ../nbs/00_core.ipynb
71
71
  def msg_idx(
72
- msgid=None # Message id to find (defaults to current message)
72
+ msgid=None, # Message id to find (defaults to current message)
73
73
  ):
74
- "Get relative index of message in dialog."
74
+ "Get absolute index of message in dialog."
75
75
  if not msgid: msgid = find_msg_id()
76
76
  return call_endp('msg_idx_', json=True, msgid=msgid)['msgid']
77
77
 
@@ -141,6 +141,7 @@ def _add_msg_unsafe(
141
141
 
142
142
  # %% ../nbs/00_core.ipynb
143
143
  def _umsg(
144
+ content:str|None=None, # Content of the message (i.e the message prompt, code, or note text)
144
145
  msg_type: str|None = None, # Message type, can be 'code', 'note', or 'prompt'
145
146
  output:str|None = None, # For prompts/code, the output
146
147
  time_run: str | None = None, # When was message executed
@@ -156,14 +157,13 @@ def _umsg(
156
157
  @delegates(_umsg)
157
158
  def update_msg(
158
159
  msgid:str=None, # id of message to update (if None, uses current message)
159
- content:str|None=None, # Content of the message (i.e the message prompt, code, or note text)
160
160
  msg:Optional[Dict]=None, # Dictionary of field keys/values to update
161
161
  **kwargs):
162
162
  """Update an existing message. Provide either `msg` OR field key/values to update.
163
163
  Use `content` param to update contents.
164
164
  Only include parameters to update--missing ones will be left unchanged."""
165
165
  if not msgid and not msg: raise TypeError("update_msg needs either a dict message or `msgid=`")
166
- return call_endp('add_relative_', content=content, placement='update', msgid=msgid, **kwargs)
166
+ return call_endp('add_relative_', placement='update', msgid=msgid, **kwargs)
167
167
 
168
168
  # %% ../nbs/00_core.ipynb
169
169
  def load_gist(gist_id:str):
@@ -236,6 +236,7 @@ def tool_info():
236
236
  cts='''Tools available from `dialoghelper`:
237
237
 
238
238
  - &`curr_dialog`: Get the current dialog info.
239
+ - &`msg_idx`: Get absolute index of message in dialog.
239
240
  - &`add_html`: Send HTML to the browser to be swapped into the DOM using hx-swap-oob.
240
241
  - &`find_msg_id`: Get the current message id.
241
242
  - &`find_msgs`: Find messages in current specific dialog that contain the given information.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dialoghelper
3
- Version: 0.0.20
3
+ Version: 0.0.21
4
4
  Summary: Helper functions for solveit dialogs
5
5
  Home-page: https://github.com/AnswerDotAI/dialoghelper
6
6
  Author: Jeremy Howard
@@ -0,0 +1,10 @@
1
+ dialoghelper/__init__.py,sha256=731zsPSn_ikal3tSw5-jTdqXWpxeTh4lO9otJwO7wOE,43
2
+ dialoghelper/_modidx.py,sha256=wWjLy97PBuZVMAydnBUSJlkZuN9x2bkYyY0SHwZQkrk,2654
3
+ dialoghelper/core.py,sha256=3zWfyFZPDkzHVIh2sjI4PESpezXhOKMnWNqOJ1zXXBA,10859
4
+ dialoghelper/db_dc.py,sha256=mi2Q2am_SoAPGpNQg7KPFS5pR9WEapRXT8ypkNmMfw0,2330
5
+ dialoghelper-0.0.21.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
6
+ dialoghelper-0.0.21.dist-info/METADATA,sha256=RcShJ1NQgVYRjy8ZVC45cKsyiidtcWPBn8Ymp1KilMA,2565
7
+ dialoghelper-0.0.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ dialoghelper-0.0.21.dist-info/entry_points.txt,sha256=wvDeX-XTS_XVjWiiPQe6yVfmyNwy9eCr36ewp9baFIg,46
9
+ dialoghelper-0.0.21.dist-info/top_level.txt,sha256=VXLlkgltFs_q-XB9imt2G64I_-MPm1RnxlpvUWPuLKM,13
10
+ dialoghelper-0.0.21.dist-info/RECORD,,
@@ -1,10 +0,0 @@
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,,