kulltc/chatgpt-sql

unable to connect to my database

Closed this issue · 2 comments

Hello,

I executed this proj and given a question like " get list of tables " and aslo tried with different prompts
Configured to
"ODBC Driver 17 for SQL Server"
api_key = sk-xxxxxxxxxxxxxxxxx
org = Personal
model = gpt-3.5-turbo

sometimes getting this Error :: too many requests

and sometimes It gives me following reponse and saying no direct access to SQL SERVER error.

ChatGPT: I apologize for the inconvenience. As an AI language model, I don't have a direct connection to a SQL Server database. However, you can use the provided query to retrieve the list of tables and their columns by modifying it to match your database structure and executing it against your own SQL Server database.

Please help me how did you connect and got the data from sqlserver. am using paid account.
Refere below screenshot of error
image

kulltc commented

Hi @srinivask2020, seems like you have issues connecting to the server which is probably unrelated to this specific app. I'm afraid I can't really help with that.

The message from ChatGPT you're seeing "I apologize for ..." is probably because it's observing the error that the SQL database is returning.

Given the significant progress this field has made since earlier this year, I would recommend using something like Langchain instead of this repo: https://python.langchain.com/docs/get_started/introduction.html

This repository is more intended as a proof of concept than something to be used in production.

Hope this helps,

Cheers,

Thank you, i will check langchain