shinychat 0.0.1a2__tar.gz → 0.1.0__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.
Files changed (34) hide show
  1. {shinychat-0.0.1a2 → shinychat-0.1.0}/PKG-INFO +2 -2
  2. shinychat-0.1.0/pkg-py/src/shinychat/__init__.py +4 -0
  3. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/__version.py +2 -2
  4. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_chat.py +1 -1
  5. shinychat-0.1.0/pkg-py/src/shinychat/express/__init__.py +4 -0
  6. shinychat-0.1.0/pkg-py/src/shinychat/playwright/__init__.py +28 -0
  7. shinychat-0.1.0/pkg-py/src/shinychat/py.typed +0 -0
  8. shinychat-0.1.0/pkg-py/src/shinychat/types/__init__.py +5 -0
  9. {shinychat-0.0.1a2 → shinychat-0.1.0}/pyproject.toml +5 -3
  10. shinychat-0.0.1a2/pkg-py/src/shinychat/__init__.py +0 -3
  11. shinychat-0.0.1a2/pkg-py/src/shinychat/express/__init__.py +0 -3
  12. shinychat-0.0.1a2/pkg-py/src/shinychat/playwright/__init__.py +0 -3
  13. {shinychat-0.0.1a2 → shinychat-0.1.0}/.gitignore +0 -0
  14. {shinychat-0.0.1a2 → shinychat-0.1.0}/LICENSE +0 -0
  15. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/README.md +0 -0
  16. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_chat_bookmark.py +0 -0
  17. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_chat_normalize.py +0 -0
  18. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_chat_provider_types.py +0 -0
  19. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_chat_tokenizer.py +0 -0
  20. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_chat_types.py +0 -0
  21. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_html_deps_py_shiny.py +0 -0
  22. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_markdown_stream.py +0 -0
  23. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_typing_extensions.py +0 -0
  24. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/_utils.py +0 -0
  25. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/playwright/_chat.py +0 -0
  26. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/GIT_VERSION +0 -0
  27. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/chat/chat.css +0 -0
  28. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/chat/chat.css.map +0 -0
  29. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/chat/chat.js +0 -0
  30. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/chat/chat.js.map +0 -0
  31. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/markdown-stream/markdown-stream.css +0 -0
  32. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/markdown-stream/markdown-stream.css.map +0 -0
  33. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/markdown-stream/markdown-stream.js +0 -0
  34. {shinychat-0.0.1a2 → shinychat-0.1.0}/pkg-py/src/shinychat/www/markdown-stream/markdown-stream.js.map +0 -0
@@ -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'
@@ -0,0 +1,4 @@
1
+ from ._chat import Chat, chat_ui
2
+ from ._markdown_stream import MarkdownStream, output_markdown_stream
3
+
4
+ __all__ = ["Chat", "chat_ui", "MarkdownStream", "output_markdown_stream"]
@@ -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)
@@ -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",
@@ -0,0 +1,4 @@
1
+ from .._chat import ChatExpress as Chat
2
+ from .._markdown_stream import ExpressMarkdownStream as MarkdownStream
3
+
4
+ __all__ = ["Chat", "MarkdownStream"]
@@ -0,0 +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
+
26
+ from ._chat import Chat as ChatController
27
+
28
+ __all__ = ["ChatController"]
File without changes
@@ -0,0 +1,5 @@
1
+ from .._chat import ChatMessageDict
2
+
3
+ __all__ = [
4
+ "ChatMessageDict",
5
+ ]
@@ -6,8 +6,7 @@ requires-python = ">=3.9"
6
6
  license = { text = "MIT" }
7
7
  dependencies = [
8
8
  "htmltools>=0.6.0",
9
- "shiny>=1.4.0",
10
- "playwright>=1.43.0",
9
+ "shiny>=1.4.0"
11
10
  ]
12
11
  dynamic = ["version"]
13
12
  authors = [
@@ -41,6 +40,7 @@ test = [
41
40
  "plotly",
42
41
  "pyright>=1.1.398",
43
42
  "pytest>=6.2.4",
43
+ "playwright>=1.43.0",
44
44
  "pytest-playwright>=0.3.0",
45
45
  "shinylive",
46
46
  "shinywidgets",
@@ -63,6 +63,7 @@ skip-excluded-dirs = true
63
63
 
64
64
  [tool.hatch.build.targets.wheel]
65
65
  packages = ["pkg-py/src/shinychat"]
66
+ include = ["py.typed"]
66
67
 
67
68
  [tool.hatch.build.targets.sdist]
68
69
  include = ["/pkg-py/src/shinychat"]
@@ -140,7 +141,8 @@ ignore = [
140
141
  "A001", # Variable shadowing Python builtin, e.g. `input`
141
142
  "A002", # Argument shadowing Python builtin, e.g. `id`
142
143
  "A004", # Import shadowing Python builtin, e.g. `input`
143
- "E501"
144
+ "E501",
145
+ "PLC0415", # Import outside top-level
144
146
  ]
145
147
 
146
148
  # Allow fix for all enabled rules (when `--fix`) is provided.
@@ -1,3 +0,0 @@
1
- from ._chat import Chat, ChatExpress, chat_ui
2
-
3
- __all__ = ["Chat", "ChatExpress", "chat_ui"]
@@ -1,3 +0,0 @@
1
- from .._chat import ChatExpress as Chat
2
-
3
- __all__ = ["Chat"]
@@ -1,3 +0,0 @@
1
- from ._chat import Chat as ChatController
2
-
3
- __all__ = ["ChatController"]
File without changes
File without changes
File without changes