Skip to content

Instantly share code, notes, and snippets.

@kxzk
Last active March 29, 2023 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kxzk/112b298f1d632510823f7b4d8ddf6c92 to your computer and use it in GitHub Desktop.
Save kxzk/112b298f1d632510823f7b4d8ddf6c92 to your computer and use it in GitHub Desktop.
function openai_edits_api
h 'can you generate a golang script that reads from stdin and sends that to the OpenAI Code Edits API endpoint - include only the code nothing else' | string replace '```' '' > openai_edits_api.go
h 'can you generate the commands to build and run the golang script - only include the commands' | string replace '```' '' > openai_edits_api.sh
data_gpt 'can you generate some tests for the following golang script' (cat openai_edits_api.go | string collect) | string replace '```' '' > openai_edits_api_test.go
data_gpt 'can you generate a makefile for a golang project with the following files' (ls) | string replace '```' '' > Makefile
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment