OpenRAG 0.5.1__tar.gz → 0.5.1.dev1__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.
Files changed (171) hide show
  1. {openrag-0.5.1/src/openrag.egg-info → openrag-0.5.1.dev1}/PKG-INFO +1 -1
  2. {openrag-0.5.1 → openrag-0.5.1.dev1}/pyproject.toml +1 -1
  3. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/agent.py +2 -10
  4. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/connectors.py +2 -2
  5. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/settings.py +30 -54
  6. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/onedrive/connector.py +19 -5
  7. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/models/processors.py +0 -43
  8. {openrag-0.5.1 → openrag-0.5.1.dev1/src/openrag.egg-info}/PKG-INFO +1 -1
  9. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/api_key_service.py +2 -7
  10. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/search_service.py +2 -25
  11. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/docker-compose.yml +5 -5
  12. {openrag-0.5.1 → openrag-0.5.1.dev1}/LICENSE +0 -0
  13. {openrag-0.5.1 → openrag-0.5.1.dev1}/MANIFEST.in +0 -0
  14. {openrag-0.5.1 → openrag-0.5.1.dev1}/README.md +0 -0
  15. {openrag-0.5.1 → openrag-0.5.1.dev1}/setup.cfg +0 -0
  16. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/__init__.py +0 -0
  17. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/auth.py +0 -0
  18. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/chat.py +0 -0
  19. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/docling.py +0 -0
  20. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/documents.py +0 -0
  21. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/flows.py +0 -0
  22. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/keys.py +0 -0
  23. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/knowledge_filter.py +0 -0
  24. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/langflow_files.py +0 -0
  25. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/models.py +0 -0
  26. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/nudges.py +0 -0
  27. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/oidc.py +0 -0
  28. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/provider_health.py +0 -0
  29. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/provider_validation.py +0 -0
  30. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/router.py +0 -0
  31. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/search.py +0 -0
  32. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/tasks.py +0 -0
  33. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/upload.py +0 -0
  34. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/v1/__init__.py +0 -0
  35. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/v1/chat.py +0 -0
  36. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/v1/documents.py +0 -0
  37. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/v1/knowledge_filters.py +0 -0
  38. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/v1/models.py +0 -0
  39. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/v1/search.py +0 -0
  40. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/api/v1/settings.py +0 -0
  41. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/auth/__init__.py +0 -0
  42. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/auth/ibm_auth.py +0 -0
  43. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/auth_context.py +0 -0
  44. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/bootstrap.py +0 -0
  45. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/config/__init__.py +0 -0
  46. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/config/config_manager.py +0 -0
  47. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/config/embedding_constants.py +0 -0
  48. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/config/model_constants.py +0 -0
  49. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/config/paths.py +0 -0
  50. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/config/settings.py +0 -0
  51. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/__init__.py +0 -0
  52. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/aws_s3/__init__.py +0 -0
  53. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/aws_s3/api.py +0 -0
  54. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/aws_s3/auth.py +0 -0
  55. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/aws_s3/connector.py +0 -0
  56. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/aws_s3/models.py +0 -0
  57. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/aws_s3/support.py +0 -0
  58. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/base.py +0 -0
  59. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/connection_manager.py +0 -0
  60. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/google_drive/__init__.py +0 -0
  61. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/google_drive/connector.py +0 -0
  62. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/google_drive/oauth.py +0 -0
  63. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/ibm_cos/__init__.py +0 -0
  64. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/ibm_cos/api.py +0 -0
  65. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/ibm_cos/auth.py +0 -0
  66. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/ibm_cos/connector.py +0 -0
  67. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/ibm_cos/models.py +0 -0
  68. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/ibm_cos/support.py +0 -0
  69. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/onedrive/__init__.py +0 -0
  70. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/onedrive/oauth.py +0 -0
  71. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/service.py +0 -0
  72. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/sharepoint/__init__.py +0 -0
  73. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/sharepoint/connector.py +0 -0
  74. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/sharepoint/oauth.py +0 -0
  75. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/connectors/sharepoint/utils.py +0 -0
  76. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/dependencies.py +0 -0
  77. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/main.py +0 -0
  78. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/mcp_http/__init__.py +0 -0
  79. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/mcp_http/server.py +0 -0
  80. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/models/__init__.py +0 -0
  81. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/models/tasks.py +0 -0
  82. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/models/url.py +0 -0
  83. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/openrag.egg-info/SOURCES.txt +0 -0
  84. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/openrag.egg-info/dependency_links.txt +0 -0
  85. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/openrag.egg-info/entry_points.txt +0 -0
  86. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/openrag.egg-info/requires.txt +0 -0
  87. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/openrag.egg-info/top_level.txt +0 -0
  88. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/__init__.py +0 -0
  89. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/auth_service.py +0 -0
  90. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/chat_service.py +0 -0
  91. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/conversation_persistence_service.py +0 -0
  92. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/document_service.py +0 -0
  93. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/flows_service.py +0 -0
  94. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/knowledge_filter_service.py +0 -0
  95. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/langflow_file_service.py +0 -0
  96. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/langflow_history_service.py +0 -0
  97. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/langflow_mcp_service.py +0 -0
  98. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/models_service.py +0 -0
  99. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/monitor_service.py +0 -0
  100. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/session_ownership_service.py +0 -0
  101. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/services/task_service.py +0 -0
  102. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/session_manager.py +0 -0
  103. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/__init__.py +0 -0
  104. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/docker-compose.gpu.yml +0 -0
  105. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/components/ollama_embedding.json +0 -0
  106. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/components/ollama_llm.json +0 -0
  107. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/components/ollama_llm_text.json +0 -0
  108. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/components/watsonx_embedding.json +0 -0
  109. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/components/watsonx_llm.json +0 -0
  110. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/components/watsonx_llm_text.json +0 -0
  111. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/ingestion_flow.json +0 -0
  112. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/openrag_agent.json +0 -0
  113. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/openrag_nudges.json +0 -0
  114. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/flows/openrag_url_mcp.json +0 -0
  115. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/openrag-documents/docling.pdf +0 -0
  116. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/openrag-documents/ibm_anthropic.pdf +0 -0
  117. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/_assets/openrag-documents/warmup_ocr.pdf +0 -0
  118. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/cli.py +0 -0
  119. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/config_fields.py +0 -0
  120. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/main.py +0 -0
  121. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/managers/__init__.py +0 -0
  122. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/managers/container_manager.py +0 -0
  123. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/managers/docling_manager.py +0 -0
  124. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/managers/env_manager.py +0 -0
  125. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/screens/__init__.py +0 -0
  126. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/screens/config.py +0 -0
  127. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/screens/diagnostics.py +0 -0
  128. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/screens/logs.py +0 -0
  129. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/screens/monitor.py +0 -0
  130. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/screens/welcome.py +0 -0
  131. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/utils/__init__.py +0 -0
  132. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/utils/clipboard.py +0 -0
  133. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/utils/platform.py +0 -0
  134. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/utils/startup_checks.py +0 -0
  135. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/utils/validation.py +0 -0
  136. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/utils/version_check.py +0 -0
  137. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/__init__.py +0 -0
  138. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/command_modal.py +0 -0
  139. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/diagnostics_notification.py +0 -0
  140. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/error_notification.py +0 -0
  141. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/factory_reset_warning_modal.py +0 -0
  142. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/flow_backup_warning_modal.py +0 -0
  143. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/prune_options_modal.py +0 -0
  144. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/upgrade_instructions_modal.py +0 -0
  145. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/version_mismatch_warning_modal.py +0 -0
  146. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/tui/widgets/waves.py +0 -0
  147. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/__init__.py +0 -0
  148. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/acl_utils.py +0 -0
  149. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/container_utils.py +0 -0
  150. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/docling_client.py +0 -0
  151. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/document_processing.py +0 -0
  152. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/embedding_fields.py +0 -0
  153. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/embeddings.py +0 -0
  154. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/encryption.py +0 -0
  155. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/env_utils.py +0 -0
  156. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/file_utils.py +0 -0
  157. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/gpu_detection.py +0 -0
  158. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/hash_utils.py +0 -0
  159. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/langflow_headers.py +0 -0
  160. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/langflow_utils.py +0 -0
  161. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/logging_config.py +0 -0
  162. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/opensearch_delete.py +0 -0
  163. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/opensearch_queries.py +0 -0
  164. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/opensearch_utils.py +0 -0
  165. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/paths.py +0 -0
  166. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/run_mode_utils.py +0 -0
  167. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/telemetry/__init__.py +0 -0
  168. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/telemetry/category.py +0 -0
  169. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/telemetry/client.py +0 -0
  170. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/telemetry/message_id.py +0 -0
  171. {openrag-0.5.1 → openrag-0.5.1.dev1}/src/utils/version_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openrag
