{"record":{"id":"5b62879c7b45c8ec","repo":"run-llama/llama_index","slug":"vector-memory-does-not-support-get-all-method-can","errorCode":null,"errorMessage":"Vector memory does not support get_all method, can only retrieve based on input.","messagePattern":"Vector memory does not support get_all method, can only retrieve based on input\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/memory/vector_memory.py","lineNumber":157,"sourceCode":"        if input is None:\n            return []\n\n        # retrieve from index\n        retriever = self.vector_index.as_retriever(**self.retriever_kwargs)\n        nodes = retriever.retrieve(input or \"\")\n\n        # retrieve underlying messages\n        return [\n            ChatMessage.model_validate(sub_dict)\n            for node in nodes\n            for sub_dict in node.metadata[\"sub_dicts\"]\n        ]\n\n    def get_all(self) -> List[ChatMessage]:\n        \"\"\"Get all chat history.\"\"\"\n        # TODO: while we could implement get_all, would be hacky through metadata filtering\n        # since vector stores don't easily support get()\n        raise ValueError(\n            \"Vector memory does not support get_all method, can only retrieve based on input.\"\n        )\n\n    def _commit_node(self, override_last: bool = False) -> None:\n        \"\"\"Commit new node to vector store.\"\"\"\n        if self.cur_batch_textnode.text == \"\":\n            return\n\n        if override_last:\n            # delete the last node\n            # This is needed since we're updating the last node in the vector\n            # index as its being updated. When a new user-message batch starts\n            # we already will have the last user message group committed to the\n            # vector store index and so we don't need to override_last (i.e. see\n            # logic in self.put().)\n            self.vector_index.delete_nodes([self.cur_batch_textnode.id_])\n\n        self.vector_index.insert_nodes([self.cur_batch_textnode])","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/memory/vector_memory.py#L139-L175","documentation":"Error \"Vector memory does not support get_all method, can only retrieve based on input.\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/memory/vector_memory.py:157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call get(input=...) with a query string instead of get_all().","Use the primary ChatMemoryBuffer if you need the full unfiltered history."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}