Log in
Log into community
Find answers from the community
Most posts
Powered by
Hall
Home
Members
amonter5
a
amonter5
Offline
, last seen 2 months ago
Joined October 29, 2024
Contributions
Comments
Replies
a
amonter5
2 months ago
·
Pining for a solution: metadata error in Pinecone VectorMemory
Hey everyone!
I’m trying to use Pinecone as a vector database with VectorMemory, but I keep getting a metadata error:
"Metadata value must be a string, number, boolean or list of strings, got '[{"additional_kw...' for field 'sub_dicts'"
I’ve tried different approaches, but no luck so far. I’m sharing a portion of my code here:
vector_store = PineconeVectorStore(
pinecone_index=pinecone_index,
namespace=namespace
)
vector_memory = VectorMemory.from_defaults(
vector_store=vector_store,
embed_model=embed_model,
retriever_kwargs={
"similarity_top_k": 5,
},
)
msgs = [
ChatMessage(
role="system",
content="You are a SOMEWHAT helpful assistant.",
),
ChatMessage(
role="user",
content="Bob likes burgers.",
),
ChatMessage(
role="assistant",
content="Indeed, Bob likes apples.",
),
]
vector_memory.set(msgs)
chat_memory_buffer = ChatMemoryBuffer.from_defaults()
composable_memory = SimpleComposableMemory.from_defaults(
primary_memory=chat_memory_buffer,
secondary_memory_sources=[vector_memory],
)
I’m stuck on this metadata issue and am unsure how to format it correctly. Any suggestions on fixing this? Thanks in advance!
1 comment
L