-
Generate and provide Cohere API key into the defaultValue of -a && --api-key flag inside of the main class
@Option( names = {"-a", "--api-key"}, defaultValue = "YOUR_API-KEY", description = "Modifying api key manually" ) private String api;
or
Specify call and provide the api-key into the command line, using flags
./python <file(s)...> <language> -a <YOUR-API-KEY>
-
Make bash script executable, so user would be able to use
./polyglot
command to run codechmod +x polyglot
-
Run Maven Package to compile the source code
mvn package
./polyglot <file(s)...> <language> [OPTIONS]
Examples:
./polyglot main.cpp java
./polyglot examples/example.py main.cpp c# -o output.cs
This flag prints the current version of PolyglotCode and the name of the tool, usage:
./polyglot -v
./polyglot --version
This flag displays all of the details and configurations that PolyglotCode has, usage:
./polyglot -h
./polyglot --help
As it was mentioned earlier, user is able to specify Cohere-Api key without adding it to the defaultValue property of String api inside of the main class, usage:
./polyglot <file(s)...> <language> -a <YOUR-API>
./polyglot <file(s)...> <language> --api-key <YOUR-API>
It is not recommended to change the baseUrl of this application, as it may produce an unexpected output; however this option is still available to the user, usage:
./polyglot <file(s)...> <language> -u <baseURL>
./polyglot <file(s)...> <language> --base-url <baseURL>
Creates the file, specified by user and writes the result there. It is highly recommended to use this option with one file at the time. Usage:
./polyglot <file> <language> -o file.txt
./polyglot <file> <language> --output file.txt
Displays token information, including input token number and output token number. Usage:
./polyglot <file> <language> -t
./polyglot <file> <language> --token-usage
Displays result in the streaming format, as Cohere generates it displays
./polyglot <file> <language> -s
./polyglot <file> <language> --stream