Skip to main content

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

    report_id uuidrequired

Query Parameters

    project_id any
    organization_id any

Cookie Parameters

    session any

Body

required

    user_query User Query (string)required

    chat_history

    object[]

    required

  • Array [

  • role MessageRole (string)

    Message role.

    Possible values: [system, user, assistant, function, tool, chatbot, model]

    Default value: user
    additional_kwargs object

    blocks

    object[]

  • Array [

  • oneOf

    block_type Block Type (string)
    Default value: text
    text Text (string)required
  • ]

  • ]

Responses

Successful Response

Schema

  • Array [

  • justification Justification (string)required
    start_line Start Line (integer)required
    end_line End Line (integer)required

    blocks

    object[]

    required

  • Array [

  • idx Idx (integer)required

    The index of the block

    template Template (string)required

    The content of the block

    sources

    object[]

    The sources for the block

  • Array [

  • node

    object

    required

    Provided for backward compatibility.

    Note: we keep the field with the typo "seperator" to maintain backward compatibility for serialized objects.

    id_ Id (string)

    Unique ID of the node.

    embedding

    object

    Embedding of the node.

    anyOf

  • Array [

  • number

  • ]

  • extra_info object

    A flat dictionary of metadata fields

    excluded_embed_metadata_keys string[]

    Metadata keys that are excluded from text for the embed model.

    excluded_llm_metadata_keys string[]

    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_id Node Id (string)required

    node_type

    object

    anyOf

    string

    Possible values: [1, 2, 3, 4, 5]

    metadata object

    hash

    object

    anyOf

    string

    class_name Class Name (string)
    Default value: RelatedNodeInfo
    metadata_template Metadata Template (string)

    Template for how metadata is formatted, with {key} and {value} placeholders.

    Default value: {key}: {value}
    metadata_separator Metadata Separator (string)

    Separator between metadata fields when converting to string.

    Default value:
    text Text (string)

    Text content of the node.

    Default value:
    mimetype Mimetype (string)

    MIME type of the node content.

    Default value: 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

    metadata_seperator Metadata Seperator (string)

    Separator between metadata fields when converting to string.

    Default value:
    text_template Text Template (string)

    Template for how text is formatted, with {content} and {metadata_str} placeholders.

    Default value: {metadata_str} {content}
    class_name Class Name (string)
    Default value: TextNode

    score

    object

    anyOf

    number

    class_name Class Name (string)
    Default value: TextNodeWithScore
  • ]

  • ]

  • ]