trustgraph-base 0.19.4__tar.gz → 0.19.5__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.19.4 → trustgraph-base-0.19.5}/PKG-INFO +2 -2
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/api/api.py +29 -0
- trustgraph-base-0.19.5/trustgraph/base_version.py +1 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/document_embeddings_client.py +5 -1
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/documents.py +17 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph_base.egg-info/PKG-INFO +2 -2
- trustgraph-base-0.19.4/trustgraph/base_version.py +0 -1
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/README.md +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/setup.cfg +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/setup.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/api/__init__.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/base/__init__.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/base/base_processor.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/base/consumer.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/base/consumer_producer.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/base/producer.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/__init__.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/agent_client.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/base.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/document_rag_client.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/embeddings_client.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/graph_embeddings_client.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/graph_rag_client.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/llm_client.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/prompt_client.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/triples_query_client.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/exceptions.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/knowledge/__init__.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/knowledge/defs.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/knowledge/document.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/knowledge/identifier.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/knowledge/organization.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/knowledge/publication.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/log_level.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/objects/__init__.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/objects/field.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/objects/object.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/rdf.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/__init__.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/agent.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/graph.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/lookup.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/metadata.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/models.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/object.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/prompt.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/retrieval.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/topic.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/schema/types.py +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph_base.egg-info/SOURCES.txt +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph_base.egg-info/dependency_links.txt +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph_base.egg-info/requires.txt +0 -0
- {trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph_base.egg-info/top_level.txt +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-base
|
3
|
-
Version: 0.19.
|
3
|
+
Version: 0.19.5
|
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
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.19.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.19.5.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -131,6 +131,35 @@ class Api:
|
|
131
131
|
except:
|
132
132
|
raise ProtocolException(f"Response not formatted correctly")
|
133
133
|
|
134
|
+
def document_rag(self, question):
|
135
|
+
|
136
|
+
# The input consists of a question
|
137
|
+
input = {
|
138
|
+
"query": question
|
139
|
+
}
|
140
|
+
|
141
|
+
url = f"{self.url}document-rag"
|
142
|
+
|
143
|
+
# Invoke the API, input is passed as JSON
|
144
|
+
resp = requests.post(url, json=input)
|
145
|
+
|
146
|
+
# Should be a 200 status code
|
147
|
+
if resp.status_code != 200:
|
148
|
+
raise ProtocolException(f"Status code {resp.status_code}")
|
149
|
+
|
150
|
+
try:
|
151
|
+
# Parse the response as JSON
|
152
|
+
object = resp.json()
|
153
|
+
except:
|
154
|
+
raise ProtocolException(f"Expected JSON response")
|
155
|
+
|
156
|
+
self.check_error(resp)
|
157
|
+
|
158
|
+
try:
|
159
|
+
return object["response"]
|
160
|
+
except:
|
161
|
+
raise ProtocolException(f"Response not formatted correctly")
|
162
|
+
|
134
163
|
def embeddings(self, text):
|
135
164
|
|
136
165
|
# The input consists of a text block
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.19.5"
|
{trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/document_embeddings_client.py
RENAMED
@@ -38,8 +38,12 @@ class DocumentEmbeddingsClient(BaseClient):
|
|
38
38
|
output_schema=DocumentEmbeddingsResponse,
|
39
39
|
)
|
40
40
|
|
41
|
-
def request(
|
41
|
+
def request(
|
42
|
+
self, vectors, user="trustgraph", collection="default",
|
43
|
+
limit=10, timeout=300
|
44
|
+
):
|
42
45
|
return self.call(
|
46
|
+
user=user, collection=collection,
|
43
47
|
vectors=vectors, limit=limit, timeout=timeout
|
44
48
|
).documents
|
45
49
|
|
@@ -35,11 +35,28 @@ chunk_ingest_queue = topic('chunk-load')
|
|
35
35
|
|
36
36
|
############################################################################
|
37
37
|
|
38
|
+
# Document embeddings are embeddings associated with a chunk
|
39
|
+
|
40
|
+
class ChunkEmbeddings(Record):
|
41
|
+
chunk = Bytes()
|
42
|
+
vectors = Array(Array(Double()))
|
43
|
+
|
44
|
+
# This is a 'batching' mechanism for the above data
|
45
|
+
class DocumentEmbeddings(Record):
|
46
|
+
metadata = Metadata()
|
47
|
+
chunks = Array(ChunkEmbeddings())
|
48
|
+
|
49
|
+
document_embeddings_store_queue = topic('document-embeddings-store')
|
50
|
+
|
51
|
+
############################################################################
|
52
|
+
|
38
53
|
# Doc embeddings query
|
39
54
|
|
40
55
|
class DocumentEmbeddingsRequest(Record):
|
41
56
|
vectors = Array(Array(Double()))
|
42
57
|
limit = Integer()
|
58
|
+
user = String()
|
59
|
+
collection = String()
|
43
60
|
|
44
61
|
class DocumentEmbeddingsResponse(Record):
|
45
62
|
error = Error()
|
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-base
|
3
|
-
Version: 0.19.
|
3
|
+
Version: 0.19.5
|
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
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.19.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.19.5.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.19.4"
|
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.19.4 → trustgraph-base-0.19.5}/trustgraph/clients/graph_embeddings_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/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
|
{trustgraph-base-0.19.4 → trustgraph-base-0.19.5}/trustgraph_base.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|