run-llama/llama_index · error · ValueError
Unexpected kwargs: {kwargs}
Error message
Unexpected kwargs: {kwargs} What it means
Error "Unexpected kwargs: {kwargs}" thrown in run-llama/llama_index.
Source
Thrown at llama-index-core/llama_index/core/memory/vector_memory.py:118
retriever_kwargs: Optional[Dict] = None,
**kwargs: Any,
) -> "VectorMemory":
"""
Create vector memory.
Args:
vector_store (Optional[BasePydanticVectorStore]): vector store (note: delete_nodes must
be implemented. At time of writing (May 2024), Chroma, Qdrant and
SimpleVectorStore all support delete_nodes.
embed_model (Optional[EmbedType]): embedding model
index_kwargs (Optional[Dict]): kwargs for initializing the index
retriever_kwargs (Optional[Dict]): kwargs for initializing the retriever
"""
from llama_index.core.indices.vector_store import VectorStoreIndex
if kwargs:
raise ValueError(f"Unexpected kwargs: {kwargs}")
index_kwargs = index_kwargs or {}
retriever_kwargs = retriever_kwargs or {}
if vector_store is None:
# initialize a blank in-memory vector store
# NOTE: can't easily do that from `from_vector_store` at the moment.
index = VectorStoreIndex.from_documents(
[], embed_model=embed_model, **index_kwargs
)
else:
index = VectorStoreIndex.from_vector_store(
vector_store, embed_model=embed_model, **index_kwargs
)
return cls(vector_index=index, retriever_kwargs=retriever_kwargs)
def get(
self, input: Optional[str] = None, initial_token_count: int = 0, **kwargs: AnyView on GitHub (pinned to afd0fef371)
Solutions
- Remove the unexpected keyword arguments from the VectorMemory constructor call.
- Check the VectorMemory signature and pass only supported parameters.
When it happens
Trigger: Thrown at llama-index-core/llama_index/core/memory/vector_memory.py:118 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/21547e1042f4bda9.
Report an issue: GitHub.