gorilla-llm / gorilla-cli

LLMs for your CLI
https://gorilla.cs.berkeley.edu/
Apache License 2.0
1.28k stars 75 forks source link

Issue with Gorilla CLI on Windows 11 64-bit #34

Open zajcomm opened 1 year ago

zajcomm commented 1 year ago

Environment

Problem Description

When trying to execute the Gorilla command to generate random characters into a file, I encountered an issue with the command not being recognized.

Steps to Reproduce

  1. Start Code: Write this code in the command prompt: [make sure to change the path]
    (myVenv) C:\path\to\your\project\Gorilla>gorilla generate 100 random characters into a file called test.txt
  2. Get Options to select from: Get these options:
    ๐Ÿฆ  Welcome to Gorilla. Use arrows to select
    ยป echo "100" | sudo tee -a test.txt
      cat /dev/urandom | tr -dc 'a-z0-9' | head -c 100 > test.txt
      cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 100 | head -n 1 > test.txt
      : #Do nothing
  3. Select an Option: When selecting any of the first 3 options, receive the following error message, where xxx can be different for different prompts:
    • Example selection/output 1:
      ๐Ÿฆ  echo "100" | sudo tee -a test.txt
      'sudo' is not recognized as an internal or external command,
      operable program or batch file.

Below is an example when selecting another option:

Expected Behavior

The command should successfully generate 100 random characters into a file called test.txt.

Actual Behavior

The command prompts are not recognized, resulting in an error message.

Additional Context

This issue seems to be specific to Windows, as the commands mentioned are typical Unix/Linux commands that are not recognized in the Windows environment.


Please let me know if there's anything else I can assist you with!

ShishirPatil commented 1 year ago

Hey @zajcomm thanks for trying out Gorilla, and the detailed error log - appreciate it. Yes, your diagnosis is correct re: Unix commands on windows. One way that others have solved this is by prefixing or suffixing "on a windows powershell" or "on WSL" are is appropriate. Let me know if this works? I have a fix for this, which I will release soon to get this information directly from the CLI!

MTHALO commented 1 year ago

@ShishirPatil I have the same issue How can I solve this by prefixing or suffixing "on a Windows PowerShell" or "on WSL" I googled it and didn't understand it.

ShishirPatil commented 1 year ago

Hey @MTHALO @zajcomm I just merged #35 which I hope fixes it. Can you try this?

@MTHALO yeah so you can try to ask your prompt along with the prefix. For example,

$gorilla on a windows powershell list all files in my current directory

$gorilla generate 100 random characters into a file called test.txt on windows powershell

Make sure you re-install from source before trying it out!

Ab0rt3dF3tvs commented 1 year ago

@ShishirPatil Good day! I am also encountering the same issue, through CMD and Powershell. C:\me\project>gorilla I need your assistance and guidance on how to use you through cli ๐Ÿฆ sed -n '/GUIDANCE -/,/HOW TO USE/p' README.md | grep -E '*- ' | cut -c 4- 'sed' is not recognized as an internal or external command, operable program or batch file.----------This is through CMD PS C:\me\project> $gorilla on a windows powershell list all files in my current directory At line:1 char:10

Any information would be completely appreciated

ShishirPatil commented 1 year ago

Hey @Ab0rt3dF3tvs this is interesting. I was able to re-create the bug - I'm trying to fix it and will push a PR by Monday. BTW, what you are trying here with

PS C:\me\project> $gorilla on a windows powershell list all files in my current directory

is the correct way I'd recommend ! Thanks for trying it out, and stay tuned!!

supermario-ai commented 1 year ago

File suffix works for me: "gorilla provide me x and transpile into .ps1". TextBlaze is a Godsend with cli tooling.

Always a please @ShishirPatil Fam! ๐Ÿ™

Ab0rt3dF3tvs commented 1 year ago

"@ShishirPatil C:\Users\D>gorilla do you have a help menu? ๐Ÿฆ Welcome to Gorilla. Use arrows to select ยป git help echo "No, as an AI, I don't have a help menu. However, most command-line too man sh : #Do nothing C:\Users\D>gorilla do you have a help menu? ๐Ÿฆ git help 'git' is not recognized as an internal or external command, operable program or batch file." These are the errors I receive via CMD "PS C:\Users\D> $gorilla create a dektop folder named glozilla At line:1 char:10