trustgraph 0.2.3__tar.gz → 0.2.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.

Potentially problematic release.


This version of trustgraph might be problematic. Click here for more details.

Files changed (94) hide show
  1. {trustgraph-0.2.3 → trustgraph-0.2.4}/PKG-INFO +4 -4
  2. {trustgraph-0.2.3 → trustgraph-0.2.4}/README.md +2 -2
  3. {trustgraph-0.2.3 → trustgraph-0.2.4}/setup.py +1 -1
  4. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/graph_rag.py +2 -0
  5. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/triple_vectors.py +17 -9
  6. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/trustgraph.py +1 -1
  7. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph.egg-info/PKG-INFO +4 -4
  8. {trustgraph-0.2.3 → trustgraph-0.2.4}/LICENSE +0 -0
  9. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/chunker-recursive +0 -0
  10. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/embeddings-hf +0 -0
  11. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/embeddings-ollama +0 -0
  12. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/embeddings-vectorize +0 -0
  13. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/graph-rag +0 -0
  14. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/graph-show +0 -0
  15. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/graph-to-turtle +0 -0
  16. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/graph-write-cassandra +0 -0
  17. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/init-pulsar-manager +0 -0
  18. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/kg-extract-definitions +0 -0
  19. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/kg-extract-relationships +0 -0
  20. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/llm-azure-text +0 -0
  21. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/llm-claude-text +0 -0
  22. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/llm-ollama-text +0 -0
  23. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/llm-vertexai-text +0 -0
  24. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/loader +0 -0
  25. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/pdf-decoder +0 -0
  26. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/query +0 -0
  27. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/run-processing +0 -0
  28. {trustgraph-0.2.3 → trustgraph-0.2.4}/scripts/vector-write-milvus +0 -0
  29. {trustgraph-0.2.3 → trustgraph-0.2.4}/setup.cfg +0 -0
  30. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/__init__.py +0 -0
  31. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/chunker/__init__.py +0 -0
  32. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/chunker/recursive/__init__.py +0 -0
  33. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/chunker/recursive/__main__.py +0 -0
  34. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/chunker/recursive/chunker.py +0 -0
  35. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/decoder/__init__.py +0 -0
  36. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/decoder/pdf/__init__.py +0 -0
  37. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/decoder/pdf/__main__.py +0 -0
  38. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/decoder/pdf/pdf_decoder.py +0 -0
  39. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/__init__.py +0 -0
  40. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/hf/__init__.py +0 -0
  41. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/hf/__main__.py +0 -0
  42. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/hf/hf.py +0 -0
  43. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/ollama/__init__.py +0 -0
  44. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/ollama/__main__.py +0 -0
  45. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/ollama/processor.py +0 -0
  46. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/vectorize/__init__.py +0 -0
  47. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/vectorize/__main__.py +0 -0
  48. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings/vectorize/vectorize.py +0 -0
  49. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/embeddings_client.py +0 -0
  50. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/graph/__init__.py +0 -0
  51. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/graph/cassandra_write/__init__.py +0 -0
  52. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/graph/cassandra_write/__main__.py +0 -0
  53. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/graph/cassandra_write/write.py +0 -0
  54. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/graph_rag_client.py +0 -0
  55. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/kg/__init__.py +0 -0
  56. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/kg/extract_definitions/__init__.py +0 -0
  57. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/kg/extract_definitions/__main__.py +0 -0
  58. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/kg/extract_definitions/extract.py +0 -0
  59. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/kg/extract_relationships/__init__.py +0 -0
  60. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/kg/extract_relationships/__main__.py +0 -0
  61. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/kg/extract_relationships/extract.py +0 -0
  62. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/__init__.py +0 -0
  63. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/azure_text/__init__.py +0 -0
  64. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/azure_text/__main__.py +0 -0
  65. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/azure_text/llm.py +0 -0
  66. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/claude_text/__init__.py +0 -0
  67. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/claude_text/__main__.py +0 -0
  68. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/claude_text/llm.py +0 -0
  69. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/ollama_text/__init__.py +0 -0
  70. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/ollama_text/__main__.py +0 -0
  71. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/ollama_text/llm.py +0 -0
  72. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/vertexai_text/__init__.py +0 -0
  73. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/vertexai_text/__main__.py +0 -0
  74. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm/vertexai_text/llm.py +0 -0
  75. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/llm_client.py +0 -0
  76. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/log_level.py +0 -0
  77. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/processing/__init__.py +0 -0
  78. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/processing/__main__.py +0 -0
  79. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/processing/processing.py +0 -0
  80. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/prompts.py +0 -0
  81. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/rag/__init__.py +0 -0
  82. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/rag/graph/__init__.py +0 -0
  83. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/rag/graph/__main__.py +0 -0
  84. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/rag/graph/rag.py +0 -0
  85. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/rdf.py +0 -0
  86. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/schema.py +0 -0
  87. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/vector/__init__.py +0 -0
  88. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/vector/milvus_write/__init__.py +0 -0
  89. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/vector/milvus_write/__main__.py +0 -0
  90. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph/vector/milvus_write/write.py +0 -0
  91. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph.egg-info/SOURCES.txt +0 -0
  92. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph.egg-info/dependency_links.txt +0 -0
  93. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph.egg-info/requires.txt +0 -0
  94. {trustgraph-0.2.3 → trustgraph-0.2.4}/trustgraph.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trustgraph
