BotSharp/src/Plugins/UiAdapters/BotSharp.UiAdapter.HuggingChatUI/HuggingChat-UI.md

25 lines
583 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
import { BASE_URL } from '$lib/clientConfig.js'
# Change all ${base} to ${BASE_URL}
${base}/conversation -> ${BASE_URL}/conversation
```