trustgraph-base 2.7.2__tar.gz → 2.7.4__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 (195) hide show
  1. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/PKG-INFO +1 -1
  2. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/async_socket_client.py +1 -0
  3. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/flow.py +1 -0
  4. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/socket_client.py +2 -0
  5. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/types.py +6 -0
  6. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/__init__.py +1 -0
  7. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/llm_service.py +10 -3
  8. trustgraph_base-2.7.4/trustgraph/base/schema_compatibility.py +90 -0
  9. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/text_completion_client.py +9 -3
  10. trustgraph_base-2.7.4/trustgraph/base_version.py +1 -0
  11. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/retrieval.py +7 -0
  12. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/text_completion.py +11 -4
  13. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/llm.py +3 -1
  14. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/retrieval.py +6 -0
  15. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph_base.egg-info/PKG-INFO +1 -1
  16. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph_base.egg-info/SOURCES.txt +1 -0
  17. trustgraph_base-2.7.2/trustgraph/base_version.py +0 -1
  18. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/README.md +0 -0
  19. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/pyproject.toml +0 -0
  20. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/setup.cfg +0 -0
  21. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/__init__.py +0 -0
  22. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/api.py +0 -0
  23. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/async_bulk_client.py +0 -0
  24. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/async_flow.py +0 -0
  25. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/async_metrics.py +0 -0
  26. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/bulk_client.py +0 -0
  27. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/collection.py +0 -0
  28. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/config.py +0 -0
  29. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/exceptions.py +0 -0
  30. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/explainability.py +0 -0
  31. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/knowledge.py +0 -0
  32. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/library.py +0 -0
  33. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/api/metrics.py +0 -0
  34. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/agent_client.py +0 -0
  35. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/agent_service.py +0 -0
  36. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/async_processor.py +0 -0
  37. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/audit_publisher.py +0 -0
  38. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/backend.py +0 -0
  39. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/cassandra_config.py +0 -0
  40. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/chunking_service.py +0 -0
  41. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/collection_config_handler.py +0 -0
  42. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/config_client.py +0 -0
  43. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/consumer.py +0 -0
  44. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/consumer_spec.py +0 -0
  45. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/document_embeddings_client.py +0 -0
  46. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/document_embeddings_query_service.py +0 -0
  47. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/document_embeddings_store_service.py +0 -0
  48. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/dynamic_tool_service.py +0 -0
  49. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/embeddings_client.py +0 -0
  50. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/embeddings_service.py +0 -0
  51. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/flow.py +0 -0
  52. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/flow_processor.py +0 -0
  53. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/graph_embeddings_client.py +0 -0
  54. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/graph_embeddings_query_service.py +0 -0
  55. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/graph_embeddings_store_service.py +0 -0
  56. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/graph_rag_client.py +0 -0
  57. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/iam_client.py +0 -0
  58. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/kafka_backend.py +0 -0
  59. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/keyword_index_client.py +0 -0
  60. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/keyword_index_service.py +0 -0
  61. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/librarian_client.py +0 -0
  62. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/librarian_spec.py +0 -0
  63. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/logging.py +0 -0
  64. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/metrics.py +0 -0
  65. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/parameter_spec.py +0 -0
  66. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/processor_group.py +0 -0
  67. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/producer.py +0 -0
  68. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/producer_spec.py +0 -0
  69. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/prompt_client.py +0 -0
  70. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/publisher.py +0 -0
  71. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/pubsub.py +0 -0
  72. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/pulsar_backend.py +0 -0
  73. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/qdrant_config.py +0 -0
  74. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/rabbitmq_backend.py +0 -0
  75. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/request_response_spec.py +0 -0
  76. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/reranker_client.py +0 -0
  77. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/reranker_service.py +0 -0
  78. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/row_embeddings_query_client.py +0 -0
  79. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/serialization.py +0 -0
  80. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/spec.py +0 -0
  81. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/structured_query_client.py +0 -0
  82. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/subscriber.py +0 -0
  83. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/subscriber_spec.py +0 -0
  84. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/tool_client.py +0 -0
  85. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/tool_service.py +0 -0
  86. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/tool_service_client.py +0 -0
  87. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/triples_client.py +0 -0
  88. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/triples_query_service.py +0 -0
  89. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/triples_store_service.py +0 -0
  90. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/base/workspace_processor.py +0 -0
  91. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/__init__.py +0 -0
  92. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/agent_client.py +0 -0
  93. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/base.py +0 -0
  94. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/config_client.py +0 -0
  95. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/document_embeddings_client.py +0 -0
  96. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/document_rag_client.py +0 -0
  97. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/embeddings_client.py +0 -0
  98. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/graph_embeddings_client.py +0 -0
  99. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/graph_rag_client.py +0 -0
  100. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/llm_client.py +0 -0
  101. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/prompt_client.py +0 -0
  102. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/row_embeddings_client.py +0 -0
  103. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/clients/triples_query_client.py +0 -0
  104. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/exceptions.py +0 -0
  105. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/__init__.py +0 -0
  106. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/__init__.py +0 -0
  107. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/ar.json +0 -0
  108. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/en.json +0 -0
  109. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/es.json +0 -0
  110. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/he.json +0 -0
  111. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/hi.json +0 -0
  112. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/pt.json +0 -0
  113. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/ru.json +0 -0
  114. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/sw.json +0 -0
  115. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/tr.json +0 -0
  116. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/i18n/packs/zh-cn.json +0 -0
  117. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/knowledge/__init__.py +0 -0
  118. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/knowledge/defs.py +0 -0
  119. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/knowledge/document.py +0 -0
  120. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/knowledge/identifier.py +0 -0
  121. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/knowledge/organization.py +0 -0
  122. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/knowledge/publication.py +0 -0
  123. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/log_level.py +0 -0
  124. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/__init__.py +0 -0
  125. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/registry.py +0 -0
  126. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/__init__.py +0 -0
  127. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/agent.py +0 -0
  128. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/base.py +0 -0
  129. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/collection.py +0 -0
  130. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/config.py +0 -0
  131. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/diagnosis.py +0 -0
  132. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/document_loading.py +0 -0
  133. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/embeddings.py +0 -0
  134. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/embeddings_query.py +0 -0
  135. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/flow.py +0 -0
  136. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/iam.py +0 -0
  137. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/knowledge.py +0 -0
  138. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/library.py +0 -0
  139. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/metadata.py +0 -0
  140. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/nlp_query.py +0 -0
  141. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/primitives.py +0 -0
  142. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/prompt.py +0 -0
  143. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/reranker.py +0 -0
  144. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/rows_query.py +0 -0
  145. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/sparql_query.py +0 -0
  146. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/structured_query.py +0 -0
  147. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/tool.py +0 -0
  148. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/messaging/translators/triples.py +0 -0
  149. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/objects/__init__.py +0 -0
  150. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/objects/field.py +0 -0
  151. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/objects/object.py +0 -0
  152. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/provenance/__init__.py +0 -0
  153. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/provenance/agent.py +0 -0
  154. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/provenance/namespaces.py +0 -0
  155. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/provenance/triples.py +0 -0
  156. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/provenance/uris.py +0 -0
  157. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/provenance/vocabulary.py +0 -0
  158. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/rdf.py +0 -0
  159. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/__init__.py +0 -0
  160. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/core/__init__.py +0 -0
  161. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/core/metadata.py +0 -0
  162. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/core/primitives.py +0 -0
  163. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/core/topic.py +0 -0
  164. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/__init__.py +0 -0
  165. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/document.py +0 -0
  166. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/embeddings.py +0 -0
  167. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/graph.py +0 -0
  168. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/knowledge.py +0 -0
  169. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/nlp.py +0 -0
  170. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/object.py +0 -0
  171. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/rows.py +0 -0
  172. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/knowledge/structured.py +0 -0
  173. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/__init__.py +0 -0
  174. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/agent.py +0 -0
  175. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/audit.py +0 -0
  176. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/collection.py +0 -0
  177. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/config.py +0 -0
  178. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/diagnosis.py +0 -0
  179. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/flow.py +0 -0
  180. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/iam.py +0 -0
  181. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/library.py +0 -0
  182. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/lookup.py +0 -0
  183. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/nlp_query.py +0 -0
  184. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/prompt.py +0 -0
  185. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/query.py +0 -0
  186. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/reranker.py +0 -0
  187. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/rows_query.py +0 -0
  188. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/sparql_query.py +0 -0
  189. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/storage.py +0 -0
  190. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/structured_query.py +0 -0
  191. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph/schema/services/tool_service.py +0 -0
  192. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph_base.egg-info/dependency_links.txt +0 -0
  193. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph_base.egg-info/entry_points.txt +0 -0
  194. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph_base.egg-info/requires.txt +0 -0
  195. {trustgraph_base-2.7.2 → trustgraph_base-2.7.4}/trustgraph_base.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-base
