aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bashrc13
1 files changed, 13 insertions, 0 deletions
diff --git a/bashrc b/bashrc
index e610d1f..d281e7e 100644
--- a/bashrc
+++ b/bashrc
@@ -54,6 +54,10 @@ complete -o default -o nospace -F _todo t
# To output in cat, just call todj.
# To enable editing the files in vim, call todj vim.
# You can use less or any other tool to display the text if you wish
+# Arguments:
+# None
+# Output:
+# Writes to stdout or opens program passed as first argument
###################################################################
todj () {
CMD=${1:-"cat"}
@@ -66,6 +70,11 @@ todj () {
# Call like this openai_data "Please optimise the following function in
# python" "$(</path/to/file)" This is supposed to be a good way to read a
# file's contents in bash
+# Arguments:
+# Text prompt
+# File contents
+# Output:
+# Writes to stdout
#########################################################################
openai_data() {
if [[ $# -ne 2 ]]; then echo "Give me two params!"; return; fi
@@ -86,6 +95,10 @@ openai_data() {
# A straight forward request to the OpenAI GPT-3 model.
# Takes a single string argument and returns a simple response.
# hey_openai "What is the best way to open and interate through a file in Perl?"
+# Arguments:
+# Text prompt
+# Output:
+# Writes to stdout
################################################################################
hey_openai() {
prompt="$1"