BotSharp/src/Plugins/BotSharp.Plugin.HuggingFace/HuggingChat-UI.md

25 lines
580 B
Markdown
Raw Normal View History

2023-06-03 14:29:50 +00:00
# Chatbot UI
[HuggingChat UI](https://github.com/huggingface/chat-ui) is A chat interface using open source models, eg OpenAssistant..
```shell
git clone https://github.com/huggingface/chat-ui
npm i
npm run dev
```
Add `clientConfig.js` file in `src/lib` folder
```js
import { base } from "$app/paths";
export const BASE_URL = `http://localhost:5500${base}`;
```
* Copy `.env` as `.env.local`
Add BotSharp host in the API endpoint
```svelte
2023-06-07 00:59:32 +00:00
import { BASE_URL } from '$lib/clientConfig'
2023-06-03 14:29:50 +00:00
# Change all ${base} to ${BASE_URL}
${base}/conversation -> ${BASE_URL}/conversation
```