3
- Version: 2.7.2
3
+ Version: 2.7.4
4
4
  Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
5
5
  Author-email: "trustgraph.ai" <security@trustgraph.ai>
6
6
  Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
@@ -267,6 +267,7 @@ class AsyncSocketClient:
267
267
  in_token=resp.get("in_token"),
268
268
  out_token=resp.get("out_token"),
269
269
  model=resp.get("model"),
270
+ sources=resp.get("sources", []),
270
271
  )
271
272
 
272
273
  async def aclose(self):
@@ -414,6 +414,7 @@ class FlowInstance:
414
414
  in_token=result.get("in_token"),
415
415
  out_token=result.get("out_token"),
416
416
  model=result.get("model"),
417
+ sources=result.get("sources", []),
417
418
  )
418
419
 
419
420
  def document_rag(
@@ -451,6 +451,7 @@ class SocketClient:
451
451
  in_token=resp.get("in_token"),
452
452
  out_token=resp.get("out_token"),
453
453
  model=resp.get("model"),
454
+ sources=resp.get("sources", []),
454
455
  )
455
456
 
456
457
  def _build_provenance_event(self, resp: Dict[str, Any]) -> ProvenanceEvent:
@@ -715,6 +716,7 @@ class SocketFlowInstance:
715
716
  in_token=result.get("in_token"),
