BotSharp/docs/quick-start/get-started.md

51 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

# Get Started
### Get started with Pizza Bot
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.
2023-09-18 18:41:49 +00:00
### Run in command line
2024-01-18 11:30:28 +00:00
```shell
git clone https://github.com/SciSharp/BotSharp
2023-09-18 18:41:49 +00:00
cd BotSharp
2024-01-18 11:30:28 +00:00
# Run PizzzaBot showcase with package reference
2023-09-18 18:41:49 +00:00
dotnet run --project .\src\WebStarter\WebStarter.csproj -p SolutionName=PizzaBot
2024-01-18 11:30:28 +00:00
# Use BotSharp to include all dependent projects with latest source code
dotnet run --project .\src\WebStarter\WebStarter.csproj -p SolutionName=BotSharp
```
Here you go, you will see this running screen.
2023-09-18 18:41:49 +00:00
![Pizza Bot Starter](assets/PizzaBotSample3.png)
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`.
2023-09-18 18:41:49 +00:00
![Pizza Bot Starter](assets/PizzaBotSample4.png)
2023-09-18 18:41:49 +00:00
2023-12-31 18:08:56 +00:00
### Launch the UI
BotSharp has an official front-end project to be used in conjunction with the backend. The main function of this project is to allow developers to visualize various configurations of the backend.
```console
git clone https://github.com/SciSharp/BotSharp-UI
cd BotSharp-UI
2024-01-18 11:30:28 +00:00
npm install
2023-12-31 18:08:56 +00:00
npm run dev
```
Access the http://localhost:5015/
![BotSharp UI Router](assets/BotSharp-UI-Router.png)
2023-09-18 18:41:49 +00:00
### Run in debug mode
If you have Visual Studio installed, you can run it in debug mode.
Double click `PizzaBot` to start the solution.
![Pizza Bot](assets/PizzaBotSample1.png)
Hit `WebStarter` to run it in Debug mode, or you can start from command line
![Pizza Bot Starter](assets/PizzaBotSample2.png)