Spaces:
Runtime error
Runtime error
Download cli/src/helpers.js from dia-gov/AgentGPT-Web-GUI: direct link, hf CLI and curl.
- Browser
- Download file 711 Bytes
-
https://huggingface.co/spaces/dia-gov/AgentGPT-Web-GUI/resolve/main/cli/src/helpers.js
- Command line
-
hf download hf://spaces/dia-gov/AgentGPT-Web-GUI/cli/src/helpers.js
-
curl -L -o helpers.js https://huggingface.co/spaces/dia-gov/AgentGPT-Web-GUI/resolve/main/cli/src/helpers.js
711 Bytes
| import chalk from "chalk"; | |
| import figlet from "figlet"; | |
| export const printTitle = () => { | |
| console.log( | |
| chalk.red( | |
| figlet.textSync("AgentGPT", { | |
| horizontalLayout: "full", | |
| font: "ANSI Shadow", | |
| }) | |
| ) | |
| ); | |
| console.log( | |
| "Welcome to the AgentGPT CLI! This CLI will generate the required .env files." | |
| ); | |
| console.log( | |
| "Copies of the generated envs will be created in `./next/.env` and `./platform/.env`.\n" | |
| ); | |
| }; | |
| // Function to check if entered api key is in the correct format or empty | |
| export const isValidKey = (apikey, pattern) => { | |
| return (apikey === "" || pattern.test(apikey)) | |
| }; | |
| export const validKeyErrorMessage = "\nInvalid api key. Please try again." | |