graphrag_sdk 0.3.2__tar.gz → 0.3.3__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.
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/PKG-INFO +1 -1
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/attribute.py +4 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/helpers.py +11 -6
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/pyproject.toml +1 -1
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/LICENSE +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/README.md +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/__init__.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/agents/__init__.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/agents/agent.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/agents/kg_agent.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/chat_session.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/document.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/document_loaders/__init__.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/document_loaders/csv.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/document_loaders/html.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/document_loaders/jsonl.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/document_loaders/pdf.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/document_loaders/text.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/document_loaders/url.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/entity.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/fixtures/prompts.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/fixtures/regex.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/kg.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/model_config.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/models/__init__.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/models/azure_openai.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/models/gemini.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/models/model.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/models/ollama.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/models/openai.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/ontology.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/__init__.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/execution_plan.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/orchestrator.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/orchestrator_decision.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/orchestrator_runner.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/step.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/step_result.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/steps/__init__.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/steps/agent.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/steps/parallel.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/steps/summary.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/steps/user_input.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/relation.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/source.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/steps/Step.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/steps/create_ontology_step.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/steps/extract_data_step.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/steps/graph_query_step.py +0 -0
- {graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/steps/qa_step.py +0 -0
|
@@ -14,6 +14,7 @@ class AttributeType:
|
|
|
14
14
|
STRING = "string"
|
|
15
15
|
NUMBER = "number"
|
|
16
16
|
BOOLEAN = "boolean"
|
|
17
|
+
LIST = "list"
|
|
17
18
|
|
|
18
19
|
@staticmethod
|
|
19
20
|
def from_string(txt: str):
|
|
@@ -35,6 +36,8 @@ class AttributeType:
|
|
|
35
36
|
return AttributeType.NUMBER
|
|
36
37
|
if txt.lower() == AttributeType.BOOLEAN:
|
|
37
38
|
return AttributeType.BOOLEAN
|
|
39
|
+
if txt.lower() == AttributeType.LIST:
|
|
40
|
+
return AttributeType.LIST
|
|
38
41
|
raise Exception(f"Invalid attribute type: {txt}")
|
|
39
42
|
|
|
40
43
|
|
|
@@ -121,6 +124,7 @@ class Attribute:
|
|
|
121
124
|
AttributeType.STRING,
|
|
122
125
|
AttributeType.NUMBER,
|
|
123
126
|
AttributeType.BOOLEAN,
|
|
127
|
+
AttributeType.LIST,
|
|
124
128
|
]:
|
|
125
129
|
raise Exception(f"Invalid attribute type: {attr_type}")
|
|
126
130
|
|
|
@@ -123,11 +123,16 @@ def validate_cypher_relations_exist(cypher: str, ontology: graphrag_sdk.Ontology
|
|
|
123
123
|
# Check if relations exist in ontology
|
|
124
124
|
not_found_relation_labels = []
|
|
125
125
|
relation_labels = re.findall(r"\[:(.*?)\]", cypher)
|
|
126
|
-
for
|
|
127
|
-
label
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
for relation in relation_labels:
|
|
127
|
+
for label in relation.split("|"):
|
|
128
|
+
max_idx = min(
|
|
129
|
+
label.index("*") if "*" in label else len(label),
|
|
130
|
+
label.index("{") if "{" in label else len(label),
|
|
131
|
+
label.index("]") if "]" in label else len(label),
|
|
132
|
+
)
|
|
133
|
+
label = label[:max_idx]
|
|
134
|
+
if label not in [relation.label for relation in ontology.relations]:
|
|
135
|
+
not_found_relation_labels.append(label)
|
|
131
136
|
|
|
132
137
|
return [
|
|
133
138
|
f"Relation {label} not found in ontology" for label in not_found_relation_labels
|
|
@@ -144,7 +149,7 @@ def validate_cypher_relation_directions(
|
|
|
144
149
|
for relation in relations:
|
|
145
150
|
try:
|
|
146
151
|
relation_label = (
|
|
147
|
-
re.search(r"(?:\[)(?:\w)*(?:\:)([
|
|
152
|
+
re.search(r"(?:\[)(?:\w)*(?:\:)([^\d\{\]\*\.\:]+)", relation.group(0))
|
|
148
153
|
.group(1)
|
|
149
154
|
.strip()
|
|
150
155
|
)
|
|
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
|
|
File without changes
|
{graphrag_sdk-0.3.2 → graphrag_sdk-0.3.3}/graphrag_sdk/orchestrator/orchestrator_decision.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
|