Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme on how to get start with template #122

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 33 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,54 @@
- **Server mode**: You can run `ChatRoom.Client` as a restful server. For more information, see [Server mode](#-server-mode).
- **Extensible**: Create your own agents and integrate them into the chatroom.

## 🚀 Quick Start with OpenAI
1. Install the `ChatRoom.Client` and `ChatRoom.OpenAI` tools from NuGet.
## Install from NuGet
`Agent Chatroom` is published as a dotnet tool on nuget.org. You can install the latest `Agent Chatroom` client from nuget.org by running the following command, this will install the `ChatRoom.Client` globally:

```bash
dotnet tool install -g ChatRoom.Client
dotnet tool install -g ChatRoom.OpenAI
dotnet tool install --global ChatRoom.Client
```

2. Create configuration files from one of the templates

## 🚀 Quick Start with template
Writing configuration from scratch is painful, so `Agent Chatroom` provides a series of templates to help you get started quickly. Use the `list-templates` command to list all available templates and the `create` command to create a configuration from the selected template.

> [!TIP]
> `create` command also generates a json schema file for this configuration to provide intellisense in your editor. Use it wisely!

### Step 1 - Choose from one of the available templates to get started.
```bash
# Create configuration file for ChatRoom.Client
chatroom create -t chatroom -o chatroom-client.json
chatroom list-templates # list all available templates
```

The command will list all available templates.

![list-templates](assets/list-templates.png)
### Step 2 - Create configuration from the selected template.

Instead of writing configuration from scratch, an easier route is to create a chatroom configuration from the selected template using the `create` command, which will not only create a configuration file but also generate a json schema file for this configuration to provide intellisense in your editor.

# Create configuration file for ChatRoom.OpenAI
chatroom-openai create -t openai -o chatroom-openai.json
```bash
# Create
chatroom create -t chatroom_openai -o chatroom_openai.json
```

3. Fill in the configuration files with your OpenAI API key and other information.
4. Start the chatroom client with the OpenAI agent.
![fill key](assets/fill-openai-key.png)

### Step 3 - Start the chatroom client with the OpenAI agent.

After filling in the OpenAI key in the configuration file, you can start the chatroom client with the following command.

```bash
# start chatroom server
chatroom run -c chatroom-client.json

# in another terminal, add the OpenAI agent to the chatroom server
chatroom-openai run -c chatroom-openai.json
chatroom run -c chatroom_openai.json
```

You will see the following output from chatroom client which indicates the web UI is available at `http://localhost:51237` and `https://localhost:51238`.
You will see the following output from chatroom client which indicates the web UI is available at `http://localhost:51237` and `https://localhost:51238`. You can navigate to the web UI in your browser and start chatting with the agents.

```bash
web ui is available at: http://localhost:51237;https://localhost:51238
```

Navigate to the web UI in your browser and start chatting with the agents.

## 📦 Pre-configured Chatrooms
We provide the following configuration to help you get started quickly. More configurations will be added in the future.
- [OpenAI-Chatroom](https://github.com/LittleLittleCloud/OpenAI-Chatroom): chat with OpenAI gpt.
Expand Down
Binary file added assets/fill-openai-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/list-templates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 5 additions & 29 deletions website/get_start/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,19 @@
> To use `Agent Chatroom`, make sure you have [.NET 8.0](https://dotnet.microsoft.com/download/dotnet/8.0) installed.

## Package overview
- [ChatRoom.Client](https://www.nuget.org/packages/ChatRoom.Client): The client for `Agent Chatroom`. It contains the multi-agent webui, chatroom server and an optional console ui for chatroom client.
- [ChatRoom.Client](https://www.nuget.org/packages/ChatRoom.Client): The **all-in-one** package for `Agent Chatroom`. It contains the multi-agent webui, every agent packages, and an optional console ui for chatroom client.
- [ChatRoom.SDK](https://www.nuget.org/packages/ChatRoom.SDK): The SDK for developing agents and orchestrators for `Agent Chatroom`.

### Agent packages
- [ChatRoom.OpenAI](https://www.nuget.org/packages/ChatRoom.OpenAI): An agent package for `Agent Chatroom` that provides OpenAI agents.
- [ChatRoom.Powershell](https://www.nuget.org/packages/ChatRoom.Powershell): An agent package for `Agent Chatroom` that provides Powershell helper agents.
- [ChatRoom.BingSearch](https://www.nuget.org/packages/ChatRoom.BingSearch): An agent package for `Agent Chatroom` that provides Bing search agents.
- [ChatRoom.WebSearch](https://www.nuget.org/packages/ChatRoom.WebSearch): An agent package for `Agent Chatroom` that provides Bing search agent and Google search agent.
- [ChatRoom.Github](https://www.nuget.org/packages/ChatRoom.Github): An agent package for `Agent Chatroom` that provides Github issue helper agents.
- [ChatRoom.Planner](https://www.nuget.org/packages/ChatRoom.Planner): An agent package for `Agent Chatroom` that provides a react planner agent and corresponding orchestrator for multi-agent groups.


## Install client
You can install the latest `Agent Chatroom` client from nuget.org by running the following command, this will install the `ChatRoom.Client` globally:
```bash
dotnet tool install --global ChatRoom.Client
```

Optionally, you can install the latest `Agent Chatroom` client locally by removing the `--global` flag:
```bash
dotnet tool install ChatRoom.Client
```

## Configure client
After installation, you need to create a configuration file for the `Agent Chatroom` client. The configuration file is a JSON file that contains the configuration for the client, including the agent packages and server configuration.

> [!Tip]
> You can find the schema for configuration files under the [schema](https://github.com/LittleLittleCloud/Agent-ChatRoom/tree/main/schema) folder in the `Agent Chatroom` repository.

Here is an example configuration file for the `Agent Chatroom` client, which starts webui on `http://localhost:51234` and `https://localhost:51235` and uses the `ChatRoom.OpenAI` agent package.

[!code-json[](../../configuration/chatroom-client.json)]

## Usage
After installation, you can start the `Agent Chatroom` client by running the following command:
```bash
chatroom -c /path/to/your/client_configuration.json
```

You will see the following output similar to the following, then you can navigate to the web UI in your browser and start chatting with the agents.
```bash
web ui is available at: http://localhost:51234;https://localhost:51235
```
```
2 changes: 1 addition & 1 deletion website/get_start/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
href: key_concepts.md
- name: Installation
href: installation.md
- name: Configuration Examples
- name: Showcases
items:
- name: Chat with OpenAI
href: chat_with_openai.md
Expand Down
Loading