index = VectorStoreIndex.from_documents(documents)
might be raising a TypeError: Object of type datetime is not JSON serializable
exception when tring to serialize the documents from:reader = DiscordReader(discord_token=discord_token) documents = reader.load_data(channel_ids=channel_ids)
# fix date time encoding for doc in documents: doc.metadata['created_at'] = json.dumps(doc.metadata['created_at'],default=str) doc.metadata['edited_at'] = json.dumps(doc.metadata['edited_at'],default=str)