file_path, file, or text must be provided.
Parameters
The customer this memory belongs to. Optional in the signature, but required on B2B: an upload without it is refused with
InvalidInputError (HTTP 400). Not accepted on B2C: leave it out, and the SDK sends no customer field. Passing one there raises CustomerIdNotAcceptedError, a subclass of InvalidInputError, before anything is sent (TypeScript SDK 0.5.14 and earlier sent a customer field even when you left it out; use 0.5.15 or later). See B2C vs B2B.An open binary file-like object. When using this, you must also pass
filename. Mutually exclusive with file_path and text.Ingestion mode:
"long-range" (default) or "fast". Neither SDK nor the server checks the value, and both run the same pipeline today. See Types and enums.Only for a scope ladder with a level between customer and user: the full path down to the user, as a flat map of level key to id, for example
{"customer": "acme", "team": "payments", "user": "user_123"}. Omit it on the default ladder. Sent as a JSON form field. Requires Python SDK 0.5.16 or later and TypeScript SDK 0.5.15 or later. See Scope paths.Returns
CreateMemoryResponse with the ingestion job identifiers and initial status.
Example
Raises
InvalidInputError, before anything is sent: none, or more than one, offile_path,fileandtext, or nouser_id(Python 0.5.22 and later; earlier Python raisedValueError).CustomerIdNotAcceptedError, a subclass ofInvalidInputError, before anything is sent: acustomer_idon a B2C instance.AuthenticationError: the API key is missing or invalid, or (Python)initialize()has not been called.InvalidInputError: Synap rejected the upload (HTTP 400 or 422), for example a B2B upload withoutcustomer_id.