OpenRAG 0.5.0.dev7__py3-none-any.whl → 0.5.0.dev9__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.
agent.py CHANGED
@@ -515,25 +515,24 @@ async def async_chat_stream(
515
515
  yield chunk
516
516
 
517
517
  # Add the complete assistant response to message history with response_id and timestamp
518
- if full_response:
519
- assistant_message = {
520
- "role": "assistant",
521
- "content": full_response,
522
- "response_id": response_id,
523
- "timestamp": datetime.now(),
524
- }
525
- # Store usage data if available (from response.completed event)
526
- if usage_data:
527
- assistant_message["response_data"] = {"usage": usage_data}
528
- conversation_state["messages"].append(assistant_message)
518
+ assistant_message = {
519
+ "role": "assistant",
520
+ "content": full_response,
521
+ "response_id": response_id,
522
+ "timestamp": datetime.now(),
523
+ }
524
+ # Store usage data if available (from response.completed event)
525
+ if usage_data:
526
+ assistant_message["response_data"] = {"usage": usage_data}
527
+ conversation_state["messages"].append(assistant_message)
529
528
 
530
- # Store the conversation thread with its response_id
531
- if response_id:
532
- conversation_state["last_activity"] = datetime.now()
533
- await store_conversation_thread(user_id, response_id, conversation_state)
534
- logger.debug(
535
- f"Stored conversation thread for user {user_id} with response_id: {response_id}"
536
- )
529
+ # Store the conversation thread with its response_id
530
+ if response_id:
531
+ conversation_state["last_activity"] = datetime.now()
532
+ await store_conversation_thread(user_id, response_id, conversation_state)
533
+ logger.debug(
534
+ f"Stored conversation thread for user {user_id} with response_id: {response_id}"
535
+ )
537
536
 
538
537
 
539
538
  # Async langflow function with conversation storage (non-streaming)
@@ -789,16 +788,15 @@ async def async_langflow_chat_stream(
789
788
  yield chunk
790
789
 
791
790
  # Add the complete assistant response to message history with response_id, timestamp, and function call data
792
- if full_response:
793
- assistant_message = {
794
- "role": "assistant",
795
- "content": full_response,
796
- "response_id": response_id,
797
- "timestamp": datetime.now(),
798
- "chunks": collected_chunks, # Store complete chunk data for function calls
799
- "error": error_occurred, # Mark if this was an error response
800
- }
801
- # Store usage data if available (from response.completed event)
791
+ assistant_message = {
792
+ "role": "assistant",
793
+ "content": full_response,
794
+ "response_id": response_id,
795
+ "timestamp": datetime.now(),
796
+ "chunks": collected_chunks, # Store complete chunk data for function calls
797
+ "error": error_occurred, # Mark if this was an error response
798
+ }
799
+ # Store usage data if available (from response.completed event)
802
800
  if usage_data:
803
801
  assistant_message["response_data"] = {"usage": usage_data}
804
802
  conversation_state["messages"].append(assistant_message)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openrag
3
- Version: 0.5.0.dev7
3
+ Version: 0.5.0.dev9
4
4
  Summary: OpenRAG is a comprehensive Retrieval-Augmented Generation platform that enables intelligent document search and AI-powered conversations.
5
5
  Classifier: Development Status :: 4 - Beta
6
6
  Classifier: Environment :: Console
@@ -1,4 +1,4 @@
1
- agent.py,sha256=DYnk_SOC9_RVQj1MwsIHBwj81G-M717NsUnMtg_bMS4,38513
1
+ agent.py,sha256=MKgt0rQcNhQFT0WSwi4X6KmKaDkolXZU1K0xzJkS4AE,38361
2
2
  auth_context.py,sha256=jonB-u3o-yj_s8TeV_FGFRminOZkwd6OcQm1G6WOHAk,2246
3
3
  bootstrap.py,sha256=ojHJamB8ad-lKV799j8Ur43M91MfPDm4o0pfhp7e1ms,933
4
4
  dependencies.py,sha256=JrVh9WrwW6KIN4wZ434IsrVQJTpiqomZruiY-5ErGRY,15526
@@ -73,7 +73,7 @@ models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
73
  models/processors.py,sha256=e6qpstQq9DyHM4UMEUfjQqBoVO4xeLmSLkQcyt4oca0,35539
74
74
  models/tasks.py,sha256=9iINXQZxA9-hcYzG8xC_baBfLa2w6gcRPJdQHsx_Kms,1643
75
75
  models/url.py,sha256=92rsrLLyIqUErYipYz5QwUNTdHwJ2jBRV7PIVpncTyo,5764
76
- openrag-0.5.0.dev7.dist-info/licenses/LICENSE,sha256=jWcnPXkUxEinX60Yn-_zjsY9i84vz2QSb0fi53djOkg,11334
76
+ openrag-0.5.0.dev9.dist-info/licenses/LICENSE,sha256=jWcnPXkUxEinX60Yn-_zjsY9i84vz2QSb0fi53djOkg,11334
77
77
  services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
78
  services/api_key_service.py,sha256=NMz2ohJo0jcuHjDN3tHuzhCTVo6lsOqAkUhozzmWSv0,11720
79
79
  services/auth_service.py,sha256=nNxKuCHh0ziHuHU18EGEUnf242h1XYsfbrbfWTmCmQE,22125
@@ -159,8 +159,8 @@ utils/telemetry/__init__.py,sha256=xoStY8hoYWnVe0B_jNthSdzRb7AxCT0rhM8ba9Q0Obg,2
159
159
  utils/telemetry/category.py,sha256=wei3V5WyUaiadYjEE5s0ys9PY0TjnebIvTykQU0P_2k,1114
160
160
  utils/telemetry/client.py,sha256=RhjW1a27w7W6gHt9X7AxdRPdZGmCEQDPskkxj5nsuiQ,12500
161
161
  utils/telemetry/message_id.py,sha256=IAu0wBVNOGPcSlQ0bAzvqIYr1Ac_n8wSTSxXzq_tiV0,9634
162
- openrag-0.5.0.dev7.dist-info/METADATA,sha256=qkcsZIaP_CvN313kZEly3cHo0AEeVterEpfGxWl9XMk,7818
163
- openrag-0.5.0.dev7.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
164
- openrag-0.5.0.dev7.dist-info/entry_points.txt,sha256=ArKNHB63I3K8vynNkogvZOLmmQFpIsHDL7MvreCmju4,45
165
- openrag-0.5.0.dev7.dist-info/top_level.txt,sha256=5vfLBIkzuwBJrizhCSZiXV7NTzTRIMlNLsyzYDEeCF8,125
166
- openrag-0.5.0.dev7.dist-info/RECORD,,
162
+ openrag-0.5.0.dev9.dist-info/METADATA,sha256=8aJKSYFuVO73KMc4B_CGZU-lryALPWB47ofk6edYz1A,7818
163
+ openrag-0.5.0.dev9.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
164
+ openrag-0.5.0.dev9.dist-info/entry_points.txt,sha256=ArKNHB63I3K8vynNkogvZOLmmQFpIsHDL7MvreCmju4,45
165
+ openrag-0.5.0.dev9.dist-info/top_level.txt,sha256=5vfLBIkzuwBJrizhCSZiXV7NTzTRIMlNLsyzYDEeCF8,125
166
+ openrag-0.5.0.dev9.dist-info/RECORD,,