pylogue 0.2.0__tar.gz → 0.2.1__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.
- {pylogue-0.2.0 → pylogue-0.2.1}/PKG-INFO +1 -1
- {pylogue-0.2.0 → pylogue-0.2.1}/README.md +6 -4
- {pylogue-0.2.0 → pylogue-0.2.1}/pyproject.toml +1 -1
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/__init__.py +2 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/chatapp.py +2 -1
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue.egg-info/PKG-INFO +1 -1
- {pylogue-0.2.0 → pylogue-0.2.1}/AUTHORS.md +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/CONTRIBUTING.md +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/LICENSE +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/MANIFEST.in +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/setup.cfg +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/__pre_init__.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/_modidx.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/cards.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/chat.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/health.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/renderer.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/service.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue/session.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue.egg-info/SOURCES.txt +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue.egg-info/dependency_links.txt +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue.egg-info/entry_points.txt +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue.egg-info/requires.txt +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/src/pylogue.egg-info/top_level.txt +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/tests/__init__.py +0 -0
- {pylogue-0.2.0 → pylogue-0.2.1}/tests/test_pylogue.py +0 -0
|
@@ -20,7 +20,7 @@ app.run(port=5001)
|
|
|
20
20
|
### Custom Styling
|
|
21
21
|
|
|
22
22
|
``` python
|
|
23
|
-
from pylogue.
|
|
23
|
+
from pylogue.card import ChatCard
|
|
24
24
|
from pylogue.chatapp import create_default_chat_app, ChatAppConfig
|
|
25
25
|
|
|
26
26
|
card = ChatCard(
|
|
@@ -51,7 +51,7 @@ from pylogue.chatapp import ChatApp, ChatAppConfig
|
|
|
51
51
|
from pylogue.session import InMemorySessionManager
|
|
52
52
|
from pylogue.service import ChatService
|
|
53
53
|
from pylogue.renderer import ChatRenderer
|
|
54
|
-
from pylogue.
|
|
54
|
+
from pylogue.card import ChatCard
|
|
55
55
|
|
|
56
56
|
# 1. Configure components
|
|
57
57
|
session_manager = InMemorySessionManager()
|
|
@@ -162,7 +162,7 @@ html = renderer.render_messages(messages)
|
|
|
162
162
|
|
|
163
163
|
## 📚 Examples
|
|
164
164
|
|
|
165
|
-
See `
|
|
165
|
+
See `6-Examples.ipynb` for complete working examples:
|
|
166
166
|
|
|
167
167
|
1. **Echo Bot** - Simplest possible implementation
|
|
168
168
|
2. **Custom Styled Chat** - UI/UX customization
|
|
@@ -250,10 +250,12 @@ app = create_default_chat_app(responder=your_responder)
|
|
|
250
250
|
- `3-Renderer.ipynb` - Explore presentation layer
|
|
251
251
|
- `4-ChatApp.ipynb` - See full integration
|
|
252
252
|
- `5-Examples.ipynb` - Working examples
|
|
253
|
+
- `6-JupyterExample.ipynb` - Jupyter integration
|
|
253
254
|
|
|
254
255
|
2. Try the examples in `5-Examples.ipynb`
|
|
255
256
|
|
|
256
|
-
3. Build your own custom responder
|
|
257
|
+
3. Build your own custom responder and test it out in
|
|
258
|
+
`6-JupyterExample.ipynb`
|
|
257
259
|
|
|
258
260
|
4. Deploy to production with your preferred hosting
|
|
259
261
|
|
|
@@ -34,6 +34,7 @@ class ChatAppConfig:
|
|
|
34
34
|
|
|
35
35
|
# WebSocket settings
|
|
36
36
|
ws_endpoint: str = "/ws"
|
|
37
|
+
chat_endpoint: str = "/chat"
|
|
37
38
|
|
|
38
39
|
# FastHTML extensions and headers
|
|
39
40
|
markdown_enabled: bool = True
|
|
@@ -131,7 +132,7 @@ class ChatApp:
|
|
|
131
132
|
def _register_routes(self):
|
|
132
133
|
"""Register HTTP and WebSocket routes."""
|
|
133
134
|
|
|
134
|
-
@self.app.route(
|
|
135
|
+
@self.app.route(self.config.chat_endpoint)
|
|
135
136
|
def home():
|
|
136
137
|
"""Main chat interface."""
|
|
137
138
|
initial_messages = self._get_initial_messages()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|