context

Add memory context data

This endpoint adds memory (chat history) as context.

post/api/v1/context/memory/add

Request body

sessionIdstring required

The ID of the session

Response

Memory context added successfully

successboolean required
context_idstring required
processed_documentsnumber

Example response

{
  "success": true,
  "context_id": "ctx_01HXYZABC",
  "processed_documents": 2
}

Changes

Changed in 11 of the 29 revisions of this API.11923

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

  • c77e179652eb111See the full diff
    • added the new required request property sessionId

      new-required-request-property

    • removed the request property memoryId

      request-property-removed

    • the groupName request property default value default was added

      request-property-default-value-added

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

  • e8e44e0e972c331See the full diff
    • added the new required request property contents/items/metadata/messageId

      new-required-request-property

    • the request property contents/items/content became required

      request-property-became-required

    • the request property contents/items/metadata became required

      request-property-became-required

    • removed the request property contents/items/createdAt

      request-property-removed

    • removed the request property contents/items/id

      request-property-removed

    • removed the request property contents/items/role

      request-property-removed

    • added the new optional request property metadata

      new-optional-request-property

    • removed the request property contents/items/metadata/messageId

      request-property-removed

    • removed the request property metadata

      request-property-removed

    • added the new optional request property contents/items/createdAt

      new-optional-request-property

    • added the new optional request property contents/items/id

      new-optional-request-property

    • added the new optional request property contents/items/role

      new-optional-request-property

    • the request property contents/items/content became optional

      request-property-became-optional

    • the request property contents/items/metadata became optional

      request-property-became-optional

  • e8e44e0e972c331See the full diff
    • added the new required request property contents/items/metadata/messageId

      new-required-request-property

    • the request property contents/items/content became required

      request-property-became-required

    • the request property contents/items/metadata became required

      request-property-became-required

    • removed the request property contents/items/createdAt

      request-property-removed

    • removed the request property contents/items/id

      request-property-removed

    • removed the request property contents/items/role

      request-property-removed

    • added the new optional request property metadata

      new-optional-request-property

  • 510cbb709bed211See the full diff
    • the request property contents became required

      request-property-became-required

    • the request property memoryId became required

      request-property-became-required

    • added the new optional request property contents/items/createdAt

      new-optional-request-property

    • added the new optional request property contents/items/id

      new-optional-request-property

    • added the new optional request property contents/items/metadata

      new-optional-request-property

    • added the new optional request property contents/items/role

      new-optional-request-property

    • added the media type application/json for the response with the status 201

      response-media-type-added

    • added the media type application/json for the response with the status 400

      response-media-type-added

    • added the media type application/json for the response with the status 401

      response-media-type-added

    • added the media type application/json for the response with the status 402

      response-media-type-added

    • added the media type application/json for the response with the status 403

      response-media-type-added

    • added the media type application/json for the response with the status 404

      response-media-type-added

    • added the media type application/json for the response with the status 500

      response-media-type-added

    • api operation id addContextAsMemory was added

      api-operation-id-added