shinychat 0.0.1a2__py3-none-any.whl → 0.1.0__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.
shinychat/__init__.py CHANGED
@@ -1,3 +1,4 @@
1
- from ._chat import Chat, ChatExpress, chat_ui
1
+ from ._chat import Chat, chat_ui
2
+ from ._markdown_stream import MarkdownStream, output_markdown_stream
2
3
 
3
- __all__ = ["Chat", "ChatExpress", "chat_ui"]
4
+ __all__ = ["Chat", "chat_ui", "MarkdownStream", "output_markdown_stream"]
shinychat/__version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.0.1a2'
21
- __version_tuple__ = version_tuple = (0, 0, 1, 'a2')
20
+ __version__ = version = '0.1.0'
21
+ __version_tuple__ = version_tuple = (0, 1, 0)
shinychat/_chat.py CHANGED
@@ -1603,7 +1603,7 @@ class ChatExpress(Chat):
1603
1603
  def ui(
1604
1604
  self,
1605
1605
  *,
1606
- messages: Optional[Sequence[str | ChatMessageDict]] = None,
1606
+ messages: Optional[Sequence[TagChild | ChatMessageDict]] = None,
1607
1607
  placeholder: str = "Enter a message...",
1608
1608
  width: CssUnit = "min(680px, 100%)",
1609
1609
  height: CssUnit = "auto",
@@ -1,3 +1,4 @@
1
1
  from .._chat import ChatExpress as Chat
2
+ from .._markdown_stream import ExpressMarkdownStream as MarkdownStream
2
3
 
3
- __all__ = ["Chat"]
4
+ __all__ = ["Chat", "MarkdownStream"]
@@ -1,3 +1,28 @@
1
+ try:
2
+ import playwright # noqa: F401 # pyright: ignore[reportUnusedImport, reportMissingTypeStubs]
3
+ except ImportError:
4
+ raise ImportError(
5
+ "The shinychat.playwright module requires the playwright package to be installed. "
6
+ "Please install it with: `pip install playwright`"
7
+ )
8
+
9
+ # If `pytest` is installed...
10
+ try:
11
+ import pytest # noqa: F401 # pyright: ignore[reportUnusedImport, reportMissingTypeStubs]
12
+
13
+ # At this point, `playwright` and `pytest` are installed.
14
+ # Try to make sure `pytest-playwright` is installed
15
+ try:
16
+ import pytest_playwright # noqa: F401 # pyright: ignore[reportUnusedImport, reportMissingTypeStubs]
17
+
18
+ except ImportError:
19
+ raise ImportError(
20
+ "If you are using pytest to test your shiny app, install the pytest-playwright "
21
+ "shim package with: `pip install pytest-playwright`"
22
+ )
23
+ except ImportError:
24
+ pass
25
+
1
26
  from ._chat import Chat as ChatController
2
27
 
3
28
  __all__ = ["ChatController"]
shinychat/py.typed ADDED
File without changes
@@ -0,0 +1,5 @@
1
+ from .._chat import ChatMessageDict
2
+
3
+ __all__ = [
4
+ "ChatMessageDict",
5
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shinychat
3
- Version: 0.0.1a2
3
+ Version: 0.1.0
4
4
  Summary: An AI Chat interface for Shiny apps.
5
5
  Project-URL: Homepage, https://posit-dev.github.io/shinychat/
6
6
  Project-URL: Documentation, https://posit-dev.github.io/shinychat/py/
@@ -12,7 +12,6 @@ License: MIT
12
12
  License-File: LICENSE
13
13
  Requires-Python: >=3.9
14
14
  Requires-Dist: htmltools>=0.6.0
15
- Requires-Dist: playwright>=1.43.0
16
15
  Requires-Dist: shiny>=1.4.0
17
16
  Provides-Extra: providers
18
17
  Requires-Dist: anthropic; extra == 'providers'
@@ -27,6 +26,7 @@ Requires-Dist: coverage>=7.8.2; extra == 'test'
27
26
  Requires-Dist: faicons; extra == 'test'
28
27
  Requires-Dist: ipyleaflet; extra == 'test'
29
28
  Requires-Dist: pandas; extra == 'test'
29
+ Requires-Dist: playwright>=1.43.0; extra == 'test'
30
30
  Requires-Dist: plotly; extra == 'test'
31
31
  Requires-Dist: pyright>=1.1.398; extra == 'test'
32
32
  Requires-Dist: pytest-playwright>=0.3.0; extra == 'test'
@@ -1,6 +1,6 @@
1
- shinychat/__init__.py,sha256=3z_WjWhaDYJ7iXrPMMyIqQn93luJazYxxxRbVoB3wAA,92
2
- shinychat/__version.py,sha256=Hktn70skg-bDmdAMlp-5sy_59URRTaZPr8ojpskm8w8,519
3
- shinychat/_chat.py,sha256=Cc0uinRRsLlVHfzKXf6Ww3AHVlGwn3VZjvEqBwQE4tU,68337
1
+ shinychat/__init__.py,sha256=R2yN7s5qYELjDyVvaqz0XQsGdWQwKVXjkNbx5JIGTrQ,177
2
+ shinychat/__version.py,sha256=-LyU5F1uZDjn6Q8_Z6-_FJt_8RE4Kq9zcKdg1abSSps,511
3
+ shinychat/_chat.py,sha256=awZMzWfENQOhY2RUA6kArZ9KamhT-HMhbbDD08vFt3Y,68342
4
4
  shinychat/_chat_bookmark.py,sha256=E8okr1dkN4VNDtORyPVZnCXihmfV9jFGD6UQq4Z2p5s,3027
5
5
  shinychat/_chat_normalize.py,sha256=ClnKYsjaWZzu1UO4easB8mh3qQmC546fXJoFnMg_UCY,12705
6
6
  shinychat/_chat_provider_types.py,sha256=3ucKeqMCltxgaNcMAVVeHjIDbw_nQNSxXnDBSiQZMN0,4179
@@ -10,9 +10,11 @@ shinychat/_html_deps_py_shiny.py,sha256=GeI_6dox592BalSmKdGTdQ3Nz9FgaqSOf1eJ-jxu
10
10
  shinychat/_markdown_stream.py,sha256=gHsGE2n6wgsZ3eqXLAFsrsm7KMotQNJZ_qKezMVM4bs,12424
11
11
  shinychat/_typing_extensions.py,sha256=-PeNqGFdlfWF3Bg6oYCfeFzrh6gJ4WbwKxkrBFEPP4o,1685
12
12
  shinychat/_utils.py,sha256=JAcL1l9rxQJbgji9iZtYg5vtpGJT-drBLbD3NRWLfow,5178
13
- shinychat/express/__init__.py,sha256=WGf2hNLaS_3R12AQwYJ_wQdp_ULP1BT-P1FVHEH1Tzo,60
14
- shinychat/playwright/__init__.py,sha256=ZIg6WuO7mraKXuFUCRZ-RFrsKaEANBYW4Mx9BU1eEPg,72
13
+ shinychat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ shinychat/express/__init__.py,sha256=RfUr6wY_wc3Eb0R6K6HNEWw7ST0GxnHV1sCxB9fj8rk,149
15
+ shinychat/playwright/__init__.py,sha256=YBjQwewIRq6MNfYTyzeu-CowsEcXViZAP0GZD4KBudI,992
15
16
  shinychat/playwright/_chat.py,sha256=13DVhYHlc_A008tvUs_UxWSvBmg5RS6EkI9ahYfFDlk,4313
17
+ shinychat/types/__init__.py,sha256=-d0V_jRrKpbxwR59hbUzMAhmkNmYxLOETX3sTac_YEg,74
16
18
  shinychat/www/GIT_VERSION,sha256=Tm3WysJgvFOKGJ92Ar_CVEB9SLv2l2C8WmOnz6GouE4,41
17
19
  shinychat/www/chat/chat.css,sha256=fFUXPqmfNw2Yc2CpzN-WxXzfUgzzBS6_yh64zNbNqBc,3422
18
20
  shinychat/www/chat/chat.css.map,sha256=jK_LuenwSSjzag6GvDg_K24WAdPhMwSuTUk3O8Qvp9c,6649
@@ -22,7 +24,7 @@ shinychat/www/markdown-stream/markdown-stream.css,sha256=m-yRlzTkX36piqx1T8Nvx18
22
24
  shinychat/www/markdown-stream/markdown-stream.css.map,sha256=afnnfIkD6AuwmHWnzYKDR2qpn8GBzBdqsQ8QY2wH5Xc,9191
23
25
  shinychat/www/markdown-stream/markdown-stream.js,sha256=s0blvLWl0fIbMitqKjIGDpPhNbl62TvPLcmCXkJqb0c,261127
24
26
  shinychat/www/markdown-stream/markdown-stream.js.map,sha256=pnOZ7K9-i0AnQOniv4oxgD9csYzRaErCcPBl-1Y4TkY,1083962
25
- shinychat-0.0.1a2.dist-info/METADATA,sha256=fDsBzxJaTniALGUtzd0h7HA9FkqqwumeHhQ6bekmjbU,2980
26
- shinychat-0.0.1a2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
27
- shinychat-0.0.1a2.dist-info/licenses/LICENSE,sha256=oB2X1GZjjWFbXGMjbtPLWg29aj7BzjbecsnG7yEaY8U,1078
28
- shinychat-0.0.1a2.dist-info/RECORD,,
27
+ shinychat-0.1.0.dist-info/METADATA,sha256=6gj0X4CNHUq0tQmH9m3p_e7Qr619QvDGHugmlrmu-dg,2995
28
+ shinychat-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
+ shinychat-0.1.0.dist-info/licenses/LICENSE,sha256=oB2X1GZjjWFbXGMjbtPLWg29aj7BzjbecsnG7yEaY8U,1078
30
+ shinychat-0.1.0.dist-info/RECORD,,