dialoghelper 0.0.16__tar.gz → 0.0.17__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.

Potentially problematic release.


This version of dialoghelper might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dialoghelper
3
- Version: 0.0.16
3
+ Version: 0.0.17
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,2 @@
1
+ __version__ = "0.0.17"
2
+ from .core import *
@@ -104,8 +104,7 @@ def add_html(
104
104
  content:str, # The HTML to send to the client (generally should include hx-swap-oob)
105
105
  ):
106
106
  "Send HTML to the browser to be swapped into the DOM"
107
- res = to_xml(content)
108
- xpost('http://localhost:5001/add_html_', data=dict(content=res))
107
+ xpost('http://localhost:5001/add_html_', data=dict(content=to_xml(content)))
109
108
 
110
109
  # %% ../nbs/00_core.ipynb
111
110
  def del_msg(
@@ -149,7 +148,8 @@ def add_msg(
149
148
  try: json.loads(ot or '[]')
150
149
  except: return "Code output must be valid json"
151
150
  if not sid: sid = find_msg_id()
152
- data = dict(content=content, placement=placement, sid=sid, **kwargs)
151
+ data = dict(placement=placement, sid=sid, **kwargs)
152
+ if content is not None: data['content'] = content
153
153
  return xpost('http://localhost:5001/add_relative_', data=data).text
154
154
 
155
155
  # %% ../nbs/00_core.ipynb
@@ -180,7 +180,7 @@ def _umsg(
180
180
  @delegates(_umsg)
181
181
  def update_msg(
182
182
  sid:str=None, # sid (stable id -- pk) of message to update (if None, uses current message)
183
- content:str|None = None, # Content of the message (i.e the message prompt, code, or note text)
183
+ content:str|None=None, # Content of the message (i.e the message prompt, code, or note text)
184
184
  msg:Optional[Dict]=None, # Dictionary of field keys/values to update
185
185
  **kwargs):
186
186
  """Update an existing message. Provide either `msg` OR field key/values to update.
@@ -77,6 +77,7 @@ class Message:
77
77
  o_collapsed: int | None = '0'
78
78
  header_collapsed: int | None = '0'
79
79
  pinned: int | None = '0'
80
+ use_thinking: int | None = 0
80
81
 
81
82
  @dataclass
82
83
  class Secret:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dialoghelper
3
- Version: 0.0.16
3
+ Version: 0.0.17
4
4
  Summary: Helper functions for solveit dialogs
5
5
  Home-page: https://github.com/AnswerDotAI/dialoghelper
6
6
  Author: Jeremy Howard
@@ -1,7 +1,7 @@
1
1
  [DEFAULT]
2
2
  repo = dialoghelper
3
3
  lib_name = dialoghelper
4
- version = 0.0.16
4
+ version = 0.0.17
5
5
  min_python = 3.9
6
6
  license = apache2
7
7
  black_formatting = False
@@ -1,2 +0,0 @@
1
- __version__ = "0.0.16"
2
- from .core import *
File without changes
File without changes
File without changes
File without changes
File without changes