ragbits-chat 0.20.0__tar.gz → 1.4.0.dev202601170236__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.
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/.gitignore +13 -0
- ragbits_chat-1.4.0.dev202601170236/CHANGELOG.md +281 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/PKG-INFO +5 -2
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/pyproject.toml +2 -11
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/__init__.py +87 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/_utils.py +40 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/api.py +1063 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/auth/__init__.py +13 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/auth/backends.py +615 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/auth/base.py +85 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/auth/oauth2_providers.py +108 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/auth/provider_config.py +81 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/auth/session_store.py +178 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/auth/types.py +110 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/cli.py +10 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/client/__init__.py +12 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/client/client.py +132 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/client/conversation.py +234 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/client/exceptions.py +11 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/interface/_interface.py +397 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/interface/forms.py +119 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/interface/summary.py +82 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/interface/types.py +894 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/interface/ui_customization.py +56 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/metrics.py +219 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/persistence/base.py +2 -1
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/persistence/file.py +2 -1
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/persistence/sql.py +7 -3
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/providers/__init__.py +9 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/providers/model_provider.py +262 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/AuthGuard-Bq7UOJ7y.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/ChatHistory-B2hLBYMJ.js +2 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/ChatOptionsForm-bfNG8UIW.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/CredentialsLogin-0g5-w2vR.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/FeedbackForm-oSbly5oN.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/Login-DSW_CNFu.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/LogoutButton-BQE8NNsg.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/OAuth2Login-EmJ39PUe.js +2 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/ShareButton-B7DyIVH0.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/UsageButton-BABA7a-w.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/authStore-BfGlL8rp.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-NXd1g0Qd.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/chunk-SSA7SXE4-CJa0HuAU.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/index-BZLU40Mk.js +83 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/index-Be0kkf3d.js +24 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/index-Bvn9K6h_.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/index-Ceq7Rkzy.js +4 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/index-ClAYkAiv.css +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/useInitializeUserStore-DyHP7g8x.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/useMenuTriggerState-SaFmATkk.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/assets/useSelectableItem-DhuFnc0W.js +1 -0
- ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/ui-build/index.html +13 -0
- ragbits_chat-1.4.0.dev202601170236/tests/unit/auth/test_list_auth_backend.py +455 -0
- ragbits_chat-1.4.0.dev202601170236/tests/unit/auth/test_session_store.py +212 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/tests/unit/persistence/test_sql.py +13 -8
- ragbits_chat-1.4.0.dev202601170236/tests/unit/test_api.py +422 -0
- ragbits_chat-1.4.0.dev202601170236/tests/unit/test_chat_client.py +183 -0
- ragbits_chat-1.4.0.dev202601170236/tests/unit/test_conversation.py +203 -0
- ragbits_chat-1.4.0.dev202601170236/tests/unit/test_error_response.py +103 -0
- ragbits_chat-1.4.0.dev202601170236/tests/unit/test_generic_custom_response.py +389 -0
- ragbits_chat-0.20.0/CHANGELOG.md +0 -139
- ragbits_chat-0.20.0/src/ragbits/chat/api.py +0 -230
- ragbits_chat-0.20.0/src/ragbits/chat/history/__init__.py +0 -0
- ragbits_chat-0.20.0/src/ragbits/chat/interface/_interface.py +0 -217
- ragbits_chat-0.20.0/src/ragbits/chat/interface/forms.py +0 -28
- ragbits_chat-0.20.0/src/ragbits/chat/interface/types.py +0 -90
- ragbits_chat-0.20.0/src/ragbits/chat/ui-build/assets/ExamplePluginComponent-CkxrO9jk.js +0 -1
- ragbits_chat-0.20.0/src/ragbits/chat/ui-build/assets/FeedbackFormPluginComponent-Bmct8_5y.js +0 -5
- ragbits_chat-0.20.0/src/ragbits/chat/ui-build/assets/index-B86z3tbJ.css +0 -1
- ragbits_chat-0.20.0/src/ragbits/chat/ui-build/assets/index-ByuhG0Hl.js +0 -100
- ragbits_chat-0.20.0/src/ragbits/chat/ui-build/assets/index-CMvp94wz.js +0 -1
- ragbits_chat-0.20.0/src/ragbits/chat/ui-build/assets/ragbits-9U4hpuUb.svg +0 -3
- ragbits_chat-0.20.0/src/ragbits/chat/ui-build/index.html +0 -15
- ragbits_chat-0.20.0/tests/unit/test_api.py +0 -248
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/README.md +0 -0
- {ragbits_chat-0.20.0/src/ragbits/chat → ragbits_chat-1.4.0.dev202601170236/src/ragbits/chat/history}/__init__.py +0 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/history/compressors/__init__.py +0 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/history/compressors/base.py +0 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/history/compressors/llm.py +0 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/interface/__init__.py +0 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/persistence/__init__.py +0 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/src/ragbits/chat/py.typed +0 -0
- {ragbits_chat-0.20.0 → ragbits_chat-1.4.0.dev202601170236}/tests/unit/history/test_llm_compressor.py +0 -0
|
@@ -8,6 +8,10 @@ venv/
|
|
|
8
8
|
.venv/
|
|
9
9
|
__pycache__/
|
|
10
10
|
**.egg-info/
|
|
11
|
+
.deepeval/
|
|
12
|
+
|
|
13
|
+
# Local cursor rules
|
|
14
|
+
.cursor/rules/local/
|
|
11
15
|
|
|
12
16
|
# Byte-compiled / optimized / DLL files
|
|
13
17
|
__pycache__/
|
|
@@ -101,3 +105,12 @@ qdrant/
|
|
|
101
105
|
.aider*
|
|
102
106
|
|
|
103
107
|
.DS_Store
|
|
108
|
+
node_modules/
|
|
109
|
+
|
|
110
|
+
lazygit
|
|
111
|
+
|
|
112
|
+
lazygit.tar.gz
|
|
113
|
+
|
|
114
|
+
# chat conversation logs
|
|
115
|
+
duet_conversation.log
|
|
116
|
+
worktrees/
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
- Fix PostgreSQL conversation persistence by ensuring session flush after creating new conversation in SQL storage (#903)
|
|
5
|
+
- Change auth backend from jwt to http-only cookie based authentication, add support for OAuth2 authentication (#867)
|
|
6
|
+
- Make `SummaryGenerator` optional in `ChatInterface` by providing a default Heuristic implementation.
|
|
7
|
+
- Refactor ragbits-client types to remove excessive use of any (#881)
|
|
8
|
+
- Split params into path params, query params in API client (#871)
|
|
9
|
+
- Fix bug causing conversation not to be selected when navigating to it from url(#872)
|
|
10
|
+
- CI/CD for nightly npm builds, update ragbits-api-client-react deps to install latest version of the @ragbits/api-client (#873)
|
|
11
|
+
- CI/CD for nightlty builds improvements (#874)
|
|
12
|
+
- Add automatic topic extraction to be used as conversation title with ability to edit in the client side (#840)
|
|
13
|
+
- Add todo list component to the UI, add support for todo events in API (#827)
|
|
14
|
+
- Add support for confirmation requests in chat (#853)
|
|
15
|
+
- customizable HeroUI theme (#841)
|
|
16
|
+
- Add error response type to the chat interface with ability to display error messages to the user (#878)
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Make `SummaryGenerator` optional in `ChatInterface` by providing a default no-op implementation.
|
|
21
|
+
- Add automatic topic extraction to be used as conversation title with ability to edit in the client side (#840)
|
|
22
|
+
- Add todo list component to the UI, add support for todo events in API (#827)
|
|
23
|
+
- Add custom response type to the chat interface with full type safety and validation (#849)
|
|
24
|
+
- New class-based response system: `TextResponse`, `ReferenceResponse`, `StateUpdateResponse`, etc.
|
|
25
|
+
- Support for custom response types by extending `ResponseContent` and `ChatResponse`
|
|
26
|
+
- Full Pydantic validation for all response content
|
|
27
|
+
- customizable HeroUI theme (#841)
|
|
28
|
+
|
|
29
|
+
### Deprecated
|
|
30
|
+
|
|
31
|
+
- **BACKWARD COMPATIBILITY MAINTAINED**: The following APIs are deprecated and will be removed in version 2.0.0:
|
|
32
|
+
- `ChatResponseType` enum - Use `isinstance()` checks with specific response classes instead
|
|
33
|
+
- `ChatResponse.type` property - Use `isinstance()` checks instead
|
|
34
|
+
- `ChatResponse.as_text()` method - Use `isinstance(response, TextResponse)` instead
|
|
35
|
+
- `ChatResponse.as_reference()` method - Use `isinstance(response, ReferenceResponse)` instead
|
|
36
|
+
- `ChatResponse.as_state_update()` method - Use `isinstance(response, StateUpdateResponse)` instead
|
|
37
|
+
- `ChatResponse.as_conversation_id()` method - Use `isinstance(response, ConversationIdResponse)` instead
|
|
38
|
+
|
|
39
|
+
All deprecated APIs emit `DeprecationWarning` when used and remain fully functional for backward compatibility.
|
|
40
|
+
|
|
41
|
+
**Migration Example:**
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
# Old (deprecated but still works):
|
|
45
|
+
if response.type == ChatResponseType.TEXT:
|
|
46
|
+
print(response.as_text())
|
|
47
|
+
|
|
48
|
+
# New (recommended):
|
|
49
|
+
if isinstance(response, TextResponse):
|
|
50
|
+
print(response.content.text)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 1.3.0 (2025-09-11)
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- ragbits-core updated to version v1.3.0
|
|
58
|
+
|
|
59
|
+
- fix: replace authenticated_user state tracking with direct user field in ChatContext
|
|
60
|
+
- Refactor chat handlers in the UI to use registry (#805)
|
|
61
|
+
- Add auth token storage and automatic logout on 401 (#802)
|
|
62
|
+
- Improve user settings storage when history is disabled (#799)
|
|
63
|
+
- Remove redundant test for `/api/config` endpoint (#795)
|
|
64
|
+
- Fix bug causing infinite initialization screen (#793)
|
|
65
|
+
- Fix bug that caused messages to be sent when changing chat settings; simplify and harden history logic (#791)
|
|
66
|
+
- Add `clear_message` event type allowing to reset whole message (#789)
|
|
67
|
+
- Add usage component to UI with backend support (#786)
|
|
68
|
+
- Add authentication handling in the UI (#763)
|
|
69
|
+
- Add backend authentication (#761)
|
|
70
|
+
|
|
71
|
+
- Autogenerate typescript types based on backend typing (#727)
|
|
72
|
+
- Add ability to customize favicon and page title (#766)
|
|
73
|
+
|
|
74
|
+
- Autogenerate typescript types based on backend typing (#727)
|
|
75
|
+
- Add ability to customize favicon and page title (#766)
|
|
76
|
+
|
|
77
|
+
## 1.2.2 (2025-08-08)
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
- ragbits-core updated to version v1.2.2
|
|
82
|
+
|
|
83
|
+
## 1.2.1 (2025-08-04)
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
|
|
87
|
+
- ragbits-core updated to version v1.2.1
|
|
88
|
+
- Fix routing error causing chat to not be displayed with disabled history (#764)
|
|
89
|
+
|
|
90
|
+
## 1.2.0 (2025-08-01)
|
|
91
|
+
|
|
92
|
+
### Changed
|
|
93
|
+
|
|
94
|
+
- ragbits-core updated to version v1.2.0
|
|
95
|
+
- Update TailwindCSS, React, Vite, tailwind config (#742)
|
|
96
|
+
- Add images support in chat message, images gallery (#731)
|
|
97
|
+
- Add persistent user settings (#719)
|
|
98
|
+
- Send chat options under `user_settings` key (#721)
|
|
99
|
+
- Add feedback indicator to messages, allow `extensions` in chat messages (#722)
|
|
100
|
+
- Add unit tests for UI's core components (#717)
|
|
101
|
+
- Add share functionality with informative modal (#726)
|
|
102
|
+
- Add persisent chat history to the default UI using IndexedDB (#732)
|
|
103
|
+
- Redesign history UI, allowed enabling of client side history using config (#744)
|
|
104
|
+
- Allow parallel conversations in the UI (#749)
|
|
105
|
+
- Add missing typography plugin for TailwindCSS (#750)
|
|
106
|
+
- Add client routing with ability for plugins to define custom routes (#754)
|
|
107
|
+
|
|
108
|
+
## 1.1.0 (2025-07-09)
|
|
109
|
+
|
|
110
|
+
### Changed
|
|
111
|
+
|
|
112
|
+
- ragbits-core updated to version v1.1.0
|
|
113
|
+
|
|
114
|
+
- Add configurable user setting in Ragbits UI (#692)
|
|
115
|
+
- Live updates support for Python api client(#683)
|
|
116
|
+
- Synchronous and asynchronous Python api client (#647)
|
|
117
|
+
- Live updates support markdown (#684)
|
|
118
|
+
- Added custom styling for multiline and inline-code (#668)
|
|
119
|
+
- Changed toggling darkmode for tailwind class selector (#668)
|
|
120
|
+
- Loading indicator, delayed message buttons, integrated abort controller (#641)
|
|
121
|
+
- Added Eslint, Prettier & CI/CD for Ragbits API Clients (#604)
|
|
122
|
+
- Excluded API connection logic to 2 modules: ragbits-api-client and ragbits-api-client-react which implements hooks for ragbits-api-client (#582)
|
|
123
|
+
- CI/CD changes for new directory structure (#582)
|
|
124
|
+
- Move form definitions to JSONSchema (#616)
|
|
125
|
+
- Allow UI cutomization using config endpoint (#643)
|
|
126
|
+
- Add support for live updates and followup messages (#654)
|
|
127
|
+
- Fix invalid context structure in requests from FE (#663)
|
|
128
|
+
- Arrow Up and Arrow Down now cycle through sent messages in a terminal-like style (#667)
|
|
129
|
+
- Fix followup messages not sending (#680)
|
|
130
|
+
- Improve typing of TypeScript libraries (#681)
|
|
131
|
+
- New metrics in for RagbitsAPI (#615)
|
|
132
|
+
- Add debug panel with debug_mode field in config (#689)
|
|
133
|
+
- Restore relative URL handling for UI build (#699)
|
|
134
|
+
- Add integration tests for UI (#697)
|
|
135
|
+
- Use external store instead of context for history (#706)
|
|
136
|
+
|
|
137
|
+
## 1.0.0 (2025-06-04)
|
|
138
|
+
|
|
139
|
+
### Changed
|
|
140
|
+
|
|
141
|
+
- ragbits-core updated to version v1.0.0
|
|
142
|
+
|
|
143
|
+
## 0.20.1 (2025-06-04)
|
|
144
|
+
|
|
145
|
+
### Changed
|
|
146
|
+
|
|
147
|
+
- ragbits-core updated to version v0.20.1
|
|
148
|
+
|
|
149
|
+
## 0.20.0 (2025-06-03)
|
|
150
|
+
|
|
151
|
+
### Changed
|
|
152
|
+
|
|
153
|
+
- ragbits-core updated to version v0.20.0
|
|
154
|
+
|
|
155
|
+
- remove HeroUI Pro components (#557)
|
|
156
|
+
- refactor UI components to allow modifications (#579)
|
|
157
|
+
- Add setup method to ChatInterface (#586)
|
|
158
|
+
- Rebuild UI with new dependencies (#589)
|
|
159
|
+
|
|
160
|
+
## 0.19.1 (2025-05-27)
|
|
161
|
+
|
|
162
|
+
### Changed
|
|
163
|
+
|
|
164
|
+
- ragbits-core updated to version v0.19.1
|
|
165
|
+
|
|
166
|
+
- fix: dont import all persistence strategies in base file (#584)
|
|
167
|
+
|
|
168
|
+
## 0.19.0 (2025-05-27)
|
|
169
|
+
|
|
170
|
+
### Changed
|
|
171
|
+
|
|
172
|
+
- ragbits-core updated to version v0.19.0
|
|
173
|
+
|
|
174
|
+
- Add persistance component to save chat interactions from ragbits-chat (#556)
|
|
175
|
+
- Add conversation_id parameter to chat interface context (#556)
|
|
176
|
+
- Add uvicorn to dependencies (#578)
|
|
177
|
+
- Remove HeroUI Pro components (#557)
|
|
178
|
+
|
|
179
|
+
## 0.18.0 (2025-05-22)
|
|
180
|
+
|
|
181
|
+
### Changed
|
|
182
|
+
|
|
183
|
+
- ragbits-core updated to version v0.18.0
|
|
184
|
+
|
|
185
|
+
- updated ui build (#553)
|
|
186
|
+
- api integration improvements + history context changes (#552)
|
|
187
|
+
- feedback form integration (#540)
|
|
188
|
+
|
|
189
|
+
## 0.17.1 (2025-05-09)
|
|
190
|
+
|
|
191
|
+
### Changed
|
|
192
|
+
|
|
193
|
+
- ragbits-core updated to version v0.17.1
|
|
194
|
+
|
|
195
|
+
## 0.17.0 (2025-05-06)
|
|
196
|
+
|
|
197
|
+
### Changed
|
|
198
|
+
|
|
199
|
+
- ragbits-core updated to version v0.17.0
|
|
200
|
+
|
|
201
|
+
## 0.16.0 (2025-04-29)
|
|
202
|
+
|
|
203
|
+
### Changed
|
|
204
|
+
|
|
205
|
+
- ragbits-core updated to version v0.16.0
|
|
206
|
+
|
|
207
|
+
## 0.15.0 (2025-04-28)
|
|
208
|
+
|
|
209
|
+
### Changed
|
|
210
|
+
|
|
211
|
+
- ragbits-core updated to version v0.15.0
|
|
212
|
+
|
|
213
|
+
### Added
|
|
214
|
+
|
|
215
|
+
- Added support for state updates in chat interfaces with automatic signature generation (#537).
|
|
216
|
+
|
|
217
|
+
## 0.14.0 (2025-04-22)
|
|
218
|
+
|
|
219
|
+
### Changed
|
|
220
|
+
|
|
221
|
+
- ragbits-core updated to version v0.14.0
|
|
222
|
+
|
|
223
|
+
## 0.13.0 (2025-04-02)
|
|
224
|
+
|
|
225
|
+
### Changed
|
|
226
|
+
|
|
227
|
+
- ragbits-core updated to version v0.13.0
|
|
228
|
+
|
|
229
|
+
## 0.12.0 (2025-03-25)
|
|
230
|
+
|
|
231
|
+
### Changed
|
|
232
|
+
|
|
233
|
+
- ragbits-core updated to version v0.12.0
|
|
234
|
+
|
|
235
|
+
## 0.11.0 (2025-03-25)
|
|
236
|
+
|
|
237
|
+
### Changed
|
|
238
|
+
|
|
239
|
+
- ragbits-core updated to version v0.11.0
|
|
240
|
+
|
|
241
|
+
## 0.10.2 (2025-03-21)
|
|
242
|
+
|
|
243
|
+
### Changed
|
|
244
|
+
|
|
245
|
+
- ragbits-core updated to version v0.10.2
|
|
246
|
+
|
|
247
|
+
## 0.10.1 (2025-03-19)
|
|
248
|
+
|
|
249
|
+
### Changed
|
|
250
|
+
|
|
251
|
+
- ragbits-core updated to version v0.10.1
|
|
252
|
+
|
|
253
|
+
## 0.10.0 (2025-03-17)
|
|
254
|
+
|
|
255
|
+
### Changed
|
|
256
|
+
|
|
257
|
+
- ragbits-core updated to version v0.10.0
|
|
258
|
+
|
|
259
|
+
## 0.9.0 (2025-02-25)
|
|
260
|
+
|
|
261
|
+
### Changed
|
|
262
|
+
|
|
263
|
+
- ragbits-core updated to version v0.9.0
|
|
264
|
+
- Add support to persisting history of conversations using sqlalchemy (#354).
|
|
265
|
+
|
|
266
|
+
## 0.8.0 (2025-01-29)
|
|
267
|
+
|
|
268
|
+
### Changed
|
|
269
|
+
|
|
270
|
+
- ragbits-core updated to version v0.8.0
|
|
271
|
+
|
|
272
|
+
## 0.7.0 (2025-01-21)
|
|
273
|
+
|
|
274
|
+
### Changed
|
|
275
|
+
|
|
276
|
+
- ragbits-core updated to version v0.7.0
|
|
277
|
+
|
|
278
|
+
### Added
|
|
279
|
+
|
|
280
|
+
- Initial release of the package (#271).
|
|
281
|
+
- Added last message recontextualization (#271).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragbits-chat
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.4.0.dev202601170236
|
|
4
4
|
Summary: Building blocks for rapid development of GenAI applications
|
|
5
5
|
Project-URL: Homepage, https://github.com/deepsense-ai/ragbits
|
|
6
6
|
Project-URL: Bug Reports, https://github.com/deepsense-ai/ragbits/issues
|
|
@@ -22,8 +22,11 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
22
22
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
23
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
24
|
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: bcrypt>=4.2.0
|
|
25
26
|
Requires-Dist: fastapi<1.0.0,>=0.115.0
|
|
26
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: httpx<1.0.0,>=0.28.1
|
|
28
|
+
Requires-Dist: python-jose[cryptography]>=3.5.0
|
|
29
|
+
Requires-Dist: ragbits-core==1.4.0.dev202601170236
|
|
27
30
|
Requires-Dist: uvicorn<1.0.0,>=0.31.0
|
|
28
31
|
Provides-Extra: sql
|
|
29
32
|
Requires-Dist: sqlalchemy<3.0.0,>=2.0.39; extra == 'sql'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ragbits-chat"
|
|
3
|
-
version = "
|
|
3
|
+
version = "1.4.0.dev202601170236"
|
|
4
4
|
description = "Building blocks for rapid development of GenAI applications"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -31,7 +31,7 @@ classifiers = [
|
|
|
31
31
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
32
32
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
33
33
|
]
|
|
34
|
-
dependencies = ["fastapi>=0.115.0,<1.0.0", "uvicorn>=0.31.0,<1.0.0", "ragbits-core==
|
|
34
|
+
dependencies = ["fastapi>=0.115.0,<1.0.0", "uvicorn>=0.31.0,<1.0.0", "httpx>=0.28.1,<1.0.0", "bcrypt>=4.2.0", "python-jose[cryptography]>=3.5.0", "ragbits-core==1.4.0.dev202601170236"]
|
|
35
35
|
|
|
36
36
|
[project.urls]
|
|
37
37
|
"Homepage" = "https://github.com/deepsense-ai/ragbits"
|
|
@@ -44,15 +44,6 @@ sql = [
|
|
|
44
44
|
"sqlalchemy>=2.0.39,<3.0.0",
|
|
45
45
|
]
|
|
46
46
|
|
|
47
|
-
[tool.uv]
|
|
48
|
-
dev-dependencies = [
|
|
49
|
-
"pre-commit~=3.8.0",
|
|
50
|
-
"pytest~=8.3.3",
|
|
51
|
-
"pytest-cov~=5.0.0",
|
|
52
|
-
"pytest-asyncio~=0.24.0",
|
|
53
|
-
"pip-licenses>=4.0.0,<5.0.0"
|
|
54
|
-
]
|
|
55
|
-
|
|
56
47
|
[build-system]
|
|
57
48
|
requires = ["hatchling"]
|
|
58
49
|
build-backend = "hatchling.build"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from ragbits.chat.auth import (
|
|
2
|
+
AuthenticationBackend,
|
|
3
|
+
AuthenticationResponse,
|
|
4
|
+
ListAuthenticationBackend,
|
|
5
|
+
User,
|
|
6
|
+
UserCredentials,
|
|
7
|
+
)
|
|
8
|
+
from ragbits.chat.client import (
|
|
9
|
+
RagbitsChatClient,
|
|
10
|
+
RagbitsConversation,
|
|
11
|
+
SyncRagbitsChatClient,
|
|
12
|
+
SyncRagbitsConversation,
|
|
13
|
+
)
|
|
14
|
+
from ragbits.chat.interface.types import (
|
|
15
|
+
ChatResponse,
|
|
16
|
+
ChatResponseType,
|
|
17
|
+
ChatResponseUnion,
|
|
18
|
+
ClearMessageContent,
|
|
19
|
+
ClearMessageResponse,
|
|
20
|
+
ConversationIdContent,
|
|
21
|
+
ConversationIdResponse,
|
|
22
|
+
ConversationSummaryContent,
|
|
23
|
+
ConversationSummaryResponse,
|
|
24
|
+
ErrorContent,
|
|
25
|
+
ErrorResponse,
|
|
26
|
+
FollowupMessagesContent,
|
|
27
|
+
FollowupMessagesResponse,
|
|
28
|
+
ImageResponse,
|
|
29
|
+
LiveUpdateResponse,
|
|
30
|
+
Message,
|
|
31
|
+
MessageIdContent,
|
|
32
|
+
MessageIdResponse,
|
|
33
|
+
MessageRole,
|
|
34
|
+
Reference,
|
|
35
|
+
ReferenceResponse,
|
|
36
|
+
ResponseContent,
|
|
37
|
+
StateUpdate,
|
|
38
|
+
StateUpdateResponse,
|
|
39
|
+
TextContent,
|
|
40
|
+
TextResponse,
|
|
41
|
+
TodoItemContent,
|
|
42
|
+
TodoItemResponse,
|
|
43
|
+
UsageContent,
|
|
44
|
+
UsageResponse,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
__all__ = [
|
|
48
|
+
"AuthenticationBackend",
|
|
49
|
+
"AuthenticationResponse",
|
|
50
|
+
"ChatResponse",
|
|
51
|
+
"ChatResponseType",
|
|
52
|
+
"ChatResponseUnion",
|
|
53
|
+
"ClearMessageContent",
|
|
54
|
+
"ClearMessageResponse",
|
|
55
|
+
"ConversationIdContent",
|
|
56
|
+
"ConversationIdResponse",
|
|
57
|
+
"ConversationSummaryContent",
|
|
58
|
+
"ConversationSummaryResponse",
|
|
59
|
+
"ErrorContent",
|
|
60
|
+
"ErrorResponse",
|
|
61
|
+
"FollowupMessagesContent",
|
|
62
|
+
"FollowupMessagesResponse",
|
|
63
|
+
"ImageResponse",
|
|
64
|
+
"ListAuthenticationBackend",
|
|
65
|
+
"LiveUpdateResponse",
|
|
66
|
+
"Message",
|
|
67
|
+
"MessageIdContent",
|
|
68
|
+
"MessageIdResponse",
|
|
69
|
+
"MessageRole",
|
|
70
|
+
"RagbitsChatClient",
|
|
71
|
+
"RagbitsConversation",
|
|
72
|
+
"Reference",
|
|
73
|
+
"ReferenceResponse",
|
|
74
|
+
"ResponseContent",
|
|
75
|
+
"StateUpdate",
|
|
76
|
+
"StateUpdateResponse",
|
|
77
|
+
"SyncRagbitsChatClient",
|
|
78
|
+
"SyncRagbitsConversation",
|
|
79
|
+
"TextContent",
|
|
80
|
+
"TextResponse",
|
|
81
|
+
"TodoItemContent",
|
|
82
|
+
"TodoItemResponse",
|
|
83
|
+
"UsageContent",
|
|
84
|
+
"UsageResponse",
|
|
85
|
+
"User",
|
|
86
|
+
"UserCredentials",
|
|
87
|
+
]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import logging
|
|
5
|
+
|
|
6
|
+
from pydantic import TypeAdapter
|
|
7
|
+
|
|
8
|
+
from .interface.types import ChatResponse, ChatResponseUnion
|
|
9
|
+
|
|
10
|
+
logger = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def build_api_url(base_url: str, path: str) -> str:
|
|
14
|
+
"""Join *base_url* and *path* preserving exactly one slash."""
|
|
15
|
+
base = base_url.rstrip("/")
|
|
16
|
+
if not path.startswith("/"):
|
|
17
|
+
path = f"/{path}"
|
|
18
|
+
return f"{base}{path}"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PREFIX = "data: "
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def parse_sse_line(line: str) -> ChatResponse | None:
|
|
25
|
+
r"""Parse a single *Server-Sent-Event* line coming from RagbitsAPI.
|
|
26
|
+
|
|
27
|
+
Expected format: ``data: {....json....}\n``
|
|
28
|
+
Returns a *ChatResponse* instance or ``None`` if the line is not a
|
|
29
|
+
data line. Parsing/validation errors are logged (and ``None`` is returned).
|
|
30
|
+
"""
|
|
31
|
+
if not line.startswith(PREFIX):
|
|
32
|
+
return None
|
|
33
|
+
try:
|
|
34
|
+
json_payload = line[len(PREFIX) :].strip()
|
|
35
|
+
data = json.loads(json_payload)
|
|
36
|
+
adapter: TypeAdapter[ChatResponseUnion] = TypeAdapter(ChatResponseUnion)
|
|
37
|
+
return adapter.validate_python(data)
|
|
38
|
+
except Exception as exc:
|
|
39
|
+
logger.error("Failed to parse SSE line: %s", exc, exc_info=True)
|
|
40
|
+
return None
|