终端
这是TaskWeaver的命令行界面。您可以通过此界面与TaskWeaver进行交互。
按照快速入门中的指引克隆代码库并填写必要的配置。
在终端中运行以下命令。
# assume you are in the TaskWeaver folder
python -m taskweaver -p ./project/ # -p is the path to the project directory
这将启动TaskWeaver进程,您可以通过命令行界面与之交互。 如果一切顺利,您将看到以下提示:
=========================================================
_____ _ _ __
|_ _|_ _ ___| | _ | | / /__ ____ __ _____ _____
| |/ _` / __| |/ /| | /| / / _ \/ __ `/ | / / _ \/ ___/
| | (_| \__ \ < | |/ |/ / __/ /_/ /| |/ / __/ /
|_|\__,_|___/_|\_\|__/|__/\___/\__,_/ |___/\___/_/
=========================================================
TaskWeaver: I am TaskWeaver, an AI assistant. To get started, could you please enter your request?
Human: ___
我们提供了一组与TaskWeaver交互的命令。您可以输入help查看可用命令列表。
所有命令都以/字符开头。例如,您可以输入/help查看可用命令列表。
TaskWeaver ▶ I am TaskWeaver, an AI assistant. To get started, could you please enter your request?
Human ▶ /help
TaskWeaver Chat Console
-----------------------
/load <file>: load a file
/info: print the information of the current session
/reset: reset the session
/clear: clear the console
/exit: exit the chat console
/help: print this help message
/save: save the chat history of the current session for experience extraction
TaskWeaver支持的命令表如下:
| 命令 | 描述 |
|---|---|
/load <file> | Load a file by its absolute path, e.g., /load /home/taskweaver/sample.csv |
/info | Print the session id and the active roles of the current session |
/reset | Reset the current session and start a new session |
/clear | Clear the console content |
/exit | Exit the chat console |
/help | Print the help message |
/save | Save the chat history of the current session for experience extraction |
tip
当TaskWeaver运行生成的代码时,CWD(当前工作目录)会被设置为project/workspace/session_id/cwd目录。
如果你需要在生成的代码中使用相对路径,cwd目录应该作为基础路径。