Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleLittleCloud committed May 25, 2024
1 parent 2f13eb0 commit 827f468
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
18 changes: 1 addition & 17 deletions ChatRoom/ChatRoom.Client/ChatRoomClientCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ namespace ChatRoom.Client;

public class ChatRoomClientCommandSettings : CommandSettings
{
[Description("The room name to create.")]
[CommandOption("-r|--room <ROOM>")]
public string? Room { get; init; } = null;

[Description("The port to listen.")]
[CommandOption("-p|--port <PORT>")]
public int? Port { get; init; } = null;

[Description("Your name in the room")]
[CommandOption("-n|--name <NAME>")]
public string YourName { get; init; } = "User";

[Description("Configuration file")]
[CommandOption("-c|--config <CONFIG>")]
public string? ConfigFile { get; init; } = null;
Expand All @@ -39,15 +27,11 @@ public override async Task<int> ExecuteAsync(CommandContext context, ChatRoomCli
? JsonSerializer.Deserialize<ChatRoomClientConfiguration>(File.ReadAllText(command.ConfigFile))!
: new ChatRoomClientConfiguration();

config.RoomConfig.Room = command.Room ?? config.RoomConfig.Room;
config.RoomConfig.Port = command.Port ?? config.RoomConfig.Port;
config.YourName = command.YourName;

var host = Host.CreateDefaultBuilder()
.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering(config.RoomConfig.Port)
.UseLocalhostClustering(gatewayPort: config.RoomConfig.Port)
.AddMemoryGrainStorage("PubSubStore")
.ConfigureLogging(logBuilder =>
{
Expand Down
3 changes: 0 additions & 3 deletions ChatRoom/ChatRoom.Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using ChatRoom.Client;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Spectre.Console.Cli;

var app = new CommandApp<ChatRoomClientCommand>();
Expand Down
6 changes: 1 addition & 5 deletions website/get_start/install_openai_agent.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
## Installation
To install `ChatRoom.OpenAI` agent, run the following command:
```bash
dotnet tool install --global ChatRoom.OpenAI
```

After the agent is installed, you can start the agent with the following command:
```bash
chatroom-openai
```

## Configuration
You can configure `ChatRoom.OpenAI` agent by creating a configuration file and pass it to the agent. Below is an example of a configuration file for the agent:

Expand Down
2 changes: 1 addition & 1 deletion website/get_start/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
href: use_client.md

- name: Install agents
href: install_agents.md
href: Install_agents.md

- name: Install OpenAI agent
href: install_openai_agent.md

0 comments on commit 827f468

Please sign in to comment.