716
717
  out_token=result.get("out_token"),
717
718
  model=result.get("model"),
719
+ sources=result.get("sources", []),
718
720
  )
719
721
 
720
722
  def graph_rag_explain(
@@ -205,6 +205,8 @@ class RAGChunk(StreamingChunk):
205
205
  in_token: Input token count (populated on the final chunk, 0 otherwise)
206
206
  out_token: Output token count (populated on the final chunk, 0 otherwise)
207
207
  model: Model identifier (populated on the final chunk, empty otherwise)
208
+ sources: Source document references as uri/title dicts (populated
209
+ on the final chunk, empty otherwise)
208
210
  message_type: Always "rag"
209
211
  """
210
212
  message_type: str = "rag"
@@ -213,6 +215,7 @@ class RAGChunk(StreamingChunk):
213
215
  in_token: Optional[int] = None
214
216
  out_token: Optional[int] = None
215
217
  model: Optional[str] = None
218
+ sources: List[Dict[str, str]] = dataclasses.field(default_factory=list)
216
219
 
217
220
  @dataclasses.dataclass
218
221
  class TextCompletionResult:
@@ -228,11 +231,14 @@ class TextCompletionResult:
228
231
  in_token: Input token count (None if not available)
229
232
  out_token: Output token count (None if not available)
230
233
  model: Model identifier (None if not available)
234
+ sources: Source document references as uri/title dicts (graph RAG
235
+ only, empty otherwise)
231
236
  """
232
237
  text: Optional[str]
233
238
  in_token: Optional[int] = None
234
239
  out_token: Optional[int] = None
235
240
  model: Optional[str] = None
241
+ sources: List[Dict[str, str]] = dataclasses.field(default_factory=list)
236
242
 
237
243
  @dataclasses.dataclass
238
244
  class ProvenanceEvent:
@@ -49,4 +49,5 @@ from . keyword_index_client import KeywordIndexClientSpec, KeywordIndexClient
49
49
  from . row_embeddings_query_client import RowEmbeddingsQueryClientSpec
50
50
  from . collection_config_handler import CollectionConfigHandler
51
51
  from . audit_publisher import AuditPublisher
52
+ from . schema_compatibility import is_strict_mode_compatible
52
53
 
@@ -126,6 +126,8 @@ class LlmService(FlowProcessor):
126
126
 
127
127
  # Check if streaming is requested and supported
128
128
  streaming = getattr(request, 'streaming', False)
129
+ response_format = getattr(request, 'response_format', None)
130
+ schema = getattr(request, 'schema', None)
129
131
 
130
132
  if streaming and self.supports_streaming():
131
133
 
@@ -136,7 +138,8 @@ class LlmService(FlowProcessor):
136
138
  ).time():
137
139
 
