shinychat 0.0.1a2__py3-none-any.whl → 0.2.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 +11 -2
- shinychat/__version.py +16 -3
- shinychat/_chat.py +88 -107
- shinychat/_chat_normalize.py +252 -287
- shinychat/_chat_normalize_chatlas.py +449 -0
- shinychat/_chat_provider_types.py +11 -3
- shinychat/_chat_types.py +9 -2
- shinychat/_markdown_stream.py +9 -5
- shinychat/express/__init__.py +2 -1
- shinychat/playwright/__init__.py +25 -0
- shinychat/playwright/_chat.py +42 -3
- shinychat/py.typed +0 -0
- shinychat/types/__init__.py +10 -0
- shinychat/www/GIT_VERSION +1 -1
- shinychat/www/chat/chat.css +1 -1
- shinychat/www/chat/chat.css.map +2 -2
- shinychat/www/chat/chat.js +101 -22
- shinychat/www/chat/chat.js.map +4 -4
- shinychat/www/markdown-stream/markdown-stream.js +125 -46
- shinychat/www/markdown-stream/markdown-stream.js.map +4 -4
- {shinychat-0.0.1a2.dist-info → shinychat-0.2.0.dist-info}/METADATA +10 -9
- shinychat-0.2.0.dist-info/RECORD +31 -0
- shinychat-0.0.1a2.dist-info/RECORD +0 -28
- {shinychat-0.0.1a2.dist-info → shinychat-0.2.0.dist-info}/WHEEL +0 -0
- {shinychat-0.0.1a2.dist-info → shinychat-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: shinychat
|
3
|
-
Version: 0.0
|
3
|
+
Version: 0.2.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/
|
@@ -11,15 +11,15 @@ Author-email: Joe Cheng <joe@posit.co>, Carson Sievert <carson@posit.co>, Garric
|
|
11
11
|
License: MIT
|
12
12
|
License-File: LICENSE
|
13
13
|
Requires-Python: >=3.9
|
14
|
+
Requires-Dist: chatlas>=0.12.0
|
14
15
|
Requires-Dist: htmltools>=0.6.0
|
15
|
-
Requires-Dist: playwright>=1.43.0
|
16
16
|
Requires-Dist: shiny>=1.4.0
|
17
17
|
Provides-Extra: providers
|
18
|
-
Requires-Dist: anthropic; extra == 'providers'
|
19
|
-
Requires-Dist: chatlas>=0.
|
20
|
-
Requires-Dist: google-generativeai;
|
18
|
+
Requires-Dist: anthropic; (python_version >= '3.11') and extra == 'providers'
|
19
|
+
Requires-Dist: chatlas[mcp]>=0.11.1; extra == 'providers'
|
20
|
+
Requires-Dist: google-generativeai; extra == 'providers'
|
21
21
|
Requires-Dist: langchain-core; extra == 'providers'
|
22
|
-
Requires-Dist: ollama; extra == 'providers'
|
22
|
+
Requires-Dist: ollama>=0.4.0; extra == 'providers'
|
23
23
|
Requires-Dist: openai; extra == 'providers'
|
24
24
|
Requires-Dist: tokenizers; extra == 'providers'
|
25
25
|
Provides-Extra: test
|
@@ -27,6 +27,7 @@ Requires-Dist: coverage>=7.8.2; extra == 'test'
|
|
27
27
|
Requires-Dist: faicons; extra == 'test'
|
28
28
|
Requires-Dist: ipyleaflet; extra == 'test'
|
29
29
|
Requires-Dist: pandas; extra == 'test'
|
30
|
+
Requires-Dist: playwright>=1.43.0; extra == 'test'
|
30
31
|
Requires-Dist: plotly; extra == 'test'
|
31
32
|
Requires-Dist: pyright>=1.1.398; extra == 'test'
|
32
33
|
Requires-Dist: pytest-playwright>=0.3.0; extra == 'test'
|
@@ -42,6 +43,8 @@ Description-Content-Type: text/markdown
|
|
42
43
|
|
43
44
|
Chat UI component for [Shiny for Python](https://shiny.posit.co/py/).
|
44
45
|
|
46
|
+
**Note:** shinychat is automatically installed with Shiny for Python and available as `shiny.ui.Chat` and `shiny.express.ui.Chat`. For complete instructions about creating chatbots please see the [Shiny for Python documentation](https://shiny.posit.co/py/docs/genai-chatbots.html).
|
47
|
+
|
45
48
|
## Installation
|
46
49
|
|
47
50
|
You can install shinychat from PyPI with:
|
@@ -58,8 +61,6 @@ uv pip install git+https://github.com/posit-dev/shinychat.git
|
|
58
61
|
|
59
62
|
## Example
|
60
63
|
|
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
64
|
```r
|
64
65
|
from shiny.express import render, ui
|
65
66
|
from shinychat.express import Chat
|
@@ -67,7 +68,7 @@ from shinychat.express import Chat
|
|
67
68
|
# Set some Shiny page options
|
68
69
|
ui.page_opts(title="Hello Chat")
|
69
70
|
|
70
|
-
# Create a chat
|
71
|
+
# Create a chat component, with an initial message
|
71
72
|
chat = Chat(
|
72
73
|
id="chat",
|
73
74
|
messages=[
|
@@ -0,0 +1,31 @@
|
|
1
|
+
shinychat/__init__.py,sha256=wT_dA5RTwONRhUx2MpVKu9o-eLkSqUDX8sU9W2GQYLY,316
|
2
|
+
shinychat/__version.py,sha256=Dg8AmJomLVpjKL6prJylOONZAPRtB86LOce7dorQS_A,704
|
3
|
+
shinychat/_chat.py,sha256=j7uwlpcq5Fqe1rf1ru7oQxllnGemJe5TM_pyvJDdwOg,66099
|
4
|
+
shinychat/_chat_bookmark.py,sha256=E8okr1dkN4VNDtORyPVZnCXihmfV9jFGD6UQq4Z2p5s,3027
|
5
|
+
shinychat/_chat_normalize.py,sha256=e3cOFoCZowvcp_9XosA1XodZ1gZ2fBy9vH-XpdswCRQ,9860
|
6
|
+
shinychat/_chat_normalize_chatlas.py,sha256=6iMObxHHSPZ0odWiWNTRUX52Vt8q0ocRaWvsdRjw9zk,12925
|
7
|
+
shinychat/_chat_provider_types.py,sha256=gsBPAs0uro1YcepS1xEiCXyh4JMhpE7kjs28_LSspk0,4328
|
8
|
+
shinychat/_chat_tokenizer.py,sha256=m-YS8j5TC5oJ2uTsIus04_NRYeldFbpHzsoanL2EA-E,1868
|
9
|
+
shinychat/_chat_types.py,sha256=wsIOGuKd7TV7XZEy1d2riMepYlRjOihBPnn3-8V10U8,2732
|
10
|
+
shinychat/_html_deps_py_shiny.py,sha256=GeI_6dox592BalSmKdGTdQ3Nz9FgaqSOf1eJ-jxuX_k,1189
|
11
|
+
shinychat/_markdown_stream.py,sha256=-NgjYDdFDE6wcn3KJ3HLvACVdYs-QZBqV33NXjLPFfU,12490
|
12
|
+
shinychat/_typing_extensions.py,sha256=-PeNqGFdlfWF3Bg6oYCfeFzrh6gJ4WbwKxkrBFEPP4o,1685
|
13
|
+
shinychat/_utils.py,sha256=JAcL1l9rxQJbgji9iZtYg5vtpGJT-drBLbD3NRWLfow,5178
|
14
|
+
shinychat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
+
shinychat/express/__init__.py,sha256=RfUr6wY_wc3Eb0R6K6HNEWw7ST0GxnHV1sCxB9fj8rk,149
|
16
|
+
shinychat/playwright/__init__.py,sha256=YBjQwewIRq6MNfYTyzeu-CowsEcXViZAP0GZD4KBudI,992
|
17
|
+
shinychat/playwright/_chat.py,sha256=sF4iiigajOjoc-o3LEheZHGAyXSyyh41NzWK7S8mQsc,5180
|
18
|
+
shinychat/types/__init__.py,sha256=wgVhY_j9LfgE4Krvg8tQlxtuqflCKJnLwgIT0JF5BCY,222
|
19
|
+
shinychat/www/GIT_VERSION,sha256=kCsPnTBGpDpMzCehJJ_qhzS37siv_fHPoeJuHcH6fOU,41
|
20
|
+
shinychat/www/chat/chat.css,sha256=W4CuLAB5CPV999LdQ5uRyehQNo8HzbrhglVbAYxg3-8,6455
|
21
|
+
shinychat/www/chat/chat.css.map,sha256=BzfME6Sg4Ujl-zZRIg1uwBZ_X9l3CJVJc_iRd0bmq3s,12693
|
22
|
+
shinychat/www/chat/chat.js,sha256=2h3j-o2ABzVN4NoO5xFAUg8BsUvBJ-hERe-FJ9liRCY,61135
|
23
|
+
shinychat/www/chat/chat.js.map,sha256=KetD4_Mh0Tbd8VDUr5ZtF4lkb5_a7VtLwbjzy95lBwg,382303
|
24
|
+
shinychat/www/markdown-stream/markdown-stream.css,sha256=m-yRlzTkX36piqx1T8Nvx18dYG4IZmai9dv5_pC2OOY,4240
|
25
|
+
shinychat/www/markdown-stream/markdown-stream.css.map,sha256=afnnfIkD6AuwmHWnzYKDR2qpn8GBzBdqsQ8QY2wH5Xc,9191
|
26
|
+
shinychat/www/markdown-stream/markdown-stream.js,sha256=mcbHHYdKP1tSBAhV830UPOo36q4NBcs6VOvN_i3xC7g,272842
|
27
|
+
shinychat/www/markdown-stream/markdown-stream.js.map,sha256=P7IdHoJhgJ_M9VlIHhzmzwDurBvIIS3FAkfsV86cMz0,1119239
|
28
|
+
shinychat-0.2.0.dist-info/METADATA,sha256=pDOn6dfZSVB6_HMC9nyqFa4R78-0CnEwMYbbdjL1Aa0,3203
|
29
|
+
shinychat-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
30
|
+
shinychat-0.2.0.dist-info/licenses/LICENSE,sha256=oB2X1GZjjWFbXGMjbtPLWg29aj7BzjbecsnG7yEaY8U,1078
|
31
|
+
shinychat-0.2.0.dist-info/RECORD,,
|
@@ -1,28 +0,0 @@
|
|
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
|
4
|
-
shinychat/_chat_bookmark.py,sha256=E8okr1dkN4VNDtORyPVZnCXihmfV9jFGD6UQq4Z2p5s,3027
|
5
|
-
shinychat/_chat_normalize.py,sha256=ClnKYsjaWZzu1UO4easB8mh3qQmC546fXJoFnMg_UCY,12705
|
6
|
-
shinychat/_chat_provider_types.py,sha256=3ucKeqMCltxgaNcMAVVeHjIDbw_nQNSxXnDBSiQZMN0,4179
|
7
|
-
shinychat/_chat_tokenizer.py,sha256=m-YS8j5TC5oJ2uTsIus04_NRYeldFbpHzsoanL2EA-E,1868
|
8
|
-
shinychat/_chat_types.py,sha256=MWVXGOmuVzhtYed4AVC8xIchAc6kXUgGyMZjlGTDptU,2389
|
9
|
-
shinychat/_html_deps_py_shiny.py,sha256=GeI_6dox592BalSmKdGTdQ3Nz9FgaqSOf1eJ-jxuX_k,1189
|
10
|
-
shinychat/_markdown_stream.py,sha256=gHsGE2n6wgsZ3eqXLAFsrsm7KMotQNJZ_qKezMVM4bs,12424
|
11
|
-
shinychat/_typing_extensions.py,sha256=-PeNqGFdlfWF3Bg6oYCfeFzrh6gJ4WbwKxkrBFEPP4o,1685
|
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
|
15
|
-
shinychat/playwright/_chat.py,sha256=13DVhYHlc_A008tvUs_UxWSvBmg5RS6EkI9ahYfFDlk,4313
|
16
|
-
shinychat/www/GIT_VERSION,sha256=Tm3WysJgvFOKGJ92Ar_CVEB9SLv2l2C8WmOnz6GouE4,41
|
17
|
-
shinychat/www/chat/chat.css,sha256=fFUXPqmfNw2Yc2CpzN-WxXzfUgzzBS6_yh64zNbNqBc,3422
|
18
|
-
shinychat/www/chat/chat.css.map,sha256=jK_LuenwSSjzag6GvDg_K24WAdPhMwSuTUk3O8Qvp9c,6649
|
19
|
-
shinychat/www/chat/chat.js,sha256=3qxmnFlY23L9CVAkyd57Wk4oaappKujHdYR34SEoe88,50103
|
20
|
-
shinychat/www/chat/chat.js.map,sha256=i4dt5-MyKHiy6TN5BdWYuD0O84C8ORdxkfaRr_d3dCM,350456
|
21
|
-
shinychat/www/markdown-stream/markdown-stream.css,sha256=m-yRlzTkX36piqx1T8Nvx18dYG4IZmai9dv5_pC2OOY,4240
|
22
|
-
shinychat/www/markdown-stream/markdown-stream.css.map,sha256=afnnfIkD6AuwmHWnzYKDR2qpn8GBzBdqsQ8QY2wH5Xc,9191
|
23
|
-
shinychat/www/markdown-stream/markdown-stream.js,sha256=s0blvLWl0fIbMitqKjIGDpPhNbl62TvPLcmCXkJqb0c,261127
|
24
|
-
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,,
|
File without changes
|
File without changes
|