Each memory is judged on its own, so a refused entry does not stop the others
and there is no whole-batch verdict to read: walk results and act per
entry.
ImportOutcome.index indexes the array the caller passed, whatever the
service's per-call batch limit happens to be. A long batch goes out as
several calls, each numbering its own results from zero, and the SDK
renumbers them back; without that a split batch would report position 0 once
per call and identify nothing.
instructions comes from the first of those calls — they are one operation
in one domain, so their guidance is the same.
Example
constresult = awaitclient.memory.importMemories(batch, { domain:'coding' }) for (constoutcomeofresult.results) { if (outcome.status === ImportStatus.REJECTED) { console.log(outcome.index, [...batch[outcome.index].queries][0]) for (constproblemofoutcome.errors) { console.log(` ${problem}`) } } }
What MemoryOperations.importMemories returns.
Each memory is judged on its own, so a refused entry does not stop the others and there is no whole-batch verdict to read: walk
resultsand act per entry.ImportOutcome.index indexes the array the caller passed, whatever the service's per-call batch limit happens to be. A long batch goes out as several calls, each numbering its own results from zero, and the SDK renumbers them back; without that a split batch would report position 0 once per call and identify nothing.
instructionscomes from the first of those calls — they are one operation in one domain, so their guidance is the same.Example