138
140
  async for chunk in self.generate_content_stream(
139
- request.system, request.prompt, model, temperature
141
+ request.system, request.prompt, model, temperature,
142
+ response_format=response_format, schema=schema,
140
143
  ):
141
144
  await flow("response").send(
142
145
  TextCompletionResponse(
@@ -159,7 +162,8 @@ class LlmService(FlowProcessor):
159
162
  ).time():
160
163
 
161
164
  response = await self.generate_content(
162
- request.system, request.prompt, model, temperature
165
+ request.system, request.prompt, model, temperature,
166
+ response_format=response_format, schema=schema,
163
167
  )
164
168
 
165
169
  await flow("response").send(
@@ -215,7 +219,10 @@ class LlmService(FlowProcessor):
215
219
  """
216
220
  return False
217
221
 
218
- async def generate_content_stream(self, system, prompt, model=None, temperature=None):
222
+ async def generate_content_stream(
223
+ self, system, prompt, model=None, temperature=None,
224
+ response_format=None, schema=None,
225
+ ):
219
226
  """
220
227
  Override in subclass to implement streaming.
221
228
  Should yield LlmChunk objects.
@@ -0,0 +1,90 @@
1
+
2
+ import logging
3
+
4
+ logger = logging.getLogger(__name__)
5
+
6
+
7
+ def is_strict_mode_compatible(schema):
8
+ """
9
+ Check whether a JSON schema is compatible with LLM structured-output
10
+ strict mode. Returns True if the schema can be passed directly to
11
+ providers like OpenAI, vLLM, etc.
12
+ """
13
+
14
+ if schema is None:
15
+ return False
16
+
17
+ try:
18
+ _check_node(schema)
19
+ return True
20
+ except _IncompatibleSchema as e:
21
+ logger.debug("Schema not strict-mode compatible: %s", e)
22
+ return False
23
+
24
+
25
+ class _IncompatibleSchema(Exception):
26
+ pass
27
+
28
+
29
+ def _check_node(node):
30
+
31
+ if not isinstance(node, dict):
32
+ return
33
+
34
+ node_type = node.get("type")
35
+
36
+ if node_type == "object" or (
37
+ node_type is None and "properties" in node
38
+ ):
39
+ _check_object(node)
40
+
41
+ if node_type == "array":
42
+ items = node.get("items")
43
+ if items:
44
+ _check_node(items)
45
+
46
+ for keyword in ("oneOf", "anyOf", "allOf"):
47
+ for child in node.get(keyword, []):
48
+ _check_node(child)
49
+
50
+ _check_unsupported_constraints(node)
51
+
52
+
53
+ def _check_object(node):
54
+
55
+ props = node.get("properties")
56
+ if props is None:
57
+ raise _IncompatibleSchema(
58
+ "object without properties (open-ended)"
59
+ )
60
+
61
+ if node.get("additionalProperties") is not False:
62
+ raise _IncompatibleSchema(
63
+ "object missing additionalProperties: false"
64
+ )
65
+
66
+ required = set(node.get("required", []))
67
+ for key in props:
68
+ if key not in required:
69
+ raise _IncompatibleSchema(
70
+ f"property '{key}' not in required"
71
+ )
72
+
73
+ for value in props.values():
74
+ _check_node(value)
75
+
76
+
77
+ UNSUPPORTED_KEYWORDS = {
78
+ "minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum",
79
+ "minLength", "maxLength", "pattern",
80
+ "minItems", "maxItems",
81
+ "minProperties", "maxProperties",
82
+ }
83
+
84
+
85
+ def _check_unsupported_constraints(node):
86
+ found = UNSUPPORTED_KEYWORDS & node.keys()
87
+ if found:
88
+ raise _IncompatibleSchema(
89
+ f"unsupported constraints: {', '.join(sorted(found))}"
90
+ )
@@ -14,11 +14,15 @@ class TextCompletionResult:
14
14
 
15
15
  class TextCompletionClient(RequestResponse):
16
16
 
17
- async def text_completion(self, system, prompt, timeout=600):
17
+ async def text_completion(
18
+ self, system, prompt, timeout=600,
19
+ response_format=None, schema=None,
20
+ ):
18
21
 
19
22
  resp = await self.request(
20
23
  TextCompletionRequest(
21
- system = system, prompt = prompt, streaming = False
24
+ system=system, prompt=prompt, streaming=False,
25
+ response_format=response_format, schema=schema,
22
26
  ),
23
27
  timeout=timeout
24
28
  )
@@ -35,6 +39,7 @@ class TextCompletionClient(RequestResponse):
35
39
 
36
40
  async def text_completion_stream(
37
41
  self, system, prompt, handler, timeout=600,
42
+ response_format=None, schema=None,
38
43
  ):
39
44
  """
40
45
  Streaming text completion. `handler` is an async callable invoked
@@ -54,7 +59,8 @@ class TextCompletionClient(RequestResponse):
54
59
 
55
60
  final = await self.request(
56
61
  TextCompletionRequest(
57
- system = system, prompt = prompt, streaming = True
62
+ system=system, prompt=prompt, streaming=True,
63
+ response_format=response_format, schema=schema,
58
64
  ),
59
65
  recipient=on_chunk,
60
66
  timeout=timeout,
@@ -0,0 +1 @@
1
+ __version__ = "2.7.4"
@@ -160,6 +160,13 @@ class GraphRagResponseTranslator(MessageTranslator):
160
160
  self.triple_translator.encode(t) for t in explain_triples
161
161
  ]
162
162
 
163
+ # Include source document references (final message only)
164
+ sources = getattr(obj, "sources", [])
165
+ if sources:
166
+ result["sources"] = [
167
+ {"uri": s.uri, "title": s.title} for s in sources
168
+ ]
169
+
163
170
  # Include end_of_stream flag (LLM stream complete)
164
171
  result["end_of_stream"] = getattr(obj, "end_of_stream", False)
165
172
 
@@ -10,14 +10,21 @@ class TextCompletionRequestTranslator(MessageTranslator):
10
10
  return TextCompletionRequest(
11
11
  system=data["system"],
12
12
  prompt=data["prompt"],
13
- streaming=data.get("streaming", False)
13
+ streaming=data.get("streaming", False),
14
+ response_format=data.get("response_format"),
15
+ schema=data.get("schema"),
14
16
  )
15
-
17
+
16
18
  def encode(self, obj: TextCompletionRequest) -> Dict[str, Any]:
17
- return {
19
+ result = {
18
20
  "system": obj.system,
19
- "prompt": obj.prompt
21
+ "prompt": obj.prompt,
20
22
  }
23
+ if obj.response_format is not None:
24
+ result["response_format"] = obj.response_format
25
+ if obj.schema is not None:
26
+ result["schema"] = obj.schema
27
+ return result
21
28
 
22
29
 
23
30
  class TextCompletionResponseTranslator(MessageTranslator):
@@ -11,7 +11,9 @@ from ..core.primitives import Error
11
11
  class TextCompletionRequest:
12
12
  system: str = ""
13
13
  prompt: str = ""
14
- streaming: bool = False # Default false for backward compatibility
14
+ streaming: bool = False
15
+ response_format: str | None = None
16
+ schema: dict | None = None
15
17
 
16
18
  @dataclass
17
19
  class TextCompletionResponse:
@@ -19,6 +19,11 @@ class GraphRagQuery:
19
19
  streaming: bool = False
20
20
  parent_uri: str = ""
21
21
 
22
+ @dataclass
23
+ class Source:
24
+ uri: str = "" # Source document URI
25
+ title: str = "" # Document title (empty when the document has none)
26
+
22
27
  @dataclass
23
28
  class GraphRagResponse:
24
29
  error: Error | None = None
@@ -32,6 +37,7 @@ class GraphRagResponse:
32
37
  in_token: int | None = None
33
38
  out_token: int | None = None
34
39
  model: str | None = None
40
+ sources: list[Source] = field(default_factory=list) # Source documents, on the final message
35
41
 
36
42
  ############################################################################
37
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-base
3
- Version: 2.7.2
3
+ Version: 2.7.4
4
4
  Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
5
5
  Author-email: "trustgraph.ai" <security@trustgraph.ai>
6
6
  Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
@@ -68,6 +68,7 @@ trustgraph/base/request_response_spec.py
68
68
  trustgraph/base/reranker_client.py
69
69
  trustgraph/base/reranker_service.py
70
70
  trustgraph/base/row_embeddings_query_client.py
71
+ trustgraph/base/schema_compatibility.py
71
72
  trustgraph/base/serialization.py
72
73
  trustgraph/base/spec.py
73
74
  trustgraph/base/structured_query_client.py
@@ -1 +0,0 @@
1
- __version__ = "2.7.2"