Skip to content

Commit 969534a

Browse files
committed
chore: Minor fixes
1 parent 35c5e7f commit 969534a

File tree

5 files changed

+18
-39
lines changed

5 files changed

+18
-39
lines changed

docs/examples/llm_conversation.md

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords: [react, chat, chatbot, chatbotify]
77

88
# LLM Conversation
99

10-
The following is an example showing how to integrate in-browser models (e.g. via [**WebLlm**](https://webllm.mlc.ai/)/[**Wllama**](https://www.npmjs.com/package/@wllama/wllama)) into React ChatBotify. It leverages on the [**LLM Connector Plugin**](https://www.npmjs.com/package/@rcb-plugins/llm-connector), which is maintained separately on the [**React ChatBotify Plugins**](https://github.com/orgs/React-ChatBotify-Plugins) organization. This example also taps on the [**WebLlmProvider**](https://github.com/React-ChatBotify-Plugins/llm-connnector/blob/main/docs/providers/WebLlm.md) and [**WllamaProvider**](https://github.com/React-ChatBotify-Plugins/llm-connnector/blob/main/docs/providers/Wllama.md), both of which ships by default with the LLM Connector Plugin. If you require support with the plugin, please reach out to support on the [**plugins discord**](https://discord.gg/J6pA4v3AMW) instead.
10+
The following is an example showing how to integrate in-browser models (e.g. via [**WebLlm**](https://webllm.mlc.ai/)) into React ChatBotify. It leverages on the [**LLM Connector Plugin**](https://www.npmjs.com/package/@rcb-plugins/llm-connector), which is maintained separately on the [**React ChatBotify Plugins**](https://github.com/orgs/React-ChatBotify-Plugins) organization. This example taps on the [**WebLlmProvider**](https://github.com/React-ChatBotify-Plugins/llm-connnector/blob/main/docs/providers/WebLlm.md), which ships by default with the LLM Connector Plugin. If you require support with the plugin, please reach out to support on the [**plugins discord**](https://discord.gg/J6pA4v3AMW) instead.
1111

1212
:::tip
1313

@@ -53,14 +53,10 @@ const MyChatBot = () => {
5353
// example flow for testing
5454
const flow: Flow = {
5555
start: {
56-
message: "Hello, pick a model runtime to get started!",
57-
options: ["WebLlm", "Wllama"],
56+
message: "Hello, feel free to ask away!",
5857
chatDisabled: true,
59-
path: async (params) => {
60-
await params.simulateStreamMessage("Type 'RESTART' or hit 'ESC` to pick another runtime!");
61-
await params.simulateStreamMessage("Ask away!");
62-
return params.userInput.toLowerCase();
63-
},
58+
transition: 0
59+
path: "webllm",
6460
},
6561
webllm: {
6662
llmConnector: {
@@ -76,23 +72,6 @@ const MyChatBot = () => {
7672
},
7773
},
7874
},
79-
wllama: {
80-
llmConnector: {
81-
// provider configuration guide:
82-
// https://github.com/React-ChatBotify-Plugins/llm-connnector/blob/main/docs/providers/Wllama.md
83-
provider: new WllamaProvider({
84-
modelUrl: 'https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct-GGUF/resolve/main/smollm2-360m-instruct-q8_0.gguf',
85-
loadModelConfig: {
86-
n_ctx: 8192,
87-
},
88-
}),
89-
outputType: 'character',
90-
stopConditions: {
91-
onUserMessage: onUserMessageCheck,
92-
onKeyDown: onKeyDownCheck,
93-
},
94-
},
95-
},
9675
};
9776

9877
return (

package-lock.json

Lines changed: 5 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@mdx-js/react": "^3.0.1",
2525
"@rcb-plugins/html-renderer": "^0.1.0",
2626
"@rcb-plugins/input-validator": "^0.2.0",
27-
"@rcb-plugins/llm-connector": "^0.2.0",
27+
"@rcb-plugins/llm-connector": "^0.3.0",
2828
"@rcb-plugins/markdown-renderer": "^0.1.1",
2929
"clsx": "^1.2.1",
3030
"openai": "^4.47.1",

src/css/custom.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
/* You can override the default Infima variables here. */
88
:root {
9-
--ifm-pre-background: #000000;
109
--ifm-color-primary: #491d8d;
1110
--ifm-color-primary-dark: #441b83;
1211
--ifm-color-primary-darker: #411b7a;
@@ -106,4 +105,12 @@ table th:nth-of-type(4) {
106105
.hero .rcb-options:hover {
107106
color: white !important;
108107
background-color: var(--ifm-color-inverse-primary) !important;
108+
}
109+
110+
/* ensure code blocks can be seen in chatbot */
111+
#floating-chat-bot pre {
112+
--ifm-pre-background: #000000;
113+
}
114+
#landing-page-chat-bot pre {
115+
--ifm-pre-background: #000000;
109116
}

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
},
1212
"include": [
1313
"src/**/*",
14-
"node_modules/@wllama/wllama/**/*"
1514
]
1615
}

0 commit comments

Comments
 (0)