openapi: 3.2.0 info: title: assistants Threads API version: '' servers: - url: https://{tenant}.{region}.qlikcloud.com variables: region: default: us description: The region the tenant is hosted in tenant: default: your-tenant description: Name of the tenant that will be called tags: - name: Threads paths: /api/v1/assistants/{assistantId}/threads: get: tags: - Threads summary: List threads responses: '200': content: application/json: schema: $ref: '#/components/schemas/threadsResult' description: Successfully retrieved the threads for the assistant. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The operation failed due to insufficient permissions. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The assistant was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant from which to retrieve threads. - in: query name: filter schema: type: string examples: favorite: value: favorite eq "true" hasLikes: value: summaryStats.likes gt "0" hasReview: value: summaryStats.reviews gt "0" hasDislikes: value: summaryStats.dislikes gt "0" hasFeedback: value: hasFeedback eq "true" filterOwnerAndHideDeleted: value: ownerId co "669603a035eb5fedab45987f" and not(deletedAt pr) description: Optional parameter to filter threads. - in: query name: limit schema: type: integer default: 20 maximum: 100 minimum: 1 description: The number of assistants to get. - in: query name: next schema: type: string description: Optional parameter to request the next page. - in: query name: prev schema: type: string description: Optional parameter to request the previous page. - in: query name: sort schema: enum: - NAME - -NAME - CREATED - -CREATED - UPDATED - -UPDATED type: string description: Optional resource field name to sort on, case insensitive, e.g. `name`. Can be prefixed with `-` to set descending order; defaults to ascending. description: Retrieves the list of threads for the assistant. x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '1' limit: 1000 operationId: getApiV1AssistantsByAssistantIdThreads x-operation-id-source: derived post: tags: - Threads summary: Create a thread responses: '201': content: application/json: schema: $ref: '#/components/schemas/Thread' headers: Etag: schema: type: string description: Assistant thread version. Last-Modified: schema: type: string description: Last modified date and time of the assistant thread. description: Successfully created a new assistant thread. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The user does not have privileges to perform the requested action. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The assistant was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant in which to create the thread. description: Creates a new thread for the assistant. requestBody: content: application/json: schema: $ref: '#/components/schemas/createThread' x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '2' limit: 100 operationId: postApiV1AssistantsByAssistantIdThreads x-operation-id-source: derived /api/v1/assistants/{assistantid}/threads/{threadid}: get: tags: - Threads summary: Get a thread responses: '200': content: application/json: schema: $ref: '#/components/schemas/ThreadWithMessages' description: Successfully retrieved the thread. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The operation failed due to insufficient permissions. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The thread was not found. parameters: - in: path name: assistantid schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant containing the requested thread. - in: path name: threadid schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread to retrieve. description: Retrieves a thread for the assistant. x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '1' limit: 1000 operationId: getApiV1AssistantsByAssistantidThreadsByThreadid x-operation-id-source: derived patch: tags: - Threads summary: Update thread properties responses: '204': description: Thread updated successfully. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: Bad request. Payload could not be parsed to a JSON Patch or Patch operations are invalid. '401': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: Not authorized. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The operation failed due to insufficient permissions. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The term to patch was not found. '429': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true headers: retry-after: schema: type: integer default: 1 description: The amount of seconds to wait before retrying the request. description: The request has been rate-limited. parameters: - in: path name: assistantid schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant containing the requested thread. - in: path name: threadid schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread to retrieve. description: Updates the properties of an existing thread with JSON Patch-formatted data. requestBody: content: application/json: schema: $ref: '#/components/schemas/threadPatchArray' required: true x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '2' limit: 100 operationId: patchApiV1AssistantsByAssistantidThreadsByThreadid x-operation-id-source: derived delete: tags: - Threads summary: Delete a thread responses: '204': description: Successful operation. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The operation failed due to insufficient permissions. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The assistant was not found. parameters: - in: path name: assistantid schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant containing the requested thread. - in: path name: threadid schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread to retrieve. description: Deletes the specified thread and all of its resources. x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '2' limit: 100 operationId: deleteApiV1AssistantsByAssistantidThreadsByThreadid x-operation-id-source: derived /api/v1/assistants/{assistantId}/threads/{threadId}/interactions: get: tags: - Threads summary: List interactions responses: '200': content: application/json: schema: $ref: '#/components/schemas/interactionsResult' description: Successfully retrieved the thread interactions. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The operation failed due to insufficient permissions. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The feedback was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant from which to retrieve the interactions. - in: path name: threadId schema: type: string format: uuid example: 507f191e810c19729de860bb required: true description: The ID of the thread from which to retrieve the interactions. - in: query name: limit schema: type: integer default: 20 maximum: 100 minimum: 1 description: The number of feedback to get. - in: query name: next schema: type: string description: Optional parameter to request the next page. - in: query name: prev schema: type: string description: Optional parameter to request the previous page. - in: query name: sort schema: enum: - CREATED - -CREATED - UPDATED - -UPDATED type: string description: Optional resource field name to sort on, case insensitive, e.g. `created`. Can be prefixed with `-` to set descending order; defaults to ascending. description: Retrieves the list of interactions for the thread. x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '1' limit: 1000 operationId: getApiV1AssistantsByAssistantIdThreadsByThreadIdInteractions x-operation-id-source: derived post: tags: - Threads summary: Create an interaction responses: '201': content: application/json: schema: $ref: '#/components/schemas/Interaction' headers: Etag: schema: type: string description: Thread feedback version. Last-Modified: schema: type: string description: Last modified date and time of the thread interaction. description: Successfully created a new thread interaction. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The user does not have privileges to perform the requested action. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The assistant or the thread was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant in which to create the interaction. - in: path name: threadId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread in which to create the interaction. description: Creates a new interaction for the thread. requestBody: content: application/json: schema: $ref: '#/components/schemas/createInteraction' x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '2' limit: 100 operationId: postApiV1AssistantsByAssistantIdThreadsByThreadIdInteractions x-operation-id-source: derived /api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}: get: tags: - Threads summary: Get an interaction responses: '200': content: application/json: schema: $ref: '#/components/schemas/Interaction' description: Successfully retrieved the interaction. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The operation failed due to insufficient permissions. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The interaction was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant in which to retrieve the interaction. - in: path name: interactionId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the interaction to retrieve. - in: path name: threadId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread in which to retrieve the interaction. description: Retrieves an interaction for the thread. x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '1' limit: 1000 operationId: getApiV1AssistantsByAssistantIdThreadsByThreadIdInteractionsByInteractionId x-operation-id-source: derived delete: tags: - Threads summary: Delete an interaction responses: '204': description: Successful operation. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The operation failed due to insufficient permissions. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The resource was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant in which to delete the interaction. - in: path name: interactionId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the interaction to delete. - in: path name: threadId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread in which to delete the interaction. description: Deletes the specified interaction and all of its resources. x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '2' limit: 100 operationId: deleteApiV1AssistantsByAssistantIdThreadsByThreadIdInteractionsByInteractionId x-operation-id-source: derived /api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/feedback: post: tags: - Threads summary: Create feedback responses: '201': content: application/json: schema: $ref: '#/components/schemas/Interaction' headers: Etag: schema: type: string description: Thread feedback version. Last-Modified: schema: type: string description: Last modified date and time of the thread feedback. description: Successfully created a new thread feedback. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The user does not have privileges to perform the requested action. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The resource was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant in which to create the feedback. - in: path name: interactionId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the interaction in which to create the feedback. - in: path name: threadId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread in which to create the feedback. description: Creates feedback for the thread. requestBody: content: application/json: schema: $ref: '#/components/schemas/createFeedback' x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '2' limit: 100 operationId: postApiV1AssistantsByAssistantIdThreadsByThreadIdInteractionsByInteractionIdFeedback x-operation-id-source: derived /api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/feedback/{feedbackId}: patch: tags: - Threads summary: Update feedback responses: '204': headers: Etag: schema: type: string description: Feedback version. Last-Modified: schema: type: string description: Last modified date and time of the feedback. description: Successfully updated the feedback. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The operation failed due to insufficient permissions. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The resource was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant containing the requested feedback. - in: path name: feedbackId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the feedback to update. - in: path name: interactionId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the interaction containing the requested Feedback. - in: path name: threadId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread containing the requested feedback. description: Updates feedback for the thread. requestBody: content: application/json: schema: $ref: '#/components/schemas/feedbackPatchArray' x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '2' limit: 100 operationId: patchApiV1AssistantsByAssistantIdThreadsByThreadIdInteractionsByInteractionIdFeedbackByFeedbackId x-operation-id-source: derived /api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/reviews: post: tags: - Threads summary: Create feedback review responses: '201': content: application/json: schema: $ref: '#/components/schemas/Interaction' headers: Etag: schema: type: string description: Thread feedback version. Last-Modified: schema: type: string description: Last modified date and time of the thread feedback. description: Successfully created a new thread feedback. '400': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The request is in incorrect format. '403': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: The user does not have privileges to perform the requested action. '404': content: application/json: schema: $ref: '#/components/schemas/errorResponseCopy' x-qlik-merge-conflict: true description: A resource was not found. parameters: - in: path name: assistantId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the assistant in which to create the feedback review. - in: path name: interactionId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the interaction in which to create the feedback review. - in: path name: threadId schema: type: string format: uuid example: 507f191e810c19729de860ea required: true description: The ID of the thread in which to create the feedback review. description: Creates feedback review for the thread. requestBody: content: application/json: schema: $ref: '#/components/schemas/createReview' x-qlik-visibility: public x-qlik-stability: stable x-qlik-deprecated: false x-qlik-tier: tier: '2' limit: 100 operationId: postApiV1AssistantsByAssistantIdThreadsByThreadIdInteractionsByInteractionIdReviews x-operation-id-source: derived components: schemas: createFeedback: type: object required: - vote - reason properties: vote: type: integer example: 1 description: Integer representation of feedback given (-1 = negative, 1 = positive). reason: type: string example: inaccurate | irrelevant | repetitive | unhelpful | other description: Reason for feedback. comment: type: string description: Optional comment for feedback. Message: type: object required: - id - role - content - createdAt - sources properties: id: type: string format: uuid example: 10d347c4-f28a-4faf-93f0-48e781aaf303 role: type: string example: ai description: human or ai role. content: type: string example: Somewhere in an unmarked grave description: Message content. sources: type: array items: $ref: '#/components/schemas/MessageSource' description: List of sources used to generate AI messages (interactions). createdAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the interaction was created. interactionsResult: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Interaction' meta: $ref: '#/components/schemas/resultMeta' links: $ref: '#/components/schemas/pageLinks' Feedback: type: object required: - id - vote - createdAt - sources - reviewStatus - reason - reviewerId - comment properties: id: type: string format: uuid example: 507f191e810c19729de860ea description: Unique feedback identifier. vote: type: integer example: 1 description: Integer representation of feedback given (-1 = negative, 1 = positive). reason: type: string example: inaccurate | irrelevant | repetitive | unhelpful | other description: Reason for feedback. comment: type: string description: Optional comment for feedback. reviewedAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' description: Datetime when the feedback was reviewed. reviewerId: type: string format: uuid example: 507f191e810c19729de860ea description: Unique feedback reviewer identifier. reviewStatus: type: string example: reviewed | unreviewed description: Feedback review status. threadPatchArray: type: array items: $ref: '#/components/schemas/JSONPatch' example: - op: replace path: /name value: new name description: An array of JSON Patch documents. createThread: type: object required: - name properties: name: type: string example: Initial conversation description: The name of the thread. createdAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the thread was created. updatedAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the thread was updated. useUserPreferredLanguage: type: boolean example: false description: Whether the thread should use the user's preferred language. ThreadWithMessages: type: object required: - id - name - createdAt - updatedAt - ownerId - hasFeedback - favorite - useUserPreferredLanguage - messages - summaryStats properties: id: type: string format: uuid example: 507f191e810c19729de860ea description: Unique identifier of the thread. name: type: string example: Initial conversation description: The name of the thread. ownerId: type: string format: uuid example: 507f191e810c19729de860ea description: Unique identifier of the thread owner. favorite: type: boolean default: false example: false description: If thread is marked as favorite. messages: type: array items: $ref: '#/components/schemas/Message' createdAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the thread was created. deletedAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the thread was deleted. updatedAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the thread was updated. hasFeedback: type: boolean default: false example: false description: If feedback was provided for a thread interaction. summaryStats: $ref: '#/components/schemas/feedbackSummary' useUserPreferredLanguage: type: boolean default: false example: false description: If the thread should respond in the user's preferred language. feedbackSummary: type: object required: - likes - dislikes - interactions - reviews properties: likes: type: integer description: Amount of likes for a thread or an assistant. other: type: integer description: Count of answers which users disliked and gave "other" as reason. reviews: type: integer description: Amount of reviews for a thread or an assistant. dislikes: type: integer description: Amount of dislikes for a thread or an assistant. unhelpful: type: integer description: Count of answers which users marked as "unhelpful". inaccurate: type: integer description: Count of answers which users marked as "inaccurate". irrelevant: type: integer description: Count of answers which users marked as "irrelevant". repetitive: type: integer description: Count of answers which users marked as "repetitive". unanswered: type: integer description: Count of questions for which the assistant provided no answer. interactions: type: integer description: Amount of interactions for a thread or an assistant. MessageSourceChunk: type: object required: - chunkId properties: text: type: string description: Chunk text for "AI" generated message source. chunkId: type: string format: uuid example: 10d347c4-f28a-4faf-93f0-48e781aaf303 description: Chunk unique identifier for "AI" generated message source. MessageSource: type: object required: - knowledgebaseId - datasourceId - documentId - source - chunks properties: chunks: type: array items: $ref: '#/components/schemas/MessageSourceChunk' description: List of Chunks used for "AI" generated messages. source: type: string example: Reference.md description: Path to the document used. documentId: type: string format: uuid example: 10d347c4-f28a-4faf-93f0-48e781aaf303 description: Reference to Document used for "AI" generated messages. datasourceId: type: string format: uuid example: 10d347c4-f28a-4faf-93f0-48e781aaf303 description: Reference to DataSource used for "AI" generated messages. lastIndexedAt: type: string example: '2021-10-02T14:20:50.52Z' description: Datetime when the knowledgebase was last indexed. knowledgebaseId: type: string format: uuid example: 10d347c4-f28a-4faf-93f0-48e781aaf303 description: Reference to KnowledgeBase used for "AI" generated messages. errorResponseCopy: type: object properties: errors: type: array items: $ref: '#/components/schemas/errorResponseCodeCopy' x-qlik-merge-conflict: true traceId: type: string example: 507f191e810c19729de860ea errorResponseCodeCopy: type: object properties: code: type: string title: type: string detail: type: string JSONPatch: type: object required: - op - path - value properties: op: enum: - replace - add type: string description: The operation to be performed. path: type: string description: A JSON Pointer. value: oneOf: - type: string - type: number - type: boolean description: The value to be used for this operation. description: A JSON Patch document as defined in http://tools.ietf.org/html/rfc6902. resultMeta: type: object properties: countTotal: type: integer Thread: type: object required: - id - name - ownerId - createdAt - updatedAt - hasFeedback - favorite - useUserPreferredLanguage - summaryStats properties: id: type: string format: uuid example: 507f191e810c19729de860ea description: Unique identifier of the thread. name: type: string example: Initial conversation description: The name of the thread. ownerId: type: string format: uuid example: 10d347c4-f28a-4faf-93f0-48e781aaf303 favorite: type: boolean default: false example: false description: If thread is marked as favorite. createdAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the thread was created. deletedAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the thread was deleted. updatedAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the thread was updated. hasFeedback: type: boolean default: false example: false description: If feedback was provided for a thread interaction. summaryStats: $ref: '#/components/schemas/feedbackSummary' useUserPreferredLanguage: type: boolean default: false example: false description: If the thread should respond in the user's preferred language. createReview: type: object required: - reviewStatus properties: reviewStatus: type: string example: reviewed | unreviewed description: Review status. threadsResult: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Thread' meta: $ref: '#/components/schemas/resultMeta' links: $ref: '#/components/schemas/pageLinks' feedbackPatchArray: type: array items: $ref: '#/components/schemas/JSONPatch' example: - op: replace path: /reason value: irrelevant description: An array of JSON Patch documents. pageLinks: type: object properties: next: $ref: '#/components/schemas/pageLink' prev: $ref: '#/components/schemas/pageLink' self: $ref: '#/components/schemas/pageLink' rejectionReason: enum: - 1 - 2 - 3 type: integer example: 1 description: "Rejection reason for a question:\n * 1 - PROMPT_INJECTION\n * 2 - OUT_OF_CONTEXT\n * 3 - TOO_COMPLEX\n" Interaction: type: object required: - id - request - response - createdAt - updatedAt - sources - ownerId - threadId properties: id: type: string format: uuid example: 10d347c4-f28a-4faf-93f0-48e781aaf303 ownerId: type: string example: 65e310c43fb1cf46654e0878 description: Unique identifier of user which created the interaction. request: type: string example: Where was Genghis Khan buried? description: Interaction request content. sources: type: array items: $ref: '#/components/schemas/MessageSource' description: List of sources used to generate AI messages (interactions). feedback: $ref: '#/components/schemas/Feedback' rejected: type: boolean example: true description: Indicator the system marked request as suspicious. response: type: string example: Somewhere in an unmarked grave description: Interaction response content. threadId: type: string format: uuid example: 125c24c4-668c-4c97-bef8-30d910169913 description: ID of the thread to which the interaction belongs. createdAt: type: string format: date-time example: '2021-10-02T14:20:50.52Z' readOnly: true description: Datetime when the interaction was created. updatedAt: type: string format: date-time example: '2021-10-02T14:20:55.52Z' readOnly: true description: Datetime when the interaction was updated. createInteraction: type: object required: - request - response - sources properties: request: type: string example: Where was Genghis Khan buried? description: Interaction request content. sources: type: array items: $ref: '#/components/schemas/MessageSource' description: List of sources used to generate AI messages (interactions). rejected: type: boolean example: true description: Indicator the system marked request as suspicious. response: type: string example: Somewhere in an unmarked grave description: Interaction response content. rejectionReason: $ref: '#/components/schemas/rejectionReason' pageLink: type: object properties: href: type: string