I am using the text-to-sql functionnality engine NLSQLTableQueryEngine (from llama-index 0.8.62) to query a database from natural language questions. It works great when I plug it to openai, but the I have installed a local Mixtral-8x7b with an API supposedly compatible with openai API.
I use the exact same code for both cases I just change the base_url in the llm = OpenAI(...) initialization. All functions work except the NLSQLTableQueryEngine.query that seems to fail to execute the SQL statement weirdly:
'''Error: Statement "SELECT sum(Quantity) as TotalQuantity \nFROM xxxxxxxx WHERE Type LIKE 'deal%'" is invalid SQL.'''
The SQL is valid so there must be some missing context somewhere that make it fail.
any hint ? do you think it should work in the first place ?