Skip to content

Commit ba99aab

Browse files
committed
Move PizzaBot project to another solution.
1 parent ab09f1f commit ba99aab

File tree

18 files changed

+170
-21
lines changed

18 files changed

+170
-21
lines changed

PizzaBot.sln

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.6.33712.159
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStarter", "src\WebStarter\WebStarter.csproj", "{07AD18C5-CE7B-495A-815F-170E93CCC42A}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}"
9+
EndProject
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.PizzaBot", "tests\BotSharp.Plugin.PizzaBot\BotSharp.Plugin.PizzaBot.csproj", "{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}"
11+
EndProject
12+
Global
13+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
14+
Debug|Any CPU = Debug|Any CPU
15+
Debug|x64 = Debug|x64
16+
Release|Any CPU = Release|Any CPU
17+
Release|x64 = Release|x64
18+
EndGlobalSection
19+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20+
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|x64.ActiveCfg = Debug|Any CPU
23+
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Debug|x64.Build.0 = Debug|Any CPU
24+
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|x64.ActiveCfg = Release|Any CPU
27+
{07AD18C5-CE7B-495A-815F-170E93CCC42A}.Release|x64.Build.0 = Release|Any CPU
28+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|x64.ActiveCfg = Debug|Any CPU
31+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Debug|x64.Build.0 = Debug|Any CPU
32+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|Any CPU.ActiveCfg = Release|Any CPU
33+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|Any CPU.Build.0 = Release|Any CPU
34+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|x64.ActiveCfg = Release|Any CPU
35+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E}.Release|x64.Build.0 = Release|Any CPU
36+
EndGlobalSection
37+
GlobalSection(SolutionProperties) = preSolution
38+
HideSolutionNode = FALSE
39+
EndGlobalSection
40+
GlobalSection(NestedProjects) = preSolution
41+
{A1118A2C-C6D7-4E22-9462-964AEC7CC46E} = {32FAFFFE-A4CB-4FEE-BF7C-84518BBC6DCC}
42+
EndGlobalSection
43+
GlobalSection(ExtensibilityGlobals) = postSolution
44+
SolutionGuid = {A9969D89-C98B-40A5-A12B-FC87E55B3A19}
45+
EndGlobalSection
46+
EndGlobal

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The main documentation for the site is organized into the following sections:
4040
:caption: Get Started with BotSharp
4141

4242
quick-start/overview
43+
quick-start/get-started
4344
quick-start/installation
4445

4546
.. _agent-docs:
16 KB
Loading
200 KB
Loading
32.6 KB
Loading
81.3 KB
Loading

docs/quick-start/get-started.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Get Started
2+
3+
### Get started with Pizza Bot
4+
5+
In order to allow developers to experience the convenience of BotSharp as quickly as possible, we have designed a basic sample project PizzaBot. This example allows you to run it quickly on your local machine. This example requires `llama-2` quantized model downloaded with `gguf` format if you want to run locally.
6+
7+
```console
8+
git clone https://github.com/SciSharp/BotSharp
9+
```
10+
11+
Double click `PizzaBot` to start the solution.
12+
![Pizza Bot](assets/PizzaBotSample1.png)
13+
14+
Hit `WebStarter` to run it in Debug mode.
15+
![Pizza Bot Starter](assets/PizzaBotSample2.png)
16+
17+
Here you go, you will see this running screen.
18+
![Pizza Bot Starter](assets/PizzaBotSample3.png)
19+
20+
Next, try to access the chat from `Open API`, we public our [Postman collection](https://www.postman.com/orange-flare-634868/workspace/botsharp/collection/1346299-d1a31c49-825d-4449-bdc8-936c66ff6bfd). Remember to set the environment as `localhost`.
21+
![Pizza Bot Starter](assets/PizzaBotSample4.png)

src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/ChatCompletionProvider.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ public async Task<bool> GetChatCompletionsAsync(Agent agent,
119119
}
120120
else
121121
{
122-
_logger.LogInformation($"[{agent.Name}] {message.Role}: {message.Content}");
123-
124122
var msg = new RoleDialogModel(AgentRole.Assistant, message.Content)
125123
{
126124
CurrentAgentId= agent.Id

src/Plugins/BotSharp.Plugin.LLamaSharp/Providers/ChatCompletionProvider.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System;
1414
using System.Collections.Generic;
1515
using System.Linq;
16+
using System.Text;
1617
using System.Threading.Tasks;
1718

1819
namespace BotSharp.Plugin.LLamaSharp.Providers;
@@ -51,9 +52,9 @@ public async Task<bool> GetChatCompletionsAsync(Agent agent,
5152

5253
var inferenceParams = new InferenceParams()
5354
{
54-
Temperature = 0.9f,
55-
AntiPrompts = new List<string> { $"{AgentRole.User}:" },
56-
MaxTokens = 256
55+
Temperature = 0.1f,
56+
AntiPrompts = new List<string> { $"{AgentRole.User}:", "[/INST]" },
57+
MaxTokens = 64
5758
};
5859

5960
string totalResponse = "";
@@ -77,8 +78,6 @@ public async Task<bool> GetChatCompletionsAsync(Agent agent,
7778
totalResponse = totalResponse.Replace(anti, "").Trim();
7879
}
7980

80-
_logger.LogInformation($"[{agent.Name}] {AgentRole.Assistant}: {totalResponse}");
81-
8281
var msg = new RoleDialogModel(AgentRole.Assistant, totalResponse)
8382
{
8483
CurrentAgentId = agent.Id

src/WebStarter/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using BotSharp.Abstraction.Users;
22
using BotSharp.Core;
33
using BotSharp.Core.Users.Services;
4-
using EntityFrameworkCore.BootKit;
54
using Microsoft.AspNetCore.Authentication.JwtBearer;
65
using Microsoft.IdentityModel.Tokens;
76
using System.Text;

0 commit comments

Comments
 (0)