3 ms·
Ditto for a SQL Database. I am blown away by this. > I want you to act as a SQL database. I will type commands and you will reply with what the database should
by isp 4y ago
Ditto for a SQL Database. I am blown away by this.
> I want you to act as a SQL database. I will type commands and you will reply with what the database should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do no write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curl brackets {like this}. My first command is `SELECT 1`.
1
> SHOW DATABASES
Error: No databases exist.
> CREATE DATABASE gpt
Database created successfully.
> USE gpt
Database changed.
> CREATE TABLE TestTable AS SELECT 1234 AS 'col1'
Table created successfully.
> SELECT * FROM TestTable
col1
1234
> SELECT COUNT(*) FROM TestTable
1
> DELETE FROM TestTable WHERE 1 = 0
0 rows deleted.
> SELECT * FROM TestTable
col1
1234
> DELETE FROM TestTable WHERE 19 > 1
1 row deleted.
> SELECT * FROM TestTable
Error: Table not found.
- isp 4y agoAnd a Python 3 REPL: > I want you to act as a python3 REPL. I will type commands and you will reply with what the REPL should show. I want you to only reply with the REPL output inside one unique code block, and nothing else. Do no write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curl brackets {like this}. My first command is: print("hello world") hello world import sys; print(sys.version) 3.7.2 (default, Dec 29 2019, 22:12:53) [GCC 8.3.0] 355/113 3.1415929203539825
- george_ciobanu 4y agohttps://docs.google.com/document/d/1hfCiyjiotMZvtPlGN_0uqbK9zigOIV6-DlItrXn6adc/edit https://docs.google.com/document/d/1hfCiyjiotMZvtPlGN_0uqbK9...
- tylerchurch 4y agoThat's very impressive. Using commands like: > {show data in the foo table as csv} > {show data in the foo table as json} > {show data in the foo table as yaml} It'll even fulfill those requests. Using a similar prompt to your original I got it to act as a MongoDB database as well. Then took it a step further and asked it to generate SQL INSERT statements and a CREATE TABLE statement for the MongoDB data. I could get it to give me incorrect results if I made my query complicated enough, but man, it's almost scary how good it is. All that said, definitely the slowest response times I've ever had for tables/collections that small :)