auto-gpt-ts
Version:
my take of Auto-GPT in typescript
55 lines • 2.94 kB
JavaScript
;
/**
* this file is the entry point for the CLI version of Auto-GPT
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const dotenv = __importStar(require("dotenv")); // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
dotenv.config();
const commander = __importStar(require("commander"));
const main_1 = require("./main");
const program = new commander.Command();
program
.name("autogpt")
.usage("[options]")
.option("-c, --continuous", "Enable Continuous Mode")
.option("-y, --skip-reprompt", "Skips the re-prompting messages at the beginning of the script")
.option("-C, --ai-settings <file>", "Specifies which ai_settings.yaml file to use, will also automatically skip the re-prompt.")
.option("-l, --continuous-limit <limit>", "Defines the number of times to run in continuous mode", parseInt)
.option("--speak", "Enable Speak Mode")
.option("--debug", "Enable Debug Mode")
.option("--gpt3only", "Enable GPT3.5 Only Mode")
.option("--gpt4only", "Enable GPT4 Only Mode")
.option("-m, --use-memory <type>", "Defines which Memory backend to use")
.option("-b, --browser-name <name>", "Specifies which web-browser to use when using selenium to scrape the web.")
.option("--allow-downloads", "Dangerous: Allows Auto-GPT to download files natively.")
.option("--skip-news", "Specifies whether to suppress the output of latest news on startup.")
.option("-w, --workspace-directory <dir>", "Specifies the workspace directory path");
program.parse(process.argv);
if (program.args.length === 0) {
const opt = program.opts();
(0, main_1.runAutoGpt)(opt.continuous, opt.continuousLimit, opt.aiSettings, opt.skipReprompt, opt.speak, opt.debug, opt.gpt3only, opt.gpt4only, opt.useMemory, opt.browserName, opt.allowDownloads, opt.skipNews, opt.workspaceDirectory);
}
//# sourceMappingURL=cli.js.map