shinychat 0.0.1a0__tar.gz → 0.0.1a1__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 (30) hide show
  1. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/PKG-INFO +60 -2
  2. shinychat-0.0.1a1/pkg-py/README.md +56 -0
  3. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/__version.py +2 -2
  4. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pyproject.toml +1 -1
  5. shinychat-0.0.1a0/pkg-py/README.md +0 -0
  6. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/.gitignore +0 -0
  7. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/LICENSE +0 -0
  8. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/__init__.py +0 -0
  9. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_chat.py +0 -0
  10. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_chat_bookmark.py +0 -0
  11. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_chat_normalize.py +0 -0
  12. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_chat_provider_types.py +0 -0
  13. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_chat_tokenizer.py +0 -0
  14. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_chat_types.py +0 -0
  15. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_html_deps_py_shiny.py +0 -0
  16. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_markdown_stream.py +0 -0
  17. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_typing_extensions.py +0 -0
  18. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/_utils.py +0 -0
  19. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/express/__init__.py +0 -0
  20. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/playwright/__init__.py +0 -0
  21. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/playwright/_chat.py +0 -0
  22. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/GIT_VERSION +0 -0
  23. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/chat/chat.css +0 -0
  24. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/chat/chat.css.map +0 -0
  25. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/chat/chat.js +0 -0
  26. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/chat/chat.js.map +0 -0
  27. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/markdown-stream/markdown-stream.css +0 -0
  28. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/markdown-stream/markdown-stream.css.map +0 -0
  29. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/markdown-stream/markdown-stream.js +0 -0
  30. {shinychat-0.0.1a0 → shinychat-0.0.1a1}/pkg-py/src/shinychat/www/markdown-stream/markdown-stream.js.map +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shinychat
3
- Version: 0.0.1a0
4
- Summary: Add your description here
3
+ Version: 0.0.1a1
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/pkg/py/
7
7
  Project-URL: Repository, https://github.com/posit-dev/shinychat
@@ -34,3 +34,61 @@ Requires-Dist: pytest>=6.2.4; extra == 'test'
34
34
  Requires-Dist: shinylive; extra == 'test'
35
35
  Requires-Dist: shinywidgets; extra == 'test'
36
36
  Requires-Dist: tox-uv>=1; extra == 'test'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # shinychat
40
+
41
+ <a href="https://posit-dev.github.io/shinychat/py"><img src="https://posit-dev.github.io/shinychat/logo.svg" align="right" height="138" alt="shinychat for Python website" /></a>
42
+
43
+ Chat UI component for [Shiny for Python](https://shiny.posit.co/py/).
44
+
45
+ ## Installation
46
+
47
+ You can install shinychat from PyPI with:
48
+
49
+ ```bash
50
+ uv pip install shinychat
51
+ ```
52
+
53
+ Or, install the development version of shinychat from [GitHub](https://github.com/posit-dev/shinychat) with:
54
+
55
+ ```bash
56
+ uv pip install git+https://github.com/posit-dev/shinychat.git
57
+ ```
58
+
59
+ ## Example
60
+
61
+ To run this example, you'll first need to create an OpenAI API key, and set it in your environment as `OPENAI_API_KEY`.
62
+
63
+ ```r
64
+ from shiny.express import render, ui
65
+ from shinychat.express import Chat
66
+
67
+ # Set some Shiny page options
68
+ ui.page_opts(title="Hello Chat")
69
+
70
+ # Create a chat instance, with an initial message
71
+ chat = Chat(
72
+ id="chat",
73
+ messages=[
74
+ {"content": "Hello! How can I help you today?", "role": "assistant"},
75
+ ],
76
+ )
77
+
78
+ # Display the chat
79
+ chat.ui()
80
+
81
+
82
+ # Define a callback to run when the user submits a message
83
+ @chat.on_user_submit
84
+ async def handle_user_input(user_input: str):
85
+ await chat.append_message(f"You said: {user_input}")
86
+
87
+
88
+ "Message state:"
89
+
90
+
91
+ @render.code
92
+ def message_state():
93
+ return str(chat.messages())
94
+ ```
@@ -0,0 +1,56 @@
1
+ # shinychat
2
+
3
+ <a href="https://posit-dev.github.io/shinychat/py"><img src="https://posit-dev.github.io/shinychat/logo.svg" align="right" height="138" alt="shinychat for Python website" /></a>
4
+
5
+ Chat UI component for [Shiny for Python](https://shiny.posit.co/py/).
6
+
7
+ ## Installation
8
+
9
+ You can install shinychat from PyPI with:
10
+
11
+ ```bash
12
+ uv pip install shinychat
13
+ ```
14
+
15
+ Or, install the development version of shinychat from [GitHub](https://github.com/posit-dev/shinychat) with:
16
+
17
+ ```bash
18
+ uv pip install git+https://github.com/posit-dev/shinychat.git
19
+ ```
20
+
21
+ ## Example
22
+
23
+ To run this example, you'll first need to create an OpenAI API key, and set it in your environment as `OPENAI_API_KEY`.
24
+
25
+ ```r
26
+ from shiny.express import render, ui
27
+ from shinychat.express import Chat
28
+
29
+ # Set some Shiny page options
30
+ ui.page_opts(title="Hello Chat")
31
+
32
+ # Create a chat instance, with an initial message
33
+ chat = Chat(
34
+ id="chat",
35
+ messages=[
36
+ {"content": "Hello! How can I help you today?", "role": "assistant"},
37
+ ],
38
+ )
39
+
40
+ # Display the chat
41
+ chat.ui()
42
+
43
+
44
+ # Define a callback to run when the user submits a message
45
+ @chat.on_user_submit
46
+ async def handle_user_input(user_input: str):
47
+ await chat.append_message(f"You said: {user_input}")
48
+
49
+
50
+ "Message state:"
51
+
52
+
53
+ @render.code
54
+ def message_state():
55
+ return str(chat.messages())
56
+ ```
@@ -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.1a0'
21
- __version_tuple__ = version_tuple = (0, 0, 1, 'a0')
20
+ __version__ = version = '0.0.1a1'
21
+ __version_tuple__ = version_tuple = (0, 0, 1, 'a1')
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "shinychat"
3
- description = "Add your description here"
3
+ description = "An AI Chat interface for Shiny apps."
4
4
  readme = "pkg-py/README.md"
5
5
  requires-python = ">=3.9"
6
6
  license = { text = "MIT" }
File without changes
File without changes
File without changes