Skip to content

Commit 1536841

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

File tree

3 files changed

+1
-23
lines changed

3 files changed

+1
-23
lines changed

docs/examples/llm_conversation.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,12 @@ const MyChatBot = () => {
3232
// initialize the plugin
3333
const plugins = [LlmConnector()];
3434

35-
// checks user message stop condition to end llm conversation
36-
const onUserMessageCheck = async (message: Message) => {
37-
if (
38-
typeof message.content === 'string' &&
39-
message.content.toUpperCase() === 'RESTART'
40-
) {
41-
return 'start';
42-
}
43-
};
44-
45-
// checks key down stop condition to end llm conversation
46-
const onKeyDownCheck = async (event: KeyboardEvent) => {
47-
if (event.key === 'Escape') {
48-
return 'start';
49-
}
50-
return null;
51-
}
52-
5335
// example flow for testing
5436
const flow: Flow = {
5537
start: {
5638
message: "Hello, feel free to ask away!",
5739
chatDisabled: true,
58-
transition: 0
40+
transition: 0,
5941
path: "webllm",
6042
},
6143
webllm: {
@@ -66,10 +48,6 @@ const MyChatBot = () => {
6648
model: 'Qwen2-0.5B-Instruct-q4f16_1-MLC',
6749
}),
6850
outputType: 'character',
69-
stopConditions: {
70-
onUserMessage: onUserMessageCheck,
71-
onKeyDown: onKeyDownCheck,
72-
},
7351
},
7452
},
7553
};

static/multi-thread/wllama.wasm

-1.67 MB
Binary file not shown.

static/single-thread/wllama.wasm

-1.64 MB
Binary file not shown.

0 commit comments

Comments
 (0)