JohnnyIrvin / shell-craft

Shell-Craft harnesses the potential of OpenAI's API to execute prompts, generate shell commands, and auto-fill templates seamlessly integrated with GitHub. Simplify and automate developer tasks with the power of AI.
MIT License
12 stars 3 forks source link

Issue with Go --prompt command #82

Closed JohnnyIrvin closed 1 year ago

JohnnyIrvin commented 1 year ago

Problem with the output when using Go --prompt command

Describe the bug When using the Go --prompt command, the only response received is "Go." instead of a generated response based on user input.

To Reproduce Steps to reproduce the behavior:

  1. Execute with --prompt go
  2. Enter any valid input for the prompt and press enter
  3. The output displays Go. instead of a generated response.

Expected behavior The command should provide a prompt for user input and based on the input provided, a generated response should be returned instead of "Go.". We should switch the prompt to GoLang so that the OpenAI API can return code back.

Examples

$ shell-craft --prompt go Restful service using gin that presents Hello World.
Go.
$ shell-craft --prompt go Hello World using gin.
Go.
$ shell-craft --prompt go Gin service.
Go.
$ shell-craft --prompt go Delete it all
Go.
$ shell-craft --prompt go Loop through all files in target directory.
Go.
$ shell-craft --prompt go Loop through all files in target directory. --temperature .5
Go.