add some other useful prompts

This commit is contained in:
2024-03-20 12:15:35 -06:00
parent d7598e7c90
commit 91da21defb
3 changed files with 5 additions and 2 deletions

View File

@ -71,7 +71,7 @@ func singlePromptInteraction(systemPrompt, prompt string, retries int) (openai.C
seconds := (1 / float64(retries)) * 60 // back off for each retry e.g. 12, 15, 20, 30, 60
fmt.Printf("429 error, waiting %v seconds...\n", seconds)
time.Sleep(time.Duration(seconds) * time.Second)
return singlePromptInteraction(systemPrompt, prompt, retries-1) // TODO: establish base case to prevent forever retrying
return singlePromptInteraction(systemPrompt, prompt, retries-1)
}
return openai.ChatCompletionResponse{}, fmt.Errorf("ChatCompletion request error: %w", err)
}
@ -125,7 +125,7 @@ func sendPrompt(messages []openai.ChatCompletionMessage, retries int) (openai.Ch
seconds := (1 / float64(retries)) * 60 // back off for each retry e.g. 12, 15, 20, 30, 60
fmt.Printf("429 error, waiting %v seconds...\n", seconds)
time.Sleep(time.Duration(seconds) * time.Second)
return sendPrompt(messages, retries-1) // TODO: establish base case to prevent forever retrying
return sendPrompt(messages, retries-1)
}
return openai.ChatCompletionResponse{}, fmt.Errorf("ChatCompletion request error: %w", err)
}

View File

@ -0,0 +1,2 @@
{{.userPrompt}}
Let's think step by step.

View File

@ -0,0 +1 @@
Your job is to take a prompt from the user and generate a bash command or script to search for more context within files stored on the machine. Some previous conversations are stored in `/conversations`. Those conversations will fill in any gaps in your knowledge. Remember these conversations are free form. You'll need to allow for some fuzzy searching rather than using exact phrases. Feel free to use the best Linux tool available. Always respond with a bash command or script.