Praxos-python 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.
- {praxos_python-0.3.2 → praxos_python-0.3.3}/.gitignore +3 -1
- {praxos_python-0.3.2 → praxos_python-0.3.3}/PKG-INFO +1 -1
- {praxos_python-0.3.2 → praxos_python-0.3.3}/pyproject.toml +1 -1
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/environment.py +22 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/INSTALL.md +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/LICENSE +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/README.md +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/__init__.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/client.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/config.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/exceptions.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/__init__.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/context.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/ontology.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/source.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/types/__init__.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/types/message.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/utils.py +0 -0
- {praxos_python-0.3.2 → praxos_python-0.3.3}/test_intelligent_search.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "Praxos-python"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.3"
|
|
4
4
|
description = "Python SDK for Praxos with Intelligent Search"
|
|
5
5
|
authors = [{ name = "Masoud Kermani Poor", email = "masoud@praxos.ai" }, {name = "Soheil Sadabadi", email = "soheil@praxos.ai"}]
|
|
6
6
|
readme = "README.md"
|
|
@@ -676,6 +676,28 @@ class SyncEnvironment(BaseEnvironmentAttributes):
|
|
|
676
676
|
json_data=payload
|
|
677
677
|
)
|
|
678
678
|
return SyncSource(client=self._client, **response_data)
|
|
679
|
+
|
|
680
|
+
def enrich(self, node_ids: Union[str, List[str]], k: int = 2) -> Dict[str, Any]:
|
|
681
|
+
"""
|
|
682
|
+
Enriches a given node or list of nodes by finding the closest entity and retrieving all entities up to k hops away.
|
|
683
|
+
|
|
684
|
+
Args:
|
|
685
|
+
node_ids: A single node ID or a list of node IDs to enrich.
|
|
686
|
+
k: The number of hops to traverse for enrichment.
|
|
687
|
+
|
|
688
|
+
Returns:
|
|
689
|
+
A dictionary containing the enriched data for each node.
|
|
690
|
+
"""
|
|
691
|
+
if not node_ids:
|
|
692
|
+
raise ValueError("node_ids cannot be empty")
|
|
693
|
+
|
|
694
|
+
payload = {
|
|
695
|
+
"node_ids": node_ids,
|
|
696
|
+
"k": k,
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
response_data = self._client._request("POST", "/enrich", json_data=payload)
|
|
700
|
+
return response_data
|
|
679
701
|
|
|
680
702
|
def get_sources(self) -> List[SyncSource]:
|
|
681
703
|
"""Gets all sources for the environment."""
|
|
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
|