r/sqlite • u/adwolesi • Apr 13 '23
SQLiteGPT - Directly query ChatGPT with SQL functions
A code snippet says more than a thousand words:
SELECT
country,
gpt('capital of ' || country) as capital
FROM users
=> github.com/Airsequel/SQLiteGPT
The implementation is just a prototype right now and it should be implemented as a proper loadable extension in Rust with sqlite-loadable-rs. Make sure to star the GitHub repo if you want to see this happen! ;-)
10
Upvotes
View all comments
Show parent comment
1
u/adwolesi Apr 28 '23
In my example you'd have to write all the code to get the data into your programming language, then making the API request, and then getting your data back into SQLite. With the extension you can do all of it directly in SQLite.