run-llama/llama_index · error · ValueError
vector_store must store text to be used as a retrieval memor
Error message
vector_store must store text to be used as a retrieval memory block
What it means
Error "vector_store must store text to be used as a retrieval memory block" thrown in run-llama/llama_index.
Source
Thrown at llama-index-core/llama_index/core/memory/memory_blocks/vector.py:72
format_template: BasePromptTemplate = Field(
default=DEFAULT_RETRIEVED_TEXT_TEMPLATE,
description="Template for formatting the retrieved information.",
)
node_postprocessors: List[BaseNodePostprocessor] = Field(
default_factory=list,
description="List of node postprocessors to apply to the retrieved nodes containing messages.",
)
query_kwargs: Dict[str, Any] = Field(
default_factory=dict,
description="Additional keyword arguments for the vector store query.",
)
@field_validator("vector_store", mode="before")
def validate_vector_store(cls, v: Any) -> "BasePydanticVectorStore":
if not isinstance(v, BasePydanticVectorStore):
raise ValueError("vector_store must be a BasePydanticVectorStore")
if not v.stores_text:
raise ValueError(
"vector_store must store text to be used as a retrieval memory block"
)
return v
@field_validator("format_template", mode="before")
@classmethod
def validate_format_template(cls, v: Any) -> "BasePromptTemplate":
if isinstance(v, str):
if "{{" in v and "}}" in v:
v = RichPromptTemplate(v)
else:
v = PromptTemplate(v)
return v
def _get_text_from_messages(self, messages: List[ChatMessage]) -> str:
"""Get the text from the messages."""View on GitHub (pinned to afd0fef371)
Solutions
- Use a vector store with stores_text=True for the retrieval memory block.
- Rebuild the vector store so it persists node text, then pass it to the memory block.
When it happens
Trigger: Thrown at llama-index-core/llama_index/core/memory/memory_blocks/vector.py:72 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/a0fcf0476be68cb8.
Report an issue: GitHub.