huchenxucs / ChatDB

The official repository of "ChatDB: Augmenting LLMs with Databases as Their Symbolic Memory".
https://chatdatabase.github.io/
534 stars 46 forks source link

bug #8

Closed jialesmu closed 1 year ago

jialesmu commented 1 year ago

Is there any one facing this problem? When I run chatdb.py it's shows :

C:\Users\anaconda3\envs\LLM\python.exe C:/User/Desktop/LLM/ChatDB/chatdb.py
Traceback (most recent call last):
  File "C:/Users/Desktop/LLM/ChatDB/chatdb.py", line 7, in <module>
    from call_ai_function import populate_sql_statement
  File "C:\Users\Desktop\LLM\ChatDB\call_ai_function.py", line 36, in <module>
    def populate_sql_statement(sql_str: str, previous_sql_results: list[list[dict]]) -> list[str]:
TypeError: 'type' object is not subscriptable

image

and if I change this def function to:

from typing import List
def populate_sql_statement(sql_str: str, previous_sql_results: List[List[dict]]) -> List[str]:

The result will be like this: image

Thanks

jialesmu commented 1 year ago

Fixed,thanks