3
- Version: 0.5.1
3
+ Version: 0.5.1.dev1
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "openrag"
7
- version = "0.5.1"
7
+ version = "0.5.1.dev1"
8
8
  description = "OpenRAG is a comprehensive Retrieval-Augmented Generation platform that enables intelligent document search and AI-powered conversations."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.13"
@@ -171,16 +171,8 @@ async def async_response_stream(
171
171
  try:
172
172
  # Try to serialize the chunk object
173
173
  if hasattr(chunk, "model_dump"):
174
- # Pydantic model. Exclude "delta" from serialization since Langflow's
175
- # /response SSE wraps text deltas as {"content": "..."} for every provider but
176
- # openai SDK's event models declare/expect delta to be str so model_dump() will
177
- # emit noisy logs (PydanticSerializationUnexpectedValue) for every chunk. Basically
178
- # just reattach the raw (unvalidated) value afterwards to preserve same shape.
179
- # TODO: replace this with just chunk.model_dump() if langflow's /response SSE matches openai's
180
- # SDK's delta: str schema
181
- chunk_data = chunk.model_dump(exclude={"delta"})
182
- if hasattr(chunk, "delta"):
183
- chunk_data["delta"] = chunk.delta
174
+ # Pydantic model
175
+ chunk_data = chunk.model_dump()
184
176
  elif hasattr(chunk, "__dict__"):
185
177
  chunk_data = chunk.__dict__
186
178
  else:
@@ -734,8 +734,8 @@ async def connector_sync(
734
734
  {
735
735
  "task_ids": task_ids,
736
736
  "status": "sync_started",
737
- "message": f"Started syncing files from 1 {connector_type} connection",
738
- "connections_synced": len(task_ids),
737
+ "message": f"Started syncing files from {len(active_connections)} {connector_type} connection(s)",
738
+ "connections_synced": len(active_connections),
739
739
  },
740
740
  status_code=201,
741
741
  )
@@ -391,27 +391,16 @@ async def get_settings(
391
391
  environment=ENVIRONMENT or None,
392
392
  )
393
393
 
394
- except Exception:
395
- logger.exception("Failed to retrieve settings")
394
+ except Exception as e:
395
+ logger.error(f"Failed to retrieve settings: {str(e)}")
396
396
  return JSONResponse(
397
- {"error": "Failed to retrieve settings"}, status_code=500
397
+ {"error": f"Failed to retrieve settings: {str(e)}"}, status_code=500
398
398
  )
399
399
 
400
400
 
401
- # Provider names in priority order. LLM supports anthropic; embeddings do not.
402
- _LLM_PROVIDER_NAMES = ("openai", "anthropic", "watsonx", "ollama")
403
- _EMBEDDING_PROVIDER_NAMES = ("openai", "watsonx", "ollama")
404
-
405
-
406
- def _configured_provider_names(config, provider_names) -> list:
407
- """Return the provider names from `provider_names` marked configured in the OpenRAG config."""
408
- providers = config.providers
409
- return [name for name in provider_names if getattr(providers, name).configured]
410
-
411
-
412
401
  def _first_configured_llm_provider(config, excluding: str) -> str:
413
402
  """Return the first configured LLM provider that isn't `excluding`."""
414
- for p in _LLM_PROVIDER_NAMES:
403
+ for p in ["openai", "anthropic", "watsonx", "ollama"]:
415
404
  if p != excluding and getattr(config.providers, p).configured:
416
405
  return p
417
406
  return "openai"
@@ -419,7 +408,7 @@ def _first_configured_llm_provider(config, excluding: str) -> str:
419
408
 
420
409
  def _first_configured_embedding_provider(config, excluding: str) -> str:
421
410
  """Return the first configured embedding provider (openai/watsonx/ollama) that isn't `excluding`."""
422
- for p in _EMBEDDING_PROVIDER_NAMES:
411
+ for p in ["openai", "watsonx", "ollama"]:
423
412
  if p != excluding and getattr(config.providers, p).configured:
424
413
  return p
425
414
  return "openai"
@@ -1014,14 +1003,14 @@ async def update_settings(
1014
1003
  )
1015
1004
  return SettingsUpdateResponse(message="Configuration updated successfully")
1016
1005
 
1017
- except Exception:
1018
- logger.exception("Failed to update settings")
1006
+ except Exception as e:
1007
+ logger.error("Failed to update settings", error=str(e))
1019
1008
  await TelemetryClient.send_event(
1020
1009
  Category.SETTINGS_OPERATIONS,
1021
1010
  MessageId.ORB_SETTINGS_UPDATE_FAILED
1022
1011
  )
1023
1012
  return JSONResponse(
1024
- {"error": "Failed to update settings"}, status_code=500
1013
+ {"error": f"Failed to update settings: {str(e)}"}, status_code=500
1025
1014
  )
1026
1015
 
1027
1016
 
@@ -1283,10 +1272,15 @@ async def onboarding(
1283
1272
  admin_username = user.user_id if IBM_AUTH_ENABLED and user else None
1284
1273
  await init_index(opensearch_client, admin_username=admin_username)
1285
1274
  logger.info("OpenSearch index initialization completed successfully")
1286
- except Exception:
1287
- logger.exception("Failed to initialize OpenSearch index after onboarding")
1275
+ except Exception as e:
1276
+ logger.error(
1277
+ "Failed to initialize OpenSearch index after onboarding",
1278
+ error=str(e),
1279
+ )
1288
1280
  return JSONResponse(
1289
- {"Failed to initialize OpenSearch index after onboarding"},
1281
+ {
1282
+ "error": str(e),
1283
+ },
1290
1284
  status_code=500,
1291
1285
  )
1292
1286
 
@@ -1649,31 +1643,14 @@ async def _update_langflow_model_values(config, flows_service, llm_model=None, l
1649
1643
  )
1650
1644
 
1651
1645
  if not (embedding_model or embedding_provider or llm_model or llm_provider):
1652
- # 1. Update ALL configured LLM providers.
1653
- # Regression fix (#1587): the no-argument fallback used by
1654
- # reapply_all_settings previously only reapplied embedding providers,
1655
- # leaving LLM model values unset whenever flows were reset.
1656
- llm_providers = _configured_provider_names(config, _LLM_PROVIDER_NAMES)
1657
-
1658
- current_llm_provider = config.agent.llm_provider.lower()
1659
- for provider in llm_providers:
1660
- # Use configured model for current provider, or None (first available) for others
1661
- provider_llm_model = (
1662
- config.agent.llm_model
1663
- if provider == current_llm_provider
1664
- else None
1665
- )
1666
- await flows_service.change_langflow_model_value(
1667
- provider,
1668
- llm_model=provider_llm_model,
1669
- force_llm_update=True
1670
- )
1671
- logger.info(
1672
- f"Successfully updated Langflow flows for LLM provider {provider}"
1673
- )
1674
-
1675
1646
  # 2. Update ALL configured embedding providers
1676
- embedding_providers = _configured_provider_names(config, _EMBEDDING_PROVIDER_NAMES)
1647
+ embedding_providers = []
1648
+ if config.providers.openai.configured:
1649
+ embedding_providers.append("openai")
1650
+ if config.providers.watsonx.configured:
1651
+ embedding_providers.append("watsonx")
1652
+ if config.providers.ollama.configured:
1653
+ embedding_providers.append("ollama")
1677
1654
 
1678
1655
  current_embedding_provider = config.knowledge.embedding_provider.lower()
1679
1656
  for provider in embedding_providers:
@@ -2019,10 +1996,10 @@ async def rollback_onboarding(
2019
1996
  deleted_conversations=deleted_conversations_count
2020
1997
  )
2021
1998
 
2022
- except Exception:
2023
- logger.error("Failed to rollback onboarding configuration")
1999
+ except Exception as e:
2000
+ logger.error("Failed to rollback onboarding configuration", error=str(e))
2024
2001
  return JSONResponse(
2025
- {"error": "Failed to rollback onboarding"}, status_code=500
2002
+ {"error": f"Failed to rollback onboarding: {str(e)}"}, status_code=500
2026
2003
  )
2027
2004
 
2028
2005
 
@@ -2090,12 +2067,11 @@ async def update_docling_preset(
2090
2067
  settings=settings_toggles,
2091
2068
  preset_config=preset_config,
2092
2069
  )
2093
- except HTTPException:
2094
- # Preserve intended HTTP status codes (e.g. 400 for an invalid preset)
2095
- raise
2070
+
2096
2071
  except Exception as e:
2097
2072
  logger.error("Failed to update docling settings", error=str(e))
2098
- raise HTTPException(status_code=500, detail="Failed to update docling settings") from e
2073
+ raise HTTPException(status_code=500, detail=f"Failed to update docling settings: {str(e)}")
2074
+
2099
2075
 
2100
2076
  async def refresh_openrag_docs(
2101
2077
  document_service=Depends(get_document_service),
@@ -2131,4 +2107,4 @@ async def refresh_openrag_docs(
2131
2107
  raise HTTPException(
2132
2108
  status_code=500,
2133
2109
  detail=f"Failed to refresh OpenRAG docs: {str(e)}",
2134
- )
2110
+ )
@@ -636,7 +636,7 @@ class OneDriveConnector(BaseConnector):
636
636
 
637
637
  # Check if ID contains '!' which indicates driveId!itemId format
638
638
  if "!" in file_id:
639
- parts = file_id.split("!", 1)
639
+ parts = file_id.rsplit("!", 1)
640
640
  if len(parts) == 2:
641
641
  drive_id = parts[0]
642
642
  item_id = parts[1]
@@ -735,7 +735,7 @@ class OneDriveConnector(BaseConnector):
735
735
 
736
736
  # Build URL based on ID format
737
737
  if "!" in file_id:
738
- parts = file_id.split("!", 1)
738
+ parts = file_id.rsplit("!", 1)
739
739
  if len(parts) == 2:
740
740
  drive_id = parts[0]
741
741
  item_id = parts[1]
@@ -747,8 +747,11 @@ class OneDriveConnector(BaseConnector):
747
747
  return content
748
748
 
749
749
  # Try drives endpoint for driveId!itemId format
750
- url = f"{self._graph_base_url}/drives/{drive_id}/items/{file_id}/content"
751
- logger.info(f"Downloading via drives endpoint: {url}")
750
+ if not item_id.startswith("s"):
751
+ url = f"{self._graph_base_url}/drives/{drive_id}/items/{item_id}/content"
752
+ logger.info(f"Downloading via drives endpoint: {url}")
753
+ else:
754
+ url = f"{self._graph_base_url}/me/drive/items/{file_id}/content"
752
755
  else:
753
756
  url = f"{self._graph_base_url}/me/drive/items/{file_id}/content"
754
757
  else:
@@ -883,7 +886,18 @@ class OneDriveConnector(BaseConnector):
883
886
  files: list[dict[str, Any]] = []
884
887
 
885
888
  try:
886
- url = f"{self._graph_base_url}/me/drive/items/{folder_id}/children"
889
+ drive_id = None
890
+ if "!" in folder_id:
891
+ parts = folder_id.rsplit("!", 1)
892
+ if len(parts) == 2:
893
+ potential_drive_id, item_id = parts
894
+ if not item_id.startswith("s"):
895
+ drive_id = potential_drive_id
896
+ url = f"{self._graph_base_url}/drives/{drive_id}/items/{item_id}/children"
897
+
898
+ if not drive_id:
899
+ url = f"{self._graph_base_url}/me/drive/items/{folder_id}/children"
900
+
887
901
  params = dict(self._default_params)
888
902
 
889
903
  response = await self._make_graph_request(url, params=params)
@@ -27,15 +27,6 @@ from .tasks import FileTask, TaskStatus, UploadTask
27
27
 
28
28
  logger = get_logger(__name__)
29
29
 
30
- # Image file extensions that require OCR
31
- IMAGE_EXTENSIONS = {"bmp", "jpeg", "jpg", "png", "tiff", "tif", "webp"}
32
-
33
-
34
- def is_image_file(filename: str) -> bool:
35
- """Check if a file is an image based on its extension."""
36
- ext = filename.split(".")[-1].lower() if "." in filename else ""
37
- return ext in IMAGE_EXTENSIONS
38
-
39
30
  if TYPE_CHECKING:
40
31
  from connectors.base import DocumentACL
41
32
 
@@ -464,18 +455,6 @@ class DocumentFileProcessor(TaskProcessor):
464
455
  file_task.updated_at = time.time()
465
456
 
466
457
  try:
467
- # Check if OCR is disabled and file is an image
468
- filename = os.path.basename(item)
469
- config = get_openrag_config()
470
- ocr_enabled = config.knowledge.ocr
471
-
472
- if not ocr_enabled and is_image_file(filename):
473
- file_task.status = TaskStatus.FAILED
474
- file_task.error = f"The file '{filename}' is an image file and cannot be ingested because OCR is disabled."
475
- file_task.updated_at = time.time()
476
- upload_task.failed_files += 1
477
- return
478
-
479
458
  # Compute hash
480
459
  file_hash = hash_id(item)
481
460
 
@@ -599,17 +578,6 @@ class ConnectorFileProcessor(TaskProcessor):
599
578
  file_task.updated_at = time.time()
600
579
  upload_task.failed_files += 1
601
580
  return
602
-
603
- # Check if OCR is disabled and file is an image
604
- config = get_openrag_config()
605
- ocr_enabled = config.knowledge.ocr
606
-
607
- if not ocr_enabled and is_image_file(file_task.filename):
608
- file_task.status = TaskStatus.FAILED
609
- file_task.error = f"The file '{file_task.filename}' is an image file and cannot be ingested because OCR is disabled."
610
- file_task.updated_at = time.time()
611
- upload_task.failed_files += 1
612
- return
613
581
 
614
582
  # Get file content from connector
615
583
  try:
@@ -674,17 +642,6 @@ class ConnectorFileProcessor(TaskProcessor):
674
642
  file_task.updated_at = time.time()
675
643
  upload_task.failed_files += 1
676
644
  return
677
-
678
- # Check if OCR is disabled and file is an image
679
- config = get_openrag_config()
680
- ocr_enabled = config.knowledge.ocr
681
-
682
- if not ocr_enabled and is_image_file(name):
683
- file_task.status = TaskStatus.FAILED
684
- file_task.error = f"The file '{name}' is an image file and cannot be ingested because OCR is disabled."
685
- file_task.updated_at = time.time()
686
- upload_task.failed_files += 1
687
- return
688
645
 
689
646
  if not self.user_id:
690
647
  raise ValueError("user_id not provided to ConnectorFileProcessor")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openrag
3
- Version: 0.5.1
3
+ Version: 0.5.1.dev1
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
@@ -205,7 +205,7 @@ class APIKeyService:
205
205
  jwt_token: str = None,
206
206
  ) -> Dict[str, Any]:
207
207
  """
208
- List all active (non-revoked) API keys for a user (without the actual keys).
208
+ List all API keys for a user (without the actual keys).
209
209
 
210
210
  Args:
211
211
  user_id: The user's ID
@@ -220,12 +220,7 @@ class APIKeyService:
220
220
  # Search for user's keys
221
221
  search_body = {
222
222
  "query": {
223
- "bool": {
224
- "must": [
225
- {"term": {"user_id": user_id}},
226
- {"term": {"revoked": False }},
227
- ]
228
- }
223
+ "term": {"user_id": user_id}
229
224
  },
230
225
  "sort": [{"created_at": {"order": "desc"}}],
231
226
  "_source": [
@@ -2,7 +2,6 @@ import asyncio
2
2
  import copy
3
3
  import os
4
4
  import json
5
- import re
6
5
  from collections import Counter
7
6
  from typing import Any, Dict
8
7
  from agentd.tool_decorator import tool
@@ -23,19 +22,6 @@ EMBED_RETRY_MAX_DELAY = 8.0
23
22
  _global_search_service = None
24
23
 
25
24
 
26
- def _is_exact_token_query(query: str) -> bool:
27
- """Return True for code/token-like queries that should not allow partial fuzzy matches."""
28
- if not query or len(query.strip()) < 3:
29
- return False
30
-
31
- query = query.strip()
32
-
33
- if re.search(r"[^a-zA-Z0-9\s]", query):
34
- return True
35
-
36
- return bool(re.search(r"[a-zA-Z]", query) and re.search(r"\d", query))
37
-
38
-
39
25
  def register_search_service(service: "SearchService") -> None:
40
26
  """
41
27
  Explicitly register the active search service for the @tool wrapper.
@@ -598,17 +584,8 @@ class SearchService:
598
584
  )
599
585
  )
