-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy readme to overview and quickstart
- Loading branch information
1 parent
ad9bbd1
commit aaf9d79
Showing
2 changed files
with
117 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,36 @@ | ||
# Overview | ||
|
||
TaskWeaver is a code-first agent framework | ||
A **code-first** agent framework for seamlessly planning and executing data analytics tasks. | ||
This innovative framework interprets user requests through coded snippets and efficiently | ||
coordinates a variety of plugins in the form of functions to execute | ||
data analytics tasks | ||
|
||
**Highlighted Features** | ||
|
||
- [x] **Rich data structure** - TaskWeaver allows you to work with rich data | ||
structures in Python, such as DataFrames, instead of having to work with | ||
text strings. | ||
- [x] **Customized algorithms** - TaskWeaver allows you to encapsulate your | ||
own algorithms into plugins (in the form of Python functions), | ||
and orchestrate them to achieve complex tasks. | ||
- [x] **Incorporating domain-specific knowledge** - TaskWeaver is designed to | ||
be easily incorporating domain-specific knowledge, such as the knowledge | ||
of execution flow, to improve the reliability of the AI copilot. | ||
- [x] **Stateful conversation** - TaskWeaver is designed to support stateful | ||
conversation. It can remember the context of the conversation and | ||
leverage it to improve the user experience. | ||
- [x] **Code verification** - TaskWeaver is designed to verify the generated code | ||
before execution. It can detect potential issues in the generated code | ||
and provide suggestions to fix them. | ||
- [x] **Easy to use** - TaskWeaver is designed to be easy to use. | ||
We provide a set of sample plugins and a tutorial to help you get started. | ||
Users can easily create their own plugins based on the sample plugins. | ||
TaskWeaver offers an open-box experience, allowing users to run a service immediately after installation. | ||
- [x] **Easy to debug** - TaskWeaver is designed to be easy to debug. | ||
We have detailed logs to help you understand what is going on during calling the LLM, | ||
the code generation, and execution process. | ||
- [x] **Security consideration** - TaskWeaver supports a basic session management to keep | ||
different users' data separate. The code execution is separated into different processes in order not to interfere with each other. | ||
- [x] **Easy extension** - TaskWeaver is designed to be easily extended to accomplish | ||
more complex tasks. You can create multiple AI copilots to | ||
act in different roles, and orchestrate them to achieve complex tasks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,83 @@ | ||
# This is the quick start | ||
# Quick Start | ||
|
||
## Installation | ||
You can install TaskWeaver by running the following command: | ||
```bash | ||
# [optional] create a conda environment to isolate the dependencies | ||
# conda create -n taskweaver python=3.10 | ||
# conda activate taskweaver | ||
|
||
# clone the repository | ||
git clone https://github.com/microsoft/TaskWeaver.git | ||
cd TaskWeaver | ||
# install the requirements | ||
pip install -r requirements.txt | ||
``` | ||
|
||
|
||
## Project Directory | ||
TaskWeaver runs as a process, you need to create a project directory to store plugins and configuration files. | ||
We provided a sample project directory in the `project` folder. You can copy the `project` folder to your workspace. | ||
A project directory typically contains the following files and folders: | ||
|
||
```bash | ||
📦project | ||
┣ 📜taskweaver_config.json # the configuration file for TaskWeaver | ||
┣ 📂plugins # the folder to store plugins | ||
┣ 📂planner_examples # the folder to store planner examples | ||
┣ 📂codeinterpreter_examples # the folder to store code interpreter examples | ||
┣ 📂sample_data # the folder to store sample data used for evaluations | ||
┣ 📂logs # the folder to store logs, will be generated after program starts | ||
┗ 📂workspace # the directory stores session data, will be generated after program starts | ||
┗ 📂 session_id | ||
┣ 📂ces # the folder used by the code execution service | ||
┗ 📂cwd # the current working directory to run the generated code | ||
``` | ||
|
||
## OpenAI Configuration | ||
Before running TaskWeaver, you need to provide your OpenAI API key and other necessary information. | ||
You can do this by editing the `taskweaver_config.json` file. | ||
If you are using Azure OpenAI, you need to set the following parameters in the `taskweaver_config.json` file: | ||
### Azure OpenAI | ||
```json | ||
{ | ||
"llm.api_base": "https://xxx.openai.azure.com/", | ||
"llm.api_key": "your_api_key", | ||
"llm.api_type": "azure", | ||
"llm.api_version": "the api version", | ||
"llm.model": "the model name, e.g., gpt-4" | ||
} | ||
``` | ||
|
||
### OpenAI | ||
```json | ||
{ | ||
"llm.api_key": "the api key", | ||
"llm.model": "the model name, e.g., gpt-4" | ||
} | ||
``` | ||
>💡 Only the latest OpenAI API supports the `json_object` response format. | ||
> If you are using an older version of OpenAI API, you need to set the `llm.response_format` to `null`. | ||
More configuration options can be found in the [configuration documentation](docs/configuration.md). | ||
|
||
## Start TaskWeaver | ||
```bash | ||
# assume you are in the taskweaver folder | ||
# -p is the path to the project directory | ||
python -m taskweaver -p ./project/ | ||
``` | ||
This will start the TaskWeaver process and you can interact with it through the command line interface. | ||
If everything goes well, you will see the following prompt: | ||
|
||
``` | ||
========================================================= | ||
_____ _ _ __ | ||
|_ _|_ _ ___| | _ | | / /__ ____ __ _____ _____ | ||
| |/ _` / __| |/ /| | /| / / _ \/ __ `/ | / / _ \/ ___/ | ||
| | (_| \__ \ < | |/ |/ / __/ /_/ /| |/ / __/ / | ||
|_|\__,_|___/_|\_\|__/|__/\___/\__,_/ |___/\___/_/ | ||
========================================================= | ||
TaskWeaver: I am TaskWeaver, an AI assistant. To get started, could you please enter your request? | ||
Human: ___ | ||
``` |