shinychat 0.1.0__py3-none-any.whl → 0.2.1__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 +9 -1
- shinychat/__version.py +16 -3
- shinychat/_chat.py +101 -133
- shinychat/_chat_normalize.py +252 -287
- shinychat/_chat_normalize_chatlas.py +449 -0
- shinychat/_chat_provider_types.py +11 -3
- shinychat/_chat_types.py +17 -6
- shinychat/_markdown_stream.py +9 -5
- shinychat/playwright/_chat.py +42 -3
- shinychat/types/__init__.py +6 -1
- 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.1.0.dist-info → shinychat-0.2.1.dist-info}/METADATA +9 -8
- shinychat-0.2.1.dist-info/RECORD +31 -0
- shinychat-0.1.0.dist-info/RECORD +0 -30
- {shinychat-0.1.0.dist-info → shinychat-0.2.1.dist-info}/WHEEL +0 -0
- {shinychat-0.1.0.dist-info → shinychat-0.2.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: shinychat
|
3
|
-
Version: 0.1
|
3
|
+
Version: 0.2.1
|
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,14 +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
16
|
Requires-Dist: shiny>=1.4.0
|
16
17
|
Provides-Extra: providers
|
17
|
-
Requires-Dist: anthropic; extra == 'providers'
|
18
|
-
Requires-Dist: chatlas>=0.
|
19
|
-
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'
|
20
21
|
Requires-Dist: langchain-core; extra == 'providers'
|
21
|
-
Requires-Dist: ollama; extra == 'providers'
|
22
|
+
Requires-Dist: ollama>=0.4.0; extra == 'providers'
|
22
23
|
Requires-Dist: openai; extra == 'providers'
|
23
24
|
Requires-Dist: tokenizers; extra == 'providers'
|
24
25
|
Provides-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=vYqoJTG51NOUmYyL0xt8asRK8vUT4lGAdal_EZ59mvw,704
|
3
|
+
shinychat/_chat.py,sha256=xI32fiiDPx8UCGES1klfneqmxiEWdSWY2F0V0g42pd4,65831
|
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=52UGHq1WSMkf11snrC_cDx0q0DC_WXharN41nDorZLA,2920
|
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.1.dist-info/METADATA,sha256=-OuxX322mVM3m9lt22Rw5GJc1t9-mrVYJhqQCBxMShU,3203
|
29
|
+
shinychat-0.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
30
|
+
shinychat-0.2.1.dist-info/licenses/LICENSE,sha256=oB2X1GZjjWFbXGMjbtPLWg29aj7BzjbecsnG7yEaY8U,1078
|
31
|
+
shinychat-0.2.1.dist-info/RECORD,,
|
shinychat-0.1.0.dist-info/RECORD
DELETED
@@ -1,30 +0,0 @@
|
|
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
|
-
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/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
|
16
|
-
shinychat/playwright/_chat.py,sha256=13DVhYHlc_A008tvUs_UxWSvBmg5RS6EkI9ahYfFDlk,4313
|
17
|
-
shinychat/types/__init__.py,sha256=-d0V_jRrKpbxwR59hbUzMAhmkNmYxLOETX3sTac_YEg,74
|
18
|
-
shinychat/www/GIT_VERSION,sha256=Tm3WysJgvFOKGJ92Ar_CVEB9SLv2l2C8WmOnz6GouE4,41
|
19
|
-
shinychat/www/chat/chat.css,sha256=fFUXPqmfNw2Yc2CpzN-WxXzfUgzzBS6_yh64zNbNqBc,3422
|
20
|
-
shinychat/www/chat/chat.css.map,sha256=jK_LuenwSSjzag6GvDg_K24WAdPhMwSuTUk3O8Qvp9c,6649
|
21
|
-
shinychat/www/chat/chat.js,sha256=3qxmnFlY23L9CVAkyd57Wk4oaappKujHdYR34SEoe88,50103
|
22
|
-
shinychat/www/chat/chat.js.map,sha256=i4dt5-MyKHiy6TN5BdWYuD0O84C8ORdxkfaRr_d3dCM,350456
|
23
|
-
shinychat/www/markdown-stream/markdown-stream.css,sha256=m-yRlzTkX36piqx1T8Nvx18dYG4IZmai9dv5_pC2OOY,4240
|
24
|
-
shinychat/www/markdown-stream/markdown-stream.css.map,sha256=afnnfIkD6AuwmHWnzYKDR2qpn8GBzBdqsQ8QY2wH5Xc,9191
|
25
|
-
shinychat/www/markdown-stream/markdown-stream.js,sha256=s0blvLWl0fIbMitqKjIGDpPhNbl62TvPLcmCXkJqb0c,261127
|
26
|
-
shinychat/www/markdown-stream/markdown-stream.js.map,sha256=pnOZ7K9-i0AnQOniv4oxgD9csYzRaErCcPBl-1Y4TkY,1083962
|
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,,
|
File without changes
|
File without changes
|