I'm trying to insert a Document into an index but having some issues. My document contains metadata that I want to use after retrieval but that is not a string and should not be used to retreiver or query any LLMS. Here is what one document looks like:
Document(
text=block["Text"],
metadata=dict(
metadata,
**{
"page_num": str(block["Page"]),
"BoundingBox": block["BoundingBox"],
},
excluded_embed_metadata_keys=["BoundingBox"],
excluded_llm_metadata_keys=["BoundingBox"],
),
)
This is the error message I get though:
{'error': [{'message': "invalid text property 'boundingBox' on class 'InvalidityGPTI': not a string, but map[string]interface {}"}]}
I cant seem to figure out where this is coming from
This is how I insert into my index:
self.index = VectorStoreIndex.from_vector_store(
service_context=self.serviceContext,
vector_store=WeaviateVectorStore(
weaviate_client=self.client, index_name="InvalidityGPTI"
)
)
self.index.insert(doc)
self.index.storage_context.persist()