3
- Version: 0.2.3
3
+ Version: 0.2.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
  Home-page: https://github.com/trustgraph-ai/trustgraph
6
- Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.2.3.tar.gz
6
+ Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.2.4.tar.gz
7
7
  Author: trustgraph.ai
8
8
  Author-email: security@trustgraph.ai
9
9
  Classifier: Programming Language :: Python :: 3
@@ -124,11 +124,11 @@ package installed can also run the entire architecture.
124
124
  - `llm-ollama-text` - Sends request to LM running using Ollama
125
125
  - `llm-vertexai-text` - Sends request to model available through VertexAI API
126
126
 
127
- ## Getting start
127
+ ## Quickstart Guide
128
128
 
129
129
  See [Quickstart on Docker Compose](docs/README.quickstart-docker-compose.md)
130
130
 
131
- ## Development
131
+ ## Development Guide
132
132
 
133
133
  See [Development on trustgraph](docs/README.development.md)
134
134
 
@@ -90,11 +90,11 @@ package installed can also run the entire architecture.
90
90
  - `llm-ollama-text` - Sends request to LM running using Ollama
91
91
  - `llm-vertexai-text` - Sends request to model available through VertexAI API
92
92
 
93
- ## Getting start
93
+ ## Quickstart Guide
94
94
 
95
95
  See [Quickstart on Docker Compose](docs/README.quickstart-docker-compose.md)
96
96
 
97
- ## Development
97
+ ## Development Guide
98
98
 
99
99
  See [Development on trustgraph](docs/README.development.md)
100
100
 
@@ -4,7 +4,7 @@ import os
4
4
  with open("README.md", "r") as fh:
5
5
  long_description = fh.read()
6
6
 
7
- version = "0.2.3"
7
+ version = "0.2.4"
8
8
 
9
9
  setuptools.setup(
10
10
  name="trustgraph",
@@ -74,6 +74,8 @@ class GraphRag:
74
74
  limit=self.entity_limit
75
75
  )
76
76
 
77
+ print("Obtained", len(res), "entities")
78
+
77
79
  entities = set([
78
80
  item["entity"]["entity"]
79
81
  for item in res
@@ -1,5 +1,6 @@
1
1
 
2
2
  from pymilvus import MilvusClient, CollectionSchema, FieldSchema, DataType
3
+ import time
3
4
 
4
5
  class TripleVectors:
5
6
 
@@ -13,11 +14,12 @@ class TripleVectors:
13
14
  # one are created.
14
15
  self.collections = {}
15
16
 
16
- # self.collection = "edges"
17
- # self.dimension = 384
17
+ # Time between reloads
18
+ self.reload_time = 90
18
19
 
19
- # if not self.client.has_collection(collection_name=self.collection):
20
- # self.init_collection()
20
+ # Next time to reload - this forces a reload at next window
21
+ self.next_reload = time.time() + self.reload_time
22
+ print("Reload at", self.next_reload)
21
23
 
22
24
  def init_collection(self, dimension):
23
25
 
@@ -106,10 +108,13 @@ class TripleVectors:
106
108
  }
107
109
  }
108
110
 
111
+ print("Loading...")
109
112
  self.client.load_collection(
110
113
  collection_name=coll,
111
114
  )
112
115
 
116
+ print("Searching...")
117
+
113
118
  res = self.client.search(
114
119
  collection_name=coll,
115
120
  data=[embeds],
@@ -118,11 +123,14 @@ class TripleVectors:
118
123
  search_params=search_params,
119
124
  )[0]
120
125
 
121
- # FIXME: a lot of loading/unloading going on. How about using a
122
- # time window?
123
- self.client.release_collection(
124
- collection_name=coll,
125
- )
126
+
127
+ # If reload time has passed, unload collection
128
+ if time.time() > self.next_reload:
129
+ print("Unloading, reload at", self.next_reload)
130
+ self.client.release_collection(
131
+ collection_name=coll,
132
+ )
133
+ self.next_reload = time.time() + self.reload_time
126
134
 
127
135
  return res
128
136
 
@@ -39,7 +39,7 @@ class TrustGraph:
39
39
  s text,
40
40
  p text,
41
41
  o text,
42
- PRIMARY KEY (s, p)
42
+ PRIMARY KEY (s, p, o)
43
43
  );
44
44
  """);
45
45
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trustgraph
3
- Version: 0.2.3
3
+ Version: 0.2.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
  Home-page: https://github.com/trustgraph-ai/trustgraph
6
- Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.2.3.tar.gz
6
+ Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.2.4.tar.gz
7
7
  Author: trustgraph.ai
8
8
  Author-email: security@trustgraph.ai
9
9
  Classifier: Programming Language :: Python :: 3
@@ -124,11 +124,11 @@ package installed can also run the entire architecture.
124
124
  - `llm-ollama-text` - Sends request to LM running using Ollama
125
125
  - `llm-vertexai-text` - Sends request to model available through VertexAI API
126
126
 
127
- ## Getting start
127
+ ## Quickstart Guide
128
128
 
129
129
  See [Quickstart on Docker Compose](docs/README.quickstart-docker-compose.md)
130
130
 
131
- ## Development
131
+ ## Development Guide
132
132
 
133
133
  See [Development on trustgraph](docs/README.development.md)
134
134
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes