I use MyVanna Class with ChromaDB and mistral in ollama but can't run tsql which was returned by ollama #632
Unanswered
AnchorZhang0817
asked this question in
Q&A
Replies: 2 comments
-
i use real database in ssms to train the Vanna |
Beta Was this translation helpful? Give feedback.
0 replies
-
What happens if you run the flaskapp ? I had this issue where it was generating wrong SQL query that really can't be executed, but this happened when I was using the model |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I built Vanna on my company's desktop successfully, and it can return tsql code by ollama, but it can't run tsql code with throughout 'Couldn't run sql: (pyodbc.ProgrammingError) ('42S22', "[42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'Activity'. (207) (SQLExecDirectW)")
(Background on this error at: https://sqlalche.me/e/20/f405)'
To Reproduce
Steps to reproduce the behavior:
def init(self, config=None):
ChromaDB_VectorStore.init(self, config=config)
Ollama.init(self, config=config)
vn = MyVanna(config={'model': 'mistral'})
vn.connect_to_mssql(odbc_conn_str=(....)
2. ask code:vn.ask('How to know one workitem pass or fail on specific activity?')
3.i had train vanna before
Expected behavior
A clear and concise description of what you expected to happen.
Error logs/Screenshots
Couldn't run sql: (pyodbc.ProgrammingError) ('42S22', "[42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'Activity'. (207) (SQLExecDirectW)")
[SQL: SELECT..........
]
(Background on this error at: https://sqlalche.me/e/20/f405)
Desktop (please complete the following information where):
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions