File tree Expand file tree Collapse file tree 3 files changed +1
-23
lines changed Expand file tree Collapse file tree 3 files changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -32,30 +32,12 @@ const MyChatBot = () => {
32
32
// initialize the plugin
33
33
const plugins = [LlmConnector ()];
34
34
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
-
53
35
// example flow for testing
54
36
const flow: Flow = {
55
37
start: {
56
38
message: " Hello, feel free to ask away!" ,
57
39
chatDisabled: true ,
58
- transition: 0
40
+ transition: 0 ,
59
41
path: " webllm" ,
60
42
},
61
43
webllm: {
@@ -66,10 +48,6 @@ const MyChatBot = () => {
66
48
model: ' Qwen2-0.5B-Instruct-q4f16_1-MLC' ,
67
49
}),
68
50
outputType: ' character' ,
69
- stopConditions: {
70
- onUserMessage: onUserMessageCheck,
71
- onKeyDown: onKeyDownCheck,
72
- },
73
51
},
74
52
},
75
53
};
You can’t perform that action at this time.
0 commit comments