I am trying to use an ObjectIndex constructor for SQL Query-Time Retrieval of Tables for Text-to-SQL queries. This is the code I use:
obj_index = ObjectIndex.from_objects(
table_schema_objs,
table_node_mapping,
VectorStoreIndex,
)
The code runs fine in a jupyter notebook but the same code strangely gives me an error when I run in .py file. It gives me this error:
ValueError: Duplicate encoding name gpt2 in tiktoken plugin tiktoken_ext.openai_public
Not sure what to make of it