trustgraph-base 0.23.17__tar.gz → 0.23.19__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-0.23.17 → trustgraph-base-0.23.19}/PKG-INFO +2 -2
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/api/knowledge.py +26 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/consumer.py +7 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/subscriber.py +17 -16
- trustgraph-base-0.23.19/trustgraph/base_version.py +1 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/knowledge.py +9 -1
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph_base.egg-info/PKG-INFO +2 -2
- trustgraph-base-0.23.17/trustgraph/base_version.py +0 -1
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/README.md +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/setup.cfg +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/setup.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/api/__init__.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/api/api.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/api/config.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/api/exceptions.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/api/flow.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/api/library.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/api/types.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/__init__.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/agent_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/agent_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/async_processor.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/consumer_spec.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/document_embeddings_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/document_embeddings_query_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/document_embeddings_store_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/embeddings_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/embeddings_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/flow.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/flow_processor.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/graph_embeddings_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/graph_embeddings_query_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/graph_embeddings_store_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/graph_rag_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/llm_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/metrics.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/producer.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/producer_spec.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/prompt_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/publisher.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/pubsub.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/request_response_spec.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/setting_spec.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/spec.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/subscriber_spec.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/text_completion_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/triples_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/triples_query_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/triples_store_service.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/__init__.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/agent_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/base.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/config_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/document_embeddings_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/document_rag_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/embeddings_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/graph_embeddings_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/graph_rag_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/llm_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/prompt_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/triples_query_client.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/exceptions.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/knowledge/__init__.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/knowledge/defs.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/knowledge/document.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/knowledge/identifier.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/knowledge/organization.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/knowledge/publication.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/log_level.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/objects/__init__.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/objects/field.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/objects/object.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/rdf.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/__init__.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/agent.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/config.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/documents.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/flows.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/graph.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/library.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/lookup.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/metadata.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/models.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/object.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/prompt.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/retrieval.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/topic.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/schema/types.py +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph_base.egg-info/SOURCES.txt +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph_base.egg-info/dependency_links.txt +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph_base.egg-info/requires.txt +0 -0
- {trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph_base.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-base
|
3
|
-
Version: 0.23.
|
3
|
+
Version: 0.23.19
|
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
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.19.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -39,3 +39,29 @@ class Knowledge:
|
|
39
39
|
|
40
40
|
self.request(request = input)
|
41
41
|
|
42
|
+
def load_kg_core(self, id, user="trustgraph", flow="0000",
|
43
|
+
collection="default"):
|
44
|
+
|
45
|
+
# The input consists of system and prompt strings
|
46
|
+
input = {
|
47
|
+
"operation": "load-kg-core",
|
48
|
+
"user": user,
|
49
|
+
"id": id,
|
50
|
+
"flow": flow,
|
51
|
+
"collection": collection,
|
52
|
+
}
|
53
|
+
|
54
|
+
self.request(request = input)
|
55
|
+
|
56
|
+
def unload_kg_core(self, id, user="trustgraph", flow="0000"):
|
57
|
+
|
58
|
+
# The input consists of system and prompt strings
|
59
|
+
input = {
|
60
|
+
"operation": "unload-kg-core",
|
61
|
+
"user": user,
|
62
|
+
"id": id,
|
63
|
+
"flow": flow,
|
64
|
+
}
|
65
|
+
|
66
|
+
self.request(request = input)
|
67
|
+
|
@@ -45,7 +45,9 @@ class Consumer:
|
|
45
45
|
|
46
46
|
if hasattr(self, "consumer"):
|
47
47
|
if self.consumer:
|
48
|
+
self.consumer.unsubscribe()
|
48
49
|
self.consumer.close()
|
50
|
+
self.consumer = None
|
49
51
|
|
50
52
|
async def stop(self):
|
51
53
|
|
@@ -108,11 +110,16 @@ class Consumer:
|
|
108
110
|
except Exception as e:
|
109
111
|
|
110
112
|
print("consumer loop exception:", e, flush=True)
|
113
|
+
self.consumer.unsubscribe()
|
111
114
|
self.consumer.close()
|
112
115
|
self.consumer = None
|
113
116
|
await asyncio.sleep(self.reconnect_time)
|
114
117
|
continue
|
115
118
|
|
119
|
+
if self.consumer:
|
120
|
+
self.consumer.unsubscribe()
|
121
|
+
self.consumer.close()
|
122
|
+
|
116
123
|
async def consume(self):
|
117
124
|
|
118
125
|
while self.running:
|
@@ -21,10 +21,21 @@ class Subscriber:
|
|
21
21
|
self.metrics = metrics
|
22
22
|
self.task = None
|
23
23
|
|
24
|
+
self.consumer = None
|
25
|
+
|
24
26
|
def __del__(self):
|
27
|
+
|
25
28
|
self.running = False
|
26
29
|
|
27
30
|
async def start(self):
|
31
|
+
|
32
|
+
self.consumer = self.client.subscribe(
|
33
|
+
topic = self.topic,
|
34
|
+
subscription_name = self.subscription,
|
35
|
+
consumer_name = self.consumer_name,
|
36
|
+
schema = JsonSchema(self.schema),
|
37
|
+
)
|
38
|
+
|
28
39
|
self.task = asyncio.create_task(self.run())
|
29
40
|
|
30
41
|
async def stop(self):
|
@@ -41,8 +52,6 @@ class Subscriber:
|
|
41
52
|
|
42
53
|
async def run(self):
|
43
54
|
|
44
|
-
consumer = None
|
45
|
-
|
46
55
|
while self.running:
|
47
56
|
|
48
57
|
if self.metrics:
|
@@ -50,15 +59,6 @@ class Subscriber:
|
|
50
59
|
|
51
60
|
try:
|
52
61
|
|
53
|
-
# FIXME: Create consumer in start method so we know
|
54
|
-
# it is definitely running when start completes
|
55
|
-
consumer = self.client.subscribe(
|
56
|
-
topic = self.topic,
|
57
|
-
subscription_name = self.subscription,
|
58
|
-
consumer_name = self.consumer_name,
|
59
|
-
schema = JsonSchema(self.schema),
|
60
|
-
)
|
61
|
-
|
62
62
|
if self.metrics:
|
63
63
|
self.metrics.state("running")
|
64
64
|
|
@@ -68,7 +68,7 @@ class Subscriber:
|
|
68
68
|
|
69
69
|
try:
|
70
70
|
msg = await asyncio.to_thread(
|
71
|
-
consumer.receive,
|
71
|
+
self.consumer.receive,
|
72
72
|
timeout_millis=250
|
73
73
|
)
|
74
74
|
except _pulsar.Timeout:
|
@@ -82,7 +82,7 @@ class Subscriber:
|
|
82
82
|
self.metrics.received()
|
83
83
|
|
84
84
|
# Acknowledge successful reception of the message
|
85
|
-
consumer.acknowledge(msg)
|
85
|
+
self.consumer.acknowledge(msg)
|
86
86
|
|
87
87
|
try:
|
88
88
|
id = msg.properties()["id"]
|
@@ -124,9 +124,10 @@ class Subscriber:
|
|
124
124
|
|
125
125
|
finally:
|
126
126
|
|
127
|
-
if consumer:
|
128
|
-
consumer.
|
129
|
-
consumer
|
127
|
+
if self.consumer:
|
128
|
+
self.consumer.unsubscribe()
|
129
|
+
self.consumer.close()
|
130
|
+
self.consumer = None
|
130
131
|
|
131
132
|
|
132
133
|
if self.metrics:
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.23.19"
|
@@ -25,14 +25,22 @@ from . graph import Triples, GraphEmbeddings
|
|
25
25
|
class KnowledgeRequest(Record):
|
26
26
|
|
27
27
|
# get-kg-core, delete-kg-core, list-kg-cores, put-kg-core
|
28
|
+
# load-kg-core, unload-kg-core
|
28
29
|
operation = String()
|
29
30
|
|
30
31
|
# list-kg-cores, delete-kg-core, put-kg-core
|
31
32
|
user = String()
|
32
33
|
|
33
|
-
# get-kg-core, list-kg-cores, delete-kg-core, put-kg-core
|
34
|
+
# get-kg-core, list-kg-cores, delete-kg-core, put-kg-core,
|
35
|
+
# load-kg-core, unload-kg-core
|
34
36
|
id = String()
|
35
37
|
|
38
|
+
# load-kg-core
|
39
|
+
flow = String()
|
40
|
+
|
41
|
+
# load-kg-core
|
42
|
+
collection = String()
|
43
|
+
|
36
44
|
# put-kg-core
|
37
45
|
triples = Triples()
|
38
46
|
graph_embeddings = GraphEmbeddings()
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-base
|
3
|
-
Version: 0.23.
|
3
|
+
Version: 0.23.19
|
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
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.
|
6
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.23.19.tar.gz
|
7
7
|
Author: trustgraph.ai
|
8
8
|
Author-email: security@trustgraph.ai
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.23.17"
|
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
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/document_embeddings_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/graph_embeddings_client.py
RENAMED
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
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/request_response_spec.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/text_completion_client.py
RENAMED
File without changes
|
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/triples_query_service.py
RENAMED
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/base/triples_store_service.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/document_embeddings_client.py
RENAMED
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/document_rag_client.py
RENAMED
File without changes
|
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/graph_embeddings_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph/clients/triples_query_client.py
RENAMED
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.23.17 → trustgraph-base-0.23.19}/trustgraph_base.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|