Semantic graph
identify all nodes who is concerned by a query as context. Take care, if you select need_content=False, documents will retrieve you a List[str] who is a list of document ids. Else it will retrieve you a list of {id: str, content: List[str]} who represent the partial document involved by the node
Body
queryany ofOptional
stringOptional
nullOptional
need_documentsany ofOptionalDefault:
false
booleanOptional
nullOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/semantic-graph/identify-nodes HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 39
{
"query": "text",
"need_documents": false
}
{
"response": [
{
"id": "text",
"node_1": "text",
"node_2": "text",
"edge": "text",
"documents": [
{
"id": "text",
"content": [
"text"
]
}
]
}
]
}
List all nodes
Body
offsetany ofOptionalDefault:
0
integerOptional
nullOptional
limitany ofOptionalDefault:
50
integerOptional
nullOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/semantic-graph/nodes HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 23
{
"offset": 0,
"limit": 50
}
{
"response": [
{
"id": "text",
"node_1": "text",
"node_2": "text",
"edge": "text",
"extraproperties": {
"documents": [
"text"
],
"chunks": [
"text"
],
"count": 1
}
}
]
}
label is the value of node_1 or node_2 in a semantic node
Body
labelany ofOptionalDefault:
""
stringOptional
nullOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/semantic-graph/nodes-by-label HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 12
{
"label": ""
}
{
"response": [
{
"id": "text",
"node_1": "text",
"node_2": "text",
"edge": "text",
"extraproperties": {
"documents": [
"text"
],
"chunks": [
"text"
],
"count": 1
}
}
]
}
Last updated