python main.py
Traceback (most recent call last):
File "C:\Users\hp\Desktop\openai\main.py", line 64, in <module>
obj_index = ObjectIndex.from_objects(
File "C:\Users\hp\Desktop\openai\jmf-env\lib\site-packages\llama_index\objects\base.py", line 50, in from_objects
nodes = object_mapping.to_nodes(objects)
File "C:\Users\hp\Desktop\openai\jmf-env\lib\site-packages\llama_index\objects\base_node_mapping.py", line 55, in to_nodes
return [self.to_node(obj) for obj in objs]
File "C:\Users\hp\Desktop\openai\jmf-env\lib\site-packages\llama_index\objects\base_node_mapping.py", line 55, in <listcomp>
return [self.to_node(obj) for obj in objs]
File "C:\Users\hp\Desktop\openai\jmf-env\lib\site-packages\llama_index\objects\table_node_mapping.py", line 46, in to_node
f"{self._sql_database.get_single_table_info(obj.table_name)}\n"
AttributeError: 'SQLDatabase' object has no attribute 'get_single_table_info'
Can someone help me how to resolve this error? I have tried to check my code everything seems to work perfectly fine
The database is a PostgreSQL instance running in Digital Ocean, I am able to connect to it and get access to all the tables metadata and schema. But when i try to add some more table that need to be included in the prompt I could not use the basic implementation. That's why I want to do it using SQLContextContainerBuilder. After running the that's the error I am getting.
Ohh yes, I have run a diagnosis of my imports, I came to realize that there was another SQLDatabase class from langchain that was overriding the first on from llamindex. Thanks so very much @Logan M for the assistance.