Skip to content

Commit

Permalink
feat(llm): add post method for paths-api (apache#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJs133 authored Feb 7, 2025
1 parent 88264e7 commit 1c9bb5e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions hugegraph-python-client/src/pyhugegraph/api/traverser.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ def multi_node_shortest_path(
def paths(self, source_id, target_id, max_depth): # pylint: disable=unused-argument
return self._invoke_request()

@router.http("POST", 'traversers/paths')
def advanced_paths(
self, sources, targets, step, max_depth, nearest=True, capacity=10000000, limit=10, with_vertex=False
):
return self._invoke_request(
data=json.dumps(
{
"sources": sources,
"targets": targets,
"step": step,
"max_depth": max_depth,
"nearest": nearest,
"capacity": capacity,
"limit": limit,
"with_vertex": with_vertex,
}
)
)


@router.http("POST", "traversers/customizedpaths")
def customized_paths(
self, sources, steps, sort_by="INCR", with_vertex=True, capacity=-1, limit=-1
Expand Down

0 comments on commit 1c9bb5e

Please sign in to comment.