BotSharp/docs/quick-start/get-started.md
2024-03-09 08:08:02 +08:00

51 lines
1.8 KiB
Markdown

# 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.
### Run in command line
```shell
git clone https://github.com/SciSharp/BotSharp
cd BotSharp
# Run PizzzaBot showcase with package reference
dotnet run --project .\src\WebStarter\WebStarter.csproj -p SolutionName=PizzaBot
# 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.
![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`.
![Pizza Bot Starter](assets/PizzaBotSample4.png)
### 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
npm install
npm run dev
```
Access the http://localhost:5015/
![BotSharp UI Router](assets/BotSharp-UI-Router.png)
### 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)