600
586
  }
601
-
602
- # Determine if we should apply exact-token filtering
603
- should_filter_exact = bool(exact_files) or _is_exact_token_query(query)
604
-
605
- if should_filter_exact:
606
- if exact_files:
607
- # Filter to only chunks from files with exact matches
608
- chunks = [chunk for chunk in chunks if chunk.get("filename") in exact_files]
609
- else:
610
- # No exact matches found for a token-like query - return empty results
611
- chunks = []
587
+ if exact_files:
588
+ chunks = [chunk for chunk in chunks if chunk.get("filename") in exact_files]
612
589
 
613
590
  def _build_terms_agg(field: str) -> Dict[str, Any]:
614
591
  counts = Counter(
@@ -1,6 +1,6 @@
1
1
  services:
2
2
  opensearch:
3
- image: docker.io/langflowai/openrag-opensearch:${OPENRAG_VERSION:-latest}
3
+ image: langflowai/openrag-opensearch:${OPENRAG_VERSION:-latest}
4
4
  # build:
5
5
  # context: .
6
6
  # dockerfile: Dockerfile
@@ -26,7 +26,7 @@ services:
26
26
  restart: unless-stopped
27
27
 
28
28
  dashboards:
29
- image: docker.io/opensearchproject/opensearch-dashboards:3.0.0
29
+ image: opensearchproject/opensearch-dashboards:3.0.0
30
30
  container_name: osdash
31
31
  depends_on:
32
32
  - opensearch
@@ -38,7 +38,7 @@ services:
38
38
  - "5601:5601"
39
39
 
40
40
  openrag-backend:
41
- image: docker.io/langflowai/openrag-backend:${OPENRAG_VERSION:-latest}
41
+ image: langflowai/openrag-backend:${OPENRAG_VERSION:-latest}
42
42
  build:
43
43
  context: .
44
44
  dockerfile: Dockerfile.backend
@@ -116,7 +116,7 @@ services:
116
116
  - "host.docker.internal:host-gateway"
117
117
 
118
118
  openrag-frontend:
119
- image: docker.io/langflowai/openrag-frontend:${OPENRAG_VERSION:-latest}
119
+ image: langflowai/openrag-frontend:${OPENRAG_VERSION:-latest}
120
120
  build:
121
121
  context: .
122
122
  dockerfile: Dockerfile.frontend
@@ -129,7 +129,7 @@ services:
129
129
  - "${FRONTEND_PORT:-3000}:3000"
130
130
 
131
131
  langflow:
132
- image: docker.io/langflowai/openrag-langflow:${OPENRAG_VERSION:-latest}
132
+ image: langflowai/openrag-langflow:${OPENRAG_VERSION:-latest}
133
133
  build:
134
134
  context: .
135
135
  dockerfile: Dockerfile.langflow
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
File without changes
File without changes
File without changes