Get Chat Messages#

Retrieves a page of chat messages and separately extracts the last message and the text of the last response from the assistant.

ThreadGuid*[Text] Required chat GUID.
StartMessageIndex[Number] Cursor: ID of the last already received message; default value is 0.
RoleFilter by role.
SortFieldSorting field.
SortOrderSorting direction.
Page[Number] Page number, starting from 1; default value is 1.
PerPage[Number] Page size from 1 to 100; default value is 20.
Timeout[Number] HTTP request timeout in seconds; default value is 60.
ListMessages[Array] Messages of the current page.
LastMessageThe last message in the received selection.
PaginationResponse pagination: Page, PerPage, Total.
AssistantText[Text] Text of the last found message with the role of assistant.
Processing Level

Select the error handling level.

Possible values:

  • "Default" - default;
  • "Ignore" - errors are ignored;
  • "Handle" - errors are handled.

If "Default" is selected, the value from the "Start" block of this diagram will be used.

Message Level

Select the level of messages that will be output by the blocks during operation.

Possible values:

  • "Default" - default;
  • "Release" - output is disabled;
  • "Debug" - main information output;
  • "Detailed" - detailed information output.

If "Default" is selected, the value from the "Start" block of this diagram will be used.

Error Text[Text] Returns detailed information about the error in case of incorrect execution of the block's work.