ragbits-chat 1.4.0.dev202512100237__py3-none-any.whl → 1.4.0.dev202512110238__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.
- ragbits/chat/interface/_interface.py +7 -12
- {ragbits_chat-1.4.0.dev202512100237.dist-info → ragbits_chat-1.4.0.dev202512110238.dist-info}/METADATA +2 -2
- {ragbits_chat-1.4.0.dev202512100237.dist-info → ragbits_chat-1.4.0.dev202512110238.dist-info}/RECORD +4 -4
- {ragbits_chat-1.4.0.dev202512100237.dist-info → ragbits_chat-1.4.0.dev202512110238.dist-info}/WHEEL +0 -0
|
@@ -10,7 +10,7 @@ from collections.abc import AsyncGenerator, Callable
|
|
|
10
10
|
from typing import Any
|
|
11
11
|
|
|
12
12
|
from ragbits.agents.tools.todo import Task
|
|
13
|
-
from ragbits.chat.interface.summary import SummaryGenerator
|
|
13
|
+
from ragbits.chat.interface.summary import HeuristicSummaryGenerator, SummaryGenerator
|
|
14
14
|
from ragbits.chat.interface.ui_customization import UICustomization
|
|
15
15
|
from ragbits.core.audit.metrics import record_metric
|
|
16
16
|
from ragbits.core.audit.metrics.base import MetricType
|
|
@@ -108,16 +108,14 @@ def with_chat_metadata( # noqa: PLR0915
|
|
|
108
108
|
# Generate summary to serve as title for new conversations
|
|
109
109
|
try:
|
|
110
110
|
summary = await self.generate_conversation_summary(message, history, context)
|
|
111
|
-
|
|
111
|
+
if summary:
|
|
112
|
+
yield ConversationSummaryResponse(content=ConversationSummaryContent(summary=summary))
|
|
112
113
|
except Exception:
|
|
113
114
|
logger.exception("Failed to generate conversation title")
|
|
114
115
|
|
|
115
|
-
responses = []
|
|
116
|
-
main_response = ""
|
|
117
|
-
extra_responses: list[ChatResponseUnion] = []
|
|
116
|
+
responses, main_response, extra_responses = [], "", []
|
|
118
117
|
timestamp = time.time()
|
|
119
|
-
response_token_count = 0.0
|
|
120
|
-
first_token_time = None
|
|
118
|
+
response_token_count, first_token_time = 0.0, None
|
|
121
119
|
|
|
122
120
|
try:
|
|
123
121
|
async for response in func(self, message, history, context):
|
|
@@ -212,7 +210,7 @@ class ChatInterface(ABC):
|
|
|
212
210
|
show_usage: bool = False
|
|
213
211
|
ui_customization: UICustomization | None = None
|
|
214
212
|
history_persistence: HistoryPersistenceStrategy | None = None
|
|
215
|
-
summary_generator: SummaryGenerator
|
|
213
|
+
summary_generator: SummaryGenerator = HeuristicSummaryGenerator()
|
|
216
214
|
|
|
217
215
|
def __init_subclass__(cls, **kwargs: dict) -> None:
|
|
218
216
|
"""Automatically apply the with_chat_metadata decorator to the chat method in subclasses."""
|
|
@@ -395,8 +393,5 @@ class ChatInterface(ABC):
|
|
|
395
393
|
logger.info(f"[{self.__class__.__name__}] Saving {feedback} for message {message_id} with payload {payload}")
|
|
396
394
|
|
|
397
395
|
async def generate_conversation_summary(self, message: str, history: ChatFormat, context: ChatContext) -> str:
|
|
398
|
-
"""
|
|
399
|
-
if not self.summary_generator:
|
|
400
|
-
raise Exception("Tried to invoke `generate_conversation_summary`. No SummaryGenerator found.")
|
|
401
|
-
|
|
396
|
+
"""Handles conversation summary generation using the configured summary_generator."""
|
|
402
397
|
return await self.summary_generator.generate(message, history, context)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragbits-chat
|
|
3
|
-
Version: 1.4.0.
|
|
3
|
+
Version: 1.4.0.dev202512110238
|
|
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
|
|
@@ -26,7 +26,7 @@ Requires-Dist: bcrypt>=4.2.0
|
|
|
26
26
|
Requires-Dist: fastapi<1.0.0,>=0.115.0
|
|
27
27
|
Requires-Dist: httpx<1.0.0,>=0.28.1
|
|
28
28
|
Requires-Dist: python-jose[cryptography]>=3.5.0
|
|
29
|
-
Requires-Dist: ragbits-core==1.4.0.
|
|
29
|
+
Requires-Dist: ragbits-core==1.4.0.dev202512110238
|
|
30
30
|
Requires-Dist: uvicorn<1.0.0,>=0.31.0
|
|
31
31
|
Provides-Extra: sql
|
|
32
32
|
Requires-Dist: sqlalchemy<3.0.0,>=2.0.39; extra == 'sql'
|
{ragbits_chat-1.4.0.dev202512100237.dist-info → ragbits_chat-1.4.0.dev202512110238.dist-info}/RECORD
RENAMED
|
@@ -17,7 +17,7 @@ ragbits/chat/history/compressors/__init__.py,sha256=mWY019l5KSbu0ioRP_aHfVAZQLoy
|
|
|
17
17
|
ragbits/chat/history/compressors/base.py,sha256=5jGp9_QP7DO179iOyw_BSgDWlqKSBaDfCORZlnazVsk,1077
|
|
18
18
|
ragbits/chat/history/compressors/llm.py,sha256=XWSGnUneebrPEFXzHE5Mk9I_IMXEHVhxztGXpAG4fZo,3245
|
|
19
19
|
ragbits/chat/interface/__init__.py,sha256=5TpS32YO09CqcEpHcyVsD6YSDIruBrrNazIZK7YPti0,67
|
|
20
|
-
ragbits/chat/interface/_interface.py,sha256=
|
|
20
|
+
ragbits/chat/interface/_interface.py,sha256=B23Eu9wXwuxhhJ3J8KDQ-ZFNosm-LSq9or-RFbzk6f8,15079
|
|
21
21
|
ragbits/chat/interface/forms.py,sha256=kd2n8qh7aJblCMcqpQdtA7_9O8M2I11PThQ5fw7hyDk,4433
|
|
22
22
|
ragbits/chat/interface/summary.py,sha256=U44RZM4fOwPbgWNKLEkLP3uDhZ3sAnDzJIBMV2plK2M,3326
|
|
23
23
|
ragbits/chat/interface/types.py,sha256=Xp4JeuivQQ0NF5mn75jww5Ek8JtGMMSlBVH4I-Hcn9k,29713
|
|
@@ -47,6 +47,6 @@ ragbits/chat/ui-build/assets/index-CmsICuOz.css,sha256=9b5Gkm5eCF4IthRFMT9uX6mbN
|
|
|
47
47
|
ragbits/chat/ui-build/assets/index-v15bx9Do.js,sha256=fiyrPd7JX3LvvDO_ENbGhGs6OFSH-61ZYBYFNNbggUY,13208
|
|
48
48
|
ragbits/chat/ui-build/assets/useMenuTriggerState-CTz3KfPq.js,sha256=mbfir8m_9b7WlNRvKMRNDwZP_dva1XdqgYbTXQj7oY8,21616
|
|
49
49
|
ragbits/chat/ui-build/assets/useSelectableItem-DK6eABKK.js,sha256=vkKApfBkZ9Y611vKps62qChijT5xklQTdrWbRgEWCjg,4813
|
|
50
|
-
ragbits_chat-1.4.0.
|
|
51
|
-
ragbits_chat-1.4.0.
|
|
52
|
-
ragbits_chat-1.4.0.
|
|
50
|
+
ragbits_chat-1.4.0.dev202512110238.dist-info/METADATA,sha256=KWHSQdVy41jhjVgIdYxv1qy55K6M8-K4OTMucTOzbrs,1968
|
|
51
|
+
ragbits_chat-1.4.0.dev202512110238.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
52
|
+
ragbits_chat-1.4.0.dev202512110238.dist-info/RECORD,,
|
{ragbits_chat-1.4.0.dev202512100237.dist-info → ragbits_chat-1.4.0.dev202512110238.dist-info}/WHEEL
RENAMED
|
File without changes
|