How to Build a Natural Language to SQL Converter using the OpenAI API
HTML-код
- Опубликовано: 28 мар 2023
- Taking a break from talking about testing to talk about AI a bit!
Requirements
- Python
- An API key from OpenAI
UPDATE: the text-davinci models are on their way to being deprecated. Please use the gpt-3.5-turbo model going forward. See Github for updates
Github code: github.com/Adam-Thometz/Natur...
Hello, I want to build something similar but is there any way that we do not share our schema as it is as it might contain confidential info. and instead we share some aliases in place of table and column names?
I know I'm late but could you give me an example of a schema name you'd want to redact?
Either way, you'll have to take care of this programmatically. For example, you could redact each column name by giving it a meaningful name (like a variable) and when the AI returns your query, replace the name in the generated query with the actual column name before you run your query.
can you share the code
Whoops, thought I included it. Apologies. Here ya go: github.com/Adam-Thometz/Natural-Language-to-SQL
thanks@@bitsnbotsai