Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lll-lll-lll-lll/sqdif
SQL file defining table information as input and uses GPT-4 to generate SQL for inserting dummy data.
https://github.com/lll-lll-lll-lll/sqdif
portfolio
Last synced: 3 months ago
JSON representation
SQL file defining table information as input and uses GPT-4 to generate SQL for inserting dummy data.
- Host: GitHub
- URL: https://github.com/lll-lll-lll-lll/sqdif
- Owner: lll-lll-lll-lll
- Created: 2024-05-17T08:02:58.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-15T23:41:50.000Z (3 months ago)
- Last Synced: 2024-10-17T10:33:17.359Z (3 months ago)
- Topics: portfolio
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sqdif
This CLI takes an SQL file defining table information as input and uses GPT-4 to generate SQL for inserting dummy data.## Install
```sh
go install github.com/lll-lll-lll-lll/[email protected]
```## Prerequisites
To run this program, you will need the following prerequisites:
- Go 1.18 or higher
- OpenAI API key (set in the environment variable OPENAI_API_KEY)
- Dependencies specified in the go.mod file
## Usage
The program can be executed from the command line with the following options:- `--sql-file`: This flag specifies the file to be passed to GPT-4.
- `--output-file`: Path to the output file (optional)
- `--override`: Flag to indicate whether to overwrite the existing output file (optional)
- `--prompt-path`: Flag to specify the prompt file path to be passed to GPT-4 (optional)
- `--api-key`: The API key for the GPT-4 API## Example
```sh
sqdif --sql-file=./testdata/table.sql --output-file=./testdata/test.sql --api-key={api_key} --override=true
```
## License
This project is released under the MIT license.