defog-ai / sqlcoder

SoTA LLM for converting natural language questions to SQL queries
Apache License 2.0
3.42k stars 218 forks source link

defog query error:print(f"\033[1m{resp['query_generated']}\033[0m\n") #29

Closed yunqiqiliang closed 1 year ago

yunqiqiliang commented 1 year ago

defog query 'how many customers do we have?' Connection details found. Reading connection details from file... Connection details read from /Users/liangmo/.defog/connection.json. Generating the query for your question: how many customers do we have?... Defog generated the following query to answer your question:

Traceback (most recent call last): File "/Users/liangmo/.pyenv/versions/3.11.3/bin/defog", line 8, in sys.exit(main()) ^^^^^^ File "/Users/liangmo/.pyenv/versions/3.11.3/lib/python3.11/site-packages/defog/cli.py", line 45, in main query() File "/Users/liangmo/.pyenv/versions/3.11.3/lib/python3.11/site-packages/defog/cli.py", line 367, in query print(f"\033[1m{resp['query_generated']}\033[0m\n")


KeyError: 'query_generated'
yunqiqiliang commented 1 year ago

while I change to python 3.8.10 and re-init, it is OK.