trustgraph-base 2.8.1__tar.gz → 2.8.2__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.
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/PKG-INFO +1 -1
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/__init__.py +1 -7
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/agent_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/async_processor.py +1 -1
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/audit_publisher.py +1 -19
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/config_client.py +2 -5
- trustgraph_base-2.8.2/trustgraph/base/consumer_spec.py +36 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/document_embeddings_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/embeddings_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/graph_embeddings_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/graph_rag_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/iam_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/keyword_index_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/librarian_spec.py +0 -19
- trustgraph_base-2.8.2/trustgraph/base/producer_spec.py +22 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/prompt_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/pubsub.py +0 -53
- trustgraph_base-2.8.2/trustgraph/base/request_response_spec.py +77 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/reranker_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/row_embeddings_query_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/structured_query_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/text_completion_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/tool_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/tool_service_client.py +2 -2
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/triples_client.py +2 -2
- trustgraph_base-2.8.2/trustgraph/base_version.py +1 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph_base.egg-info/PKG-INFO +1 -1
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph_base.egg-info/SOURCES.txt +0 -22
- trustgraph_base-2.8.1/trustgraph/base/consumer.py +0 -285
- trustgraph_base-2.8.1/trustgraph/base/consumer_spec.py +0 -68
- trustgraph_base-2.8.1/trustgraph/base/kafka_backend.py +0 -452
- trustgraph_base-2.8.1/trustgraph/base/librarian_client.py +0 -253
- trustgraph_base-2.8.1/trustgraph/base/producer.py +0 -82
- trustgraph_base-2.8.1/trustgraph/base/producer_spec.py +0 -40
- trustgraph_base-2.8.1/trustgraph/base/publisher.py +0 -120
- trustgraph_base-2.8.1/trustgraph/base/pulsar_backend.py +0 -410
- trustgraph_base-2.8.1/trustgraph/base/rabbitmq_backend.py +0 -523
- trustgraph_base-2.8.1/trustgraph/base/request_response_spec.py +0 -221
- trustgraph_base-2.8.1/trustgraph/base/subscriber.py +0 -389
- trustgraph_base-2.8.1/trustgraph/base/subscriber_spec.py +0 -33
- trustgraph_base-2.8.1/trustgraph/base_version.py +0 -1
- trustgraph_base-2.8.1/trustgraph/clients/agent_client.py +0 -94
- trustgraph_base-2.8.1/trustgraph/clients/base.py +0 -124
- trustgraph_base-2.8.1/trustgraph/clients/config_client.py +0 -174
- trustgraph_base-2.8.1/trustgraph/clients/document_embeddings_client.py +0 -45
- trustgraph_base-2.8.1/trustgraph/clients/document_rag_client.py +0 -78
- trustgraph_base-2.8.1/trustgraph/clients/embeddings_client.py +0 -31
- trustgraph_base-2.8.1/trustgraph/clients/graph_embeddings_client.py +0 -45
- trustgraph_base-2.8.1/trustgraph/clients/graph_rag_client.py +0 -83
- trustgraph_base-2.8.1/trustgraph/clients/llm_client.py +0 -99
- trustgraph_base-2.8.1/trustgraph/clients/prompt_client.py +0 -154
- trustgraph_base-2.8.1/trustgraph/clients/row_embeddings_client.py +0 -54
- trustgraph_base-2.8.1/trustgraph/clients/triples_query_client.py +0 -61
- trustgraph_base-2.8.1/trustgraph/objects/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/README.md +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/pyproject.toml +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/setup.cfg +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/api.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/async_bulk_client.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/async_flow.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/async_metrics.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/async_socket_client.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/bulk_client.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/collection.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/config.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/exceptions.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/explainability.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/flow.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/knowledge.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/library.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/metrics.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/socket_client.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/api/types.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/agent_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/async_backend.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/async_config_client.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/async_kafka_backend.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/async_librarian_client.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/async_pulsar_backend.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/async_rabbitmq_backend.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/async_rr_wrapper.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/backend.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/cassandra_config.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/chunking_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/collection_config_handler.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/document_embeddings_query_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/document_embeddings_store_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/dynamic_tool_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/embeddings_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/flow.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/flow_processor.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/graph_embeddings_query_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/graph_embeddings_store_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/image_to_text_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/keyword_index_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/llm_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/logging.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/metrics.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/parameter_spec.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/processor_group.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/qdrant_config.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/receiver_pool.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/request_response_client.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/reranker_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/schema_compatibility.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/sender_pool.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/serialization.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/spec.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/tool_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/triples_query_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/triples_store_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/workspace_processor.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/exceptions.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/ar.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/en.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/es.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/he.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/hi.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/pt.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/ru.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/sw.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/tr.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/i18n/packs/zh-cn.json +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/knowledge/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/knowledge/defs.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/knowledge/document.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/knowledge/identifier.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/knowledge/organization.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/knowledge/publication.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/log_level.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/registry.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/agent.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/base.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/collection.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/config.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/diagnosis.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/document_loading.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/embeddings.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/embeddings_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/flow.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/iam.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/image_to_text.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/knowledge.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/library.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/metadata.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/nlp_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/primitives.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/prompt.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/reranker.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/retrieval.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/rows_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/sparql_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/structured_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/text_completion.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/tool.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/messaging/translators/triples.py +0 -0
- {trustgraph_base-2.8.1/trustgraph/clients → trustgraph_base-2.8.2/trustgraph/objects}/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/objects/field.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/objects/object.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/provenance/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/provenance/agent.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/provenance/namespaces.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/provenance/triples.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/provenance/uris.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/provenance/vocabulary.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/rdf.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/core/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/core/metadata.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/core/primitives.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/core/topic.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/document.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/embeddings.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/graph.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/knowledge.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/nlp.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/object.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/rows.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/knowledge/structured.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/__init__.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/agent.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/audit.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/collection.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/config.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/diagnosis.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/flow.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/iam.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/image_to_text.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/library.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/llm.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/lookup.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/nlp_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/prompt.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/reranker.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/retrieval.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/rows_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/sparql_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/storage.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/structured_query.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/schema/services/tool_service.py +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph_base.egg-info/dependency_links.txt +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph_base.egg-info/entry_points.txt +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph_base.egg-info/requires.txt +0 -0
- {trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/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.8.
|
|
3
|
+
Version: 2.8.2
|
|
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
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
from . pubsub import
|
|
2
|
+
from . pubsub import get_async_pubsub, add_pubsub_args
|
|
3
3
|
from . async_processor import AsyncProcessor
|
|
4
|
-
from . consumer import Consumer
|
|
5
|
-
from . producer import Producer
|
|
6
|
-
from . publisher import Publisher
|
|
7
|
-
from . subscriber import Subscriber
|
|
8
4
|
from . metrics import ProcessorMetrics, ConsumerMetrics, ProducerMetrics, SubscriberMetrics
|
|
9
5
|
from . logging import add_logging_args, setup_logging
|
|
10
6
|
from . workspace_processor import WorkspaceProcessor
|
|
@@ -12,10 +8,8 @@ from . flow_processor import FlowProcessor
|
|
|
12
8
|
from . consumer_spec import ConsumerSpec
|
|
13
9
|
from . parameter_spec import ParameterSpec
|
|
14
10
|
from . producer_spec import ProducerSpec
|
|
15
|
-
from . subscriber_spec import SubscriberSpec
|
|
16
11
|
from . request_response_spec import RequestResponseSpec
|
|
17
12
|
from . llm_service import LlmService, LlmResult, LlmChunk
|
|
18
|
-
from . librarian_client import LibrarianClient
|
|
19
13
|
from . librarian_spec import LibrarianSpec
|
|
20
14
|
from . chunking_service import ChunkingService
|
|
21
15
|
from . embeddings_service import EmbeddingsService
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
from . request_response_spec import
|
|
2
|
+
from . request_response_spec import RequestResponseSpec
|
|
3
3
|
from .. schema import AgentRequest, AgentResponse
|
|
4
4
|
from .. knowledge import Uri, Literal
|
|
5
5
|
|
|
6
|
-
class AgentClient
|
|
6
|
+
class AgentClient:
|
|
7
7
|
async def invoke(self, question, plan=None, state=None,
|
|
8
8
|
history=[], think=None, observe=None, answer_callback=None,
|
|
9
9
|
timeout=300):
|
|
@@ -15,7 +15,7 @@ from .. schema import ConfigPush, ConfigRequest, ConfigResponse
|
|
|
15
15
|
from .. schema import config_push_queue, config_request_queue
|
|
16
16
|
from .. schema import config_response_queue
|
|
17
17
|
from .. log_level import LogLevel
|
|
18
|
-
from . pubsub import get_async_pubsub,
|
|
18
|
+
from . pubsub import get_async_pubsub, add_pubsub_args
|
|
19
19
|
from . receiver_pool import ReceiverPool
|
|
20
20
|
from . sender_pool import SenderPool
|
|
21
21
|
from . request_response_client import RequestResponseClient
|
|
@@ -4,8 +4,6 @@ import logging
|
|
|
4
4
|
from datetime import datetime, timezone
|
|
5
5
|
from uuid import uuid4
|
|
6
6
|
|
|
7
|
-
from . producer import Producer
|
|
8
|
-
from . metrics import ProducerMetrics
|
|
9
7
|
from trustgraph.schema import AuditEvent, audit_events_queue
|
|
10
8
|
|
|
11
9
|
logger = logging.getLogger(__name__)
|
|
@@ -13,26 +11,12 @@ logger = logging.getLogger(__name__)
|
|
|
13
11
|
|
|
14
12
|
class AuditPublisher:
|
|
15
13
|
|
|
16
|
-
def __init__(self, component_name,
|
|
17
|
-
async_backend=None):
|
|
14
|
+
def __init__(self, component_name, async_backend=None):
|
|
18
15
|
self.component_name = component_name
|
|
19
16
|
self._handle = None
|
|
20
17
|
self._async_producer = None
|
|
21
18
|
self._async_backend = async_backend
|
|
22
19
|
|
|
23
|
-
if backend is not None:
|
|
24
|
-
self._legacy_producer = Producer(
|
|
25
|
-
backend=backend,
|
|
26
|
-
topic=audit_events_queue,
|
|
27
|
-
schema=AuditEvent,
|
|
28
|
-
metrics=ProducerMetrics(
|
|
29
|
-
processor=processor_id or component_name,
|
|
30
|
-
producer="audit-events",
|
|
31
|
-
),
|
|
32
|
-
)
|
|
33
|
-
else:
|
|
34
|
-
self._legacy_producer = None
|
|
35
|
-
|
|
36
20
|
async def start(self, sender_pool=None):
|
|
37
21
|
if sender_pool is not None:
|
|
38
22
|
self._handle = await sender_pool.add_producer(
|
|
@@ -70,7 +54,5 @@ class AuditPublisher:
|
|
|
70
54
|
await self._handle.send(event)
|
|
71
55
|
elif self._async_producer:
|
|
72
56
|
await self._async_producer.send(event)
|
|
73
|
-
elif self._legacy_producer:
|
|
74
|
-
await self._legacy_producer.send(event)
|
|
75
57
|
except Exception as e:
|
|
76
58
|
logger.warning(f"Failed to emit audit event: {e}")
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
from . request_response_spec import
|
|
2
|
+
from . request_response_spec import RequestResponseSpec
|
|
3
3
|
from .. schema import ConfigRequest, ConfigResponse, ConfigKey, ConfigValue
|
|
4
4
|
|
|
5
5
|
CONFIG_TIMEOUT = 10
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class ConfigClient
|
|
9
|
-
|
|
10
|
-
def __init__(self, timeout=CONFIG_TIMEOUT, **kwargs):
|
|
11
|
-
super(ConfigClient, self).__init__(default_timeout=timeout, **kwargs)
|
|
8
|
+
class ConfigClient:
|
|
12
9
|
|
|
13
10
|
async def _request(self, timeout=None, **kwargs):
|
|
14
11
|
resp = await self.request(
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from . spec import Spec
|
|
6
|
+
|
|
7
|
+
class ConsumerSpec(Spec):
|
|
8
|
+
def __init__(self, name: str, schema: Any, handler: Any, concurrency: int = 1) -> None:
|
|
9
|
+
self.name = name
|
|
10
|
+
self.schema = schema
|
|
11
|
+
self.handler = handler
|
|
12
|
+
self.concurrency = concurrency
|
|
13
|
+
|
|
14
|
+
async def register(self, flow: Any, processor: Any, definition: dict[str, Any]) -> Any:
|
|
15
|
+
|
|
16
|
+
topic = definition["topics"][self.name]
|
|
17
|
+
subscription = (
|
|
18
|
+
processor.id + "--" + flow.workspace + "--" +
|
|
19
|
+
flow.name + "--" + self.name
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
handler = self.handler
|
|
23
|
+
|
|
24
|
+
async def pool_handler(message):
|
|
25
|
+
await handler(message, None, flow)
|
|
26
|
+
|
|
27
|
+
reg = await processor.receiver_pool.add_consumer(
|
|
28
|
+
topic=topic,
|
|
29
|
+
subscription=subscription,
|
|
30
|
+
schema=self.schema,
|
|
31
|
+
handler=pool_handler,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
flow.consumer[self.name] = reg
|
|
35
|
+
return reg
|
|
36
|
+
|
{trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/document_embeddings_client.py
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import logging
|
|
3
3
|
|
|
4
|
-
from . request_response_spec import
|
|
4
|
+
from . request_response_spec import RequestResponseSpec
|
|
5
5
|
from .. schema import DocumentEmbeddingsRequest, DocumentEmbeddingsResponse
|
|
6
6
|
from .. knowledge import Uri, Literal
|
|
7
7
|
|
|
8
8
|
# Module logger
|
|
9
9
|
logger = logging.getLogger(__name__)
|
|
10
10
|
|
|
11
|
-
class DocumentEmbeddingsClient
|
|
11
|
+
class DocumentEmbeddingsClient:
|
|
12
12
|
async def query(self, vector, limit=20, collection="default", timeout=30):
|
|
13
13
|
|
|
14
14
|
resp = await self.request(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
from . request_response_spec import
|
|
2
|
+
from . request_response_spec import RequestResponseSpec
|
|
3
3
|
from .. schema import EmbeddingsRequest, EmbeddingsResponse
|
|
4
4
|
|
|
5
|
-
class EmbeddingsClient
|
|
5
|
+
class EmbeddingsClient:
|
|
6
6
|
async def embed(self, texts, timeout=300):
|
|
7
7
|
|
|
8
8
|
resp = await self.request(
|
|
@@ -4,7 +4,7 @@ from typing import Any
|
|
|
4
4
|
|
|
5
5
|
import logging
|
|
6
6
|
|
|
7
|
-
from . request_response_spec import
|
|
7
|
+
from . request_response_spec import RequestResponseSpec
|
|
8
8
|
from .. schema import GraphEmbeddingsRequest, GraphEmbeddingsResponse, IRI, LITERAL
|
|
9
9
|
from .. knowledge import Uri, Literal
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ def to_value(x: Any) -> Any:
|
|
|
21
21
|
# Fallback
|
|
22
22
|
return Literal(x.value or x.iri)
|
|
23
23
|
|
|
24
|
-
class GraphEmbeddingsClient
|
|
24
|
+
class GraphEmbeddingsClient:
|
|
25
25
|
async def query(self, vector, limit=20, collection="default", timeout=30):
|
|
26
26
|
|
|
27
27
|
resp = await self.request(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
from . request_response_spec import
|
|
2
|
+
from . request_response_spec import RequestResponseSpec
|
|
3
3
|
from .. schema import GraphRagQuery, GraphRagResponse
|
|
4
4
|
|
|
5
|
-
class GraphRagClient
|
|
5
|
+
class GraphRagClient:
|
|
6
6
|
async def rag(self, query, collection="default",
|
|
7
7
|
chunk_callback=None, explain_callback=None,
|
|
8
8
|
parent_uri="",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import json
|
|
3
3
|
|
|
4
|
-
from . request_response_spec import
|
|
4
|
+
from . request_response_spec import RequestResponseSpec
|
|
5
5
|
from .. schema import (
|
|
6
6
|
IamRequest, IamResponse,
|
|
7
7
|
UserInput, WorkspaceInput, ApiKeyInput,
|
|
@@ -10,7 +10,7 @@ from .. schema import (
|
|
|
10
10
|
IAM_TIMEOUT = 10
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class IamClient
|
|
13
|
+
class IamClient:
|
|
14
14
|
"""Client for the IAM service request/response pub/sub protocol.
|
|
15
15
|
|
|
16
16
|
Mirrors ``ConfigClient``: a thin wrapper around ``RequestResponse``
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
import logging
|
|
3
3
|
|
|
4
|
-
from . request_response_spec import
|
|
4
|
+
from . request_response_spec import RequestResponseSpec
|
|
5
5
|
from .. schema import KeywordIndexRequest, KeywordIndexResponse
|
|
6
6
|
|
|
7
7
|
# Module logger
|
|
8
8
|
logger = logging.getLogger(__name__)
|
|
9
9
|
|
|
10
|
-
class KeywordIndexClient
|
|
10
|
+
class KeywordIndexClient:
|
|
11
11
|
async def query(self, query, limit=20, collection="default", timeout=30):
|
|
12
12
|
|
|
13
13
|
resp = await self.request(
|
|
@@ -4,7 +4,6 @@ import uuid
|
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
6
|
from . spec import Spec
|
|
7
|
-
from . librarian_client import LibrarianClient
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
class LibrarianSpec(Spec):
|
|
@@ -13,24 +12,6 @@ class LibrarianSpec(Spec):
|
|
|
13
12
|
self.request_name = request_name
|
|
14
13
|
self.response_name = response_name
|
|
15
14
|
|
|
16
|
-
def add(self, flow: Any, processor: Any, definition: dict[str, Any]) -> None:
|
|
17
|
-
|
|
18
|
-
client = LibrarianClient(
|
|
19
|
-
id=flow.id,
|
|
20
|
-
backend=processor.pubsub,
|
|
21
|
-
taskgroup=processor.taskgroup,
|
|
22
|
-
librarian_request_queue=definition["topics"][self.request_name],
|
|
23
|
-
librarian_response_queue=definition["topics"][self.response_name],
|
|
24
|
-
librarian_subscriber=(
|
|
25
|
-
processor.id + "--" + flow.workspace + "--" +
|
|
26
|
-
flow.name + "--librarian--" + str(uuid.uuid4())
|
|
27
|
-
),
|
|
28
|
-
workspace=flow.workspace,
|
|
29
|
-
flow_name=flow.name,
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
flow.librarian = client
|
|
33
|
-
|
|
34
15
|
async def register(self, flow: Any, processor: Any, definition: dict[str, Any]) -> Any:
|
|
35
16
|
|
|
36
17
|
from .async_librarian_client import AsyncLibrarianClient
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from . spec import Spec
|
|
6
|
+
|
|
7
|
+
class ProducerSpec(Spec):
|
|
8
|
+
def __init__(self, name: str, schema: Any) -> None:
|
|
9
|
+
self.name = name
|
|
10
|
+
self.schema = schema
|
|
11
|
+
|
|
12
|
+
async def register(self, flow: Any, processor: Any, definition: dict[str, Any]) -> Any:
|
|
13
|
+
|
|
14
|
+
topic = definition["topics"][self.name]
|
|
15
|
+
|
|
16
|
+
handle = await processor.sender_pool.add_producer(
|
|
17
|
+
topic=topic,
|
|
18
|
+
schema=self.schema,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
flow.producer[self.name] = handle
|
|
22
|
+
return handle
|
|
@@ -5,7 +5,7 @@ import inspect
|
|
|
5
5
|
from dataclasses import dataclass
|
|
6
6
|
from typing import Optional, Any
|
|
7
7
|
|
|
8
|
-
from . request_response_spec import
|
|
8
|
+
from . request_response_spec import RequestResponseSpec
|
|
9
9
|
from .. schema import PromptRequest, PromptResponse
|
|
10
10
|
|
|
11
11
|
@dataclass
|
|
@@ -18,7 +18,7 @@ class PromptResult:
|
|
|
18
18
|
out_token: Optional[int] = None
|
|
19
19
|
model: Optional[str] = None
|
|
20
20
|
|
|
21
|
-
class PromptClient
|
|
21
|
+
class PromptClient:
|
|
22
22
|
|
|
23
23
|
async def prompt(self, id, variables, timeout=600, streaming=False, chunk_callback=None):
|
|
24
24
|
|
|
@@ -77,59 +77,6 @@ def get_async_pubsub(**config: Any) -> Any:
|
|
|
77
77
|
)
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
def get_pubsub(**config: Any) -> Any:
|
|
81
|
-
"""
|
|
82
|
-
Factory function to create a pub/sub backend based on configuration.
|
|
83
|
-
|
|
84
|
-
Args:
|
|
85
|
-
config: Configuration dictionary from command-line args.
|
|
86
|
-
Key 'pubsub_backend' selects the backend (default: 'pulsar').
|
|
87
|
-
|
|
88
|
-
Returns:
|
|
89
|
-
Backend instance implementing the PubSubBackend protocol.
|
|
90
|
-
"""
|
|
91
|
-
backend_type = config.get('pubsub_backend', 'pulsar')
|
|
92
|
-
|
|
93
|
-
if backend_type == 'pulsar':
|
|
94
|
-
from .pulsar_backend import PulsarBackend
|
|
95
|
-
return PulsarBackend(
|
|
96
|
-
host=config.get('pulsar_host', DEFAULT_PULSAR_HOST),
|
|
97
|
-
api_key=config.get('pulsar_api_key', DEFAULT_PULSAR_API_KEY),
|
|
98
|
-
listener=config.get('pulsar_listener'),
|
|
99
|
-
admin_url=config.get('pulsar_admin_url', DEFAULT_PULSAR_ADMIN_URL),
|
|
100
|
-
)
|
|
101
|
-
elif backend_type == 'rabbitmq':
|
|
102
|
-
from .rabbitmq_backend import RabbitMQBackend
|
|
103
|
-
return RabbitMQBackend(
|
|
104
|
-
host=config.get('rabbitmq_host', DEFAULT_RABBITMQ_HOST),
|
|
105
|
-
port=config.get('rabbitmq_port', DEFAULT_RABBITMQ_PORT),
|
|
106
|
-
username=config.get('rabbitmq_username', DEFAULT_RABBITMQ_USERNAME),
|
|
107
|
-
password=config.get('rabbitmq_password', DEFAULT_RABBITMQ_PASSWORD),
|
|
108
|
-
vhost=config.get('rabbitmq_vhost', DEFAULT_RABBITMQ_VHOST),
|
|
109
|
-
)
|
|
110
|
-
elif backend_type == 'kafka':
|
|
111
|
-
from .kafka_backend import KafkaBackend
|
|
112
|
-
return KafkaBackend(
|
|
113
|
-
bootstrap_servers=config.get(
|
|
114
|
-
'kafka_bootstrap_servers', DEFAULT_KAFKA_BOOTSTRAP,
|
|
115
|
-
),
|
|
116
|
-
security_protocol=config.get(
|
|
117
|
-
'kafka_security_protocol', DEFAULT_KAFKA_PROTOCOL,
|
|
118
|
-
),
|
|
119
|
-
sasl_mechanism=config.get(
|
|
120
|
-
'kafka_sasl_mechanism', DEFAULT_KAFKA_SASL_MECHANISM,
|
|
121
|
-
),
|
|
122
|
-
sasl_username=config.get(
|
|
123
|
-
'kafka_sasl_username', DEFAULT_KAFKA_SASL_USERNAME,
|
|
124
|
-
),
|
|
125
|
-
sasl_password=config.get(
|
|
126
|
-
'kafka_sasl_password', DEFAULT_KAFKA_SASL_PASSWORD,
|
|
127
|
-
),
|
|
128
|
-
)
|
|
129
|
-
else:
|
|
130
|
-
raise ValueError(f"Unknown pub/sub backend: {backend_type}")
|
|
131
|
-
|
|
132
|
-
|
|
133
80
|
STANDALONE_PULSAR_HOST = 'pulsar://localhost:6650'
|
|
134
81
|
STANDALONE_PULSAR_ADMIN_URL = 'http://localhost:8080'
|
|
135
82
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from . spec import Spec
|
|
7
|
+
|
|
8
|
+
# Module logger
|
|
9
|
+
logger = logging.getLogger(__name__)
|
|
10
|
+
|
|
11
|
+
# This deals with the request/response case. The caller needs to
|
|
12
|
+
# use another service in request/response mode. Uses two topics:
|
|
13
|
+
# - we send on the request topic as a producer
|
|
14
|
+
# - we receive on the response topic as a subscriber
|
|
15
|
+
class RequestResponseSpec(Spec):
|
|
16
|
+
def __init__(
|
|
17
|
+
self, request_name, request_schema, response_name,
|
|
18
|
+
response_schema, impl=None, optional=False
|
|
19
|
+
):
|
|
20
|
+
self.request_name = request_name
|
|
21
|
+
self.request_schema = request_schema
|
|
22
|
+
self.response_name = response_name
|
|
23
|
+
self.response_schema = response_schema
|
|
24
|
+
self.impl = impl
|
|
25
|
+
self.optional = optional
|
|
26
|
+
|
|
27
|
+
async def register(self, flow: Any, processor: Any, definition: dict[str, Any]) -> Any:
|
|
28
|
+
|
|
29
|
+
from .request_response_client import RequestResponseClient
|
|
30
|
+
|
|
31
|
+
topics = definition.get("topics", {})
|
|
32
|
+
if self.optional and (
|
|
33
|
+
self.request_name not in topics
|
|
34
|
+
or self.response_name not in topics):
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
rr_client = await RequestResponseClient.create(
|
|
38
|
+
backend=processor.async_backend,
|
|
39
|
+
request_topic=topics[self.request_name],
|
|
40
|
+
response_topic=topics[self.response_name],
|
|
41
|
+
request_schema=self.request_schema,
|
|
42
|
+
response_schema=self.response_schema,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
wrapper = _make_impl_wrapper(rr_client, self.impl)
|
|
46
|
+
flow.consumer[self.request_name] = wrapper
|
|
47
|
+
return wrapper
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _make_impl_wrapper(rr_client, impl_cls):
|
|
51
|
+
"""Create a domain-specific wrapper that delegates request() to the
|
|
52
|
+
RequestResponseClient while inheriting business methods from impl_cls."""
|
|
53
|
+
|
|
54
|
+
class Wrapper(impl_cls):
|
|
55
|
+
def __init__(self):
|
|
56
|
+
self._rr_client = rr_client
|
|
57
|
+
|
|
58
|
+
async def request(self, req, timeout=300, recipient=None):
|
|
59
|
+
if recipient is None:
|
|
60
|
+
return await self._rr_client.request(req, timeout=timeout)
|
|
61
|
+
|
|
62
|
+
async for resp in self._rr_client.request_stream(req, timeout=timeout):
|
|
63
|
+
fin = await recipient(resp)
|
|
64
|
+
if fin:
|
|
65
|
+
return resp
|
|
66
|
+
|
|
67
|
+
async def start(self):
|
|
68
|
+
pass
|
|
69
|
+
|
|
70
|
+
async def stop(self):
|
|
71
|
+
await self._rr_client.close()
|
|
72
|
+
|
|
73
|
+
async def close(self):
|
|
74
|
+
await self._rr_client.close()
|
|
75
|
+
|
|
76
|
+
return Wrapper()
|
|
77
|
+
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
from . request_response_spec import
|
|
2
|
+
from . request_response_spec import RequestResponseSpec
|
|
3
3
|
from .. schema import (
|
|
4
4
|
RerankerRequest, RerankerResponse,
|
|
5
5
|
RerankerQuery, RerankerDocument,
|
|
6
6
|
)
|
|
7
7
|
|
|
8
|
-
class RerankerClient
|
|
8
|
+
class RerankerClient:
|
|
9
9
|
async def rerank(self, queries, documents, limit=10, timeout=300):
|
|
10
10
|
|
|
11
11
|
resp = await self.request(
|
{trustgraph_base-2.8.1 → trustgraph_base-2.8.2}/trustgraph/base/row_embeddings_query_client.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from . request_response_spec import
|
|
1
|
+
from . request_response_spec import RequestResponseSpec
|
|
2
2
|
from .. schema import RowEmbeddingsRequest, RowEmbeddingsResponse
|
|
3
3
|
|
|
4
|
-
class RowEmbeddingsQueryClient
|
|
4
|
+
class RowEmbeddingsQueryClient:
|
|
5
5
|
async def row_embeddings_query(
|
|
6
6
|
self, vector, schema_name, collection="default",
|
|
7
7
|
index_name=None, limit=10, timeout=600
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from . request_response_spec import
|
|
1
|
+
from . request_response_spec import RequestResponseSpec
|
|
2
2
|
from .. schema import StructuredQueryRequest, StructuredQueryResponse
|
|
3
3
|
|
|
4
|
-
class StructuredQueryClient
|
|
4
|
+
class StructuredQueryClient:
|
|
5
5
|
async def structured_query(self, question, collection="default", timeout=600):
|
|
6
6
|
resp = await self.request(
|
|
7
7
|
StructuredQueryRequest(
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
from dataclasses import dataclass
|
|
3
3
|
from typing import Optional
|
|
4
4
|
|
|
5
|
-
from . request_response_spec import
|
|
5
|
+
from . request_response_spec import RequestResponseSpec
|
|
6
6
|
from .. schema import TextCompletionRequest, TextCompletionResponse
|
|
7
7
|
|
|
8
8
|
@dataclass
|
|
@@ -12,7 +12,7 @@ class TextCompletionResult:
|
|
|
12
12
|
out_token: Optional[int] = None
|
|
13
13
|
model: Optional[str] = None
|
|
14
14
|
|
|
15
|
-
class TextCompletionClient
|
|
15
|
+
class TextCompletionClient:
|
|
16
16
|
|
|
17
17
|
async def text_completion(
|
|
18
18
|
self, system, prompt, timeout=600,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import json
|
|
3
3
|
|
|
4
|
-
from . request_response_spec import
|
|
4
|
+
from . request_response_spec import RequestResponseSpec
|
|
5
5
|
from .. schema import ToolRequest, ToolResponse
|
|
6
6
|
|
|
7
|
-
class ToolClient
|
|
7
|
+
class ToolClient:
|
|
8
8
|
"""
|
|
9
9
|
Client for invoking tools over the flow messaging fabric.
|
|
10
10
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import json
|
|
3
3
|
import logging
|
|
4
4
|
|
|
5
|
-
from . request_response_spec import
|
|
5
|
+
from . request_response_spec import RequestResponseSpec
|
|
6
6
|
from .. schema import ToolServiceRequest, ToolServiceResponse
|
|
7
7
|
|
|
8
8
|
logger = logging.getLogger(__name__)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class ToolServiceClient
|
|
11
|
+
class ToolServiceClient:
|
|
12
12
|
"""Client for invoking dynamically configured tool services."""
|
|
13
13
|
|
|
14
14
|
async def call(self, config, arguments, timeout=600):
|
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import asyncio
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from . request_response_spec import
|
|
6
|
+
from . request_response_spec import RequestResponseSpec
|
|
7
7
|
from .. schema import TriplesQueryRequest, TriplesQueryResponse, Term, IRI, LITERAL, TRIPLE
|
|
8
8
|
from .. knowledge import Uri, Literal
|
|
9
9
|
|
|
@@ -44,7 +44,7 @@ def from_value(x: Any) -> Any:
|
|
|
44
44
|
else:
|
|
45
45
|
return Term(type=LITERAL, value=str(x))
|
|
46
46
|
|
|
47
|
-
class TriplesClient
|
|
47
|
+
class TriplesClient:
|
|
48
48
|
|
|
49
49
|
async def query_gen(self, s=None, p=None, o=None, limit=20,
|
|
50
50
|
collection="default",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.8.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-base
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.2
|
|
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
|
|
@@ -38,7 +38,6 @@ trustgraph/base/cassandra_config.py
|
|
|
38
38
|
trustgraph/base/chunking_service.py
|
|
39
39
|
trustgraph/base/collection_config_handler.py
|
|
40
40
|
trustgraph/base/config_client.py
|
|
41
|
-
trustgraph/base/consumer.py
|
|
42
41
|
trustgraph/base/consumer_spec.py
|
|
43
42
|
trustgraph/base/document_embeddings_client.py
|
|
44
43
|
trustgraph/base/document_embeddings_query_service.py
|
|
@@ -54,24 +53,18 @@ trustgraph/base/graph_embeddings_store_service.py
|
|
|
54
53
|
trustgraph/base/graph_rag_client.py
|
|
55
54
|
trustgraph/base/iam_client.py
|
|
56
55
|
trustgraph/base/image_to_text_service.py
|
|
57
|
-
trustgraph/base/kafka_backend.py
|
|
58
56
|
trustgraph/base/keyword_index_client.py
|
|
59
57
|
trustgraph/base/keyword_index_service.py
|
|
60
|
-
trustgraph/base/librarian_client.py
|
|
61
58
|
trustgraph/base/librarian_spec.py
|
|
62
59
|
trustgraph/base/llm_service.py
|
|
63
60
|
trustgraph/base/logging.py
|
|
64
61
|
trustgraph/base/metrics.py
|
|
65
62
|
trustgraph/base/parameter_spec.py
|
|
66
63
|
trustgraph/base/processor_group.py
|
|
67
|
-
trustgraph/base/producer.py
|
|
68
64
|
trustgraph/base/producer_spec.py
|
|
69
65
|
trustgraph/base/prompt_client.py
|
|
70
|
-
trustgraph/base/publisher.py
|
|
71
66
|
trustgraph/base/pubsub.py
|
|
72
|
-
trustgraph/base/pulsar_backend.py
|
|
73
67
|
trustgraph/base/qdrant_config.py
|
|
74
|
-
trustgraph/base/rabbitmq_backend.py
|
|
75
68
|
trustgraph/base/receiver_pool.py
|
|
76
69
|
trustgraph/base/request_response_client.py
|
|
77
70
|
trustgraph/base/request_response_spec.py
|
|
@@ -83,8 +76,6 @@ trustgraph/base/sender_pool.py
|
|
|
83
76
|
trustgraph/base/serialization.py
|
|
84
77
|
trustgraph/base/spec.py
|
|
85
78
|
trustgraph/base/structured_query_client.py
|
|
86
|
-
trustgraph/base/subscriber.py
|
|
87
|
-
trustgraph/base/subscriber_spec.py
|
|
88
79
|
trustgraph/base/text_completion_client.py
|
|
89
80
|
trustgraph/base/tool_client.py
|
|
90
81
|
trustgraph/base/tool_service.py
|
|
@@ -93,19 +84,6 @@ trustgraph/base/triples_client.py
|
|
|
93
84
|
trustgraph/base/triples_query_service.py
|
|
94
85
|
trustgraph/base/triples_store_service.py
|
|
95
86
|
trustgraph/base/workspace_processor.py
|
|
96
|
-
trustgraph/clients/__init__.py
|
|
97
|
-
trustgraph/clients/agent_client.py
|
|
98
|
-
trustgraph/clients/base.py
|
|
99
|
-
trustgraph/clients/config_client.py
|
|
100
|
-
trustgraph/clients/document_embeddings_client.py
|
|
101
|
-
trustgraph/clients/document_rag_client.py
|
|
102
|
-
trustgraph/clients/embeddings_client.py
|
|
103
|
-
trustgraph/clients/graph_embeddings_client.py
|
|
104
|
-
trustgraph/clients/graph_rag_client.py
|
|
105
|
-
trustgraph/clients/llm_client.py
|
|
106
|
-
trustgraph/clients/prompt_client.py
|
|
107
|
-
trustgraph/clients/row_embeddings_client.py
|
|
108
|
-
trustgraph/clients/triples_query_client.py
|
|
109
87
|
trustgraph/i18n/__init__.py
|
|
110
88
|
trustgraph/i18n/packs/__init__.py
|
|
111
89
|
trustgraph/i18n/packs/ar.json
|