Suggest Edits Endpoint
POST/api/v1/reports/:report_id/suggest_edits
Suggest edits to a report based on user query and chat history.
Request
Path Parameters
Query Parameters
Cookie Parameters
- application/json
Body
required
Array [
Array [
- TextBlock
- ImageBlock
- MOD1
- MOD1
- MOD1
- MOD2
- MOD1
- MOD1
]
]
chat_history
object[]
required
Message role.
Possible values: [system
, user
, assistant
, function
, tool
, chatbot
, model
]
user
blocks
object[]
oneOf
text
image
image
object
anyOf
string
path
object
anyOf
string
url
object
anyOf
string
Possible values: non-empty
string
image_mimetype
object
anyOf
string
detail
object
anyOf
string
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
Array [
- MOD1
Array [
]
- RelatedNodeInfo
- MOD2
- ObjectType
- MOD2
- MOD1
Array [
- ObjectType
- MOD2
- MOD1
]
- MOD1
- MOD1
- MOD1
]
]
]
blocks
object[]
required
The index of the block
The content of the block
sources
object[]
The sources for the block
node
object
required
Provided for backward compatibility.
Note: we keep the field with the typo "seperator" to maintain backward compatibility for serialized objects.
Unique ID of the node.
embedding
object
Embedding of the node.
anyOf
number
A flat dictionary of metadata fields
Metadata keys that are excluded from text for the embed model.
Metadata keys that are excluded from text for the LLM.
relationships
object
A mapping of relationships to other node information.
property name*
object
anyOf
node_type
object
anyOf
string
Possible values: [1
, 2
, 3
, 4
, 5
]
string
hash
object
anyOf
string
RelatedNodeInfo
node_type
object
anyOf
string
Possible values: [1
, 2
, 3
, 4
, 5
]
string
hash
object
anyOf
string
RelatedNodeInfo
Template for how metadata is formatted, with {key} and {value} placeholders.
{key}: {value}
Separator between metadata fields when converting to string.
Text content of the node.
MIME type of the node content.
text/plain
start_char_idx
object
Start char index of the node.
anyOf
integer
end_char_idx
object
End char index of the node.
anyOf
integer
Separator between metadata fields when converting to string.
Template for how text is formatted, with {content} and {metadata_str} placeholders.
{metadata_str}
{content}
TextNode
score
object
anyOf
number
TextNodeWithScore
[
{
"justification": "string",
"start_line": 0,
"end_line": 0,
"blocks": [
{
"idx": 0,
"template": "string",
"sources": [
{
"node": {
"id_": "string",
"embedding": [
null
],
"extra_info": {},
"excluded_embed_metadata_keys": [
"string"
],
"excluded_llm_metadata_keys": [
"string"
],
"relationships": {},
"metadata_template": "{key}: {value}",
"metadata_separator": "\n",
"text": "string",
"mimetype": "text/plain",
"start_char_idx": 0,
"end_char_idx": 0,
"metadata_seperator": "\n",
"text_template": "{metadata_str}\n\n{content}",
"class_name": "TextNode"
},
"score": 0,
"class_name": "TextNodeWithScore"
}
]
}
]
}
]
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}