@@ -25,6 +25,10 @@ import {
25
25
mockUserInput16 ,
26
26
mockUserInput17
27
27
} from '../browser/src/constants/mockData' ;
28
+
29
+ const TEST_GPT = false ;
30
+ const TEST_SKYLARK = true ;
31
+
28
32
const demoDataList : { [ key : string ] : any } = {
29
33
pie : mockUserInput2 ,
30
34
'dynamic bar zh_cn' : mockUserInput6 ,
@@ -55,7 +59,6 @@ const START_INDEX = 0;
55
59
56
60
const modelResultMap = {
57
61
[ Model . GPT3_5 ] : { totalCount : 0 , successCount : 0 , totalTime : 0 } ,
58
- [ Model . SKYLARK ] : { totalCount : 0 , successCount : 0 , totalTime : 0 } ,
59
62
[ Model . SKYLARK2 ] : { totalCount : 0 , successCount : 0 , totalTime : 0 }
60
63
} ;
61
64
@@ -90,48 +93,34 @@ const dataList = Object.keys(demoDataList);
90
93
91
94
const gptKey = process . env . VITE_GPT_KEY ;
92
95
const gptURL = process . env . VITE_GPT_JEST_URL ;
93
- if ( gptKey && gptURL ) {
96
+ if ( gptKey && gptURL && TEST_GPT ) {
94
97
const vmind = new VMind ( {
95
98
url : gptURL ,
96
99
model : Model . GPT3_5 ,
97
100
cache : true ,
101
+ showThoughts : false ,
98
102
headers : {
99
103
'api-key' : gptKey
100
104
}
101
105
} ) ;
102
106
testPerformance ( Model . GPT3_5 , vmind ) ;
103
107
}
104
108
105
- //const skylarkKey = process.env.VITE_SKYLARK_KEY;
106
- //const skylarkURL = process.env.VITE_SKYLARK_JEST_URL;
107
-
108
- //if (skylarkKey && skylarkURL) {
109
- // const vmind = new VMind({
110
- // url: skylarkURL,
111
- // model: Model.SKYLARK,
112
- // cache: false,
113
- // headers: {
114
- // 'api-key': skylarkKey
115
- // }
116
- // });
117
- // testPerformance(Model.SKYLARK, vmind);
118
- //}
119
-
120
109
const skylark2Key = process . env . VITE_SKYLARK_KEY ;
121
110
const skylark2URL = process . env . VITE_SKYLARK_JEST_URL ;
122
111
123
- // if (skylark2Key && skylark2URL) {
124
- // const vmind = new VMind({
125
- // url: skylark2URL,
126
- // model: Model.SKYLARK2,
127
- // cache: false ,
128
- // showThoughts: false,
129
- // headers: {
130
- // 'api-key': skylark2Key
131
- // }
132
- // });
133
- // testPerformance(Model.SKYLARK2, vmind);
134
- // }
112
+ if ( skylark2Key && skylark2URL && TEST_SKYLARK ) {
113
+ const vmind = new VMind ( {
114
+ url : skylark2URL ,
115
+ model : Model . SKYLARK2 ,
116
+ cache : true ,
117
+ showThoughts : false ,
118
+ headers : {
119
+ 'api-key' : skylark2Key
120
+ }
121
+ } ) ;
122
+ testPerformance ( Model . SKYLARK2 , vmind ) ;
123
+ }
135
124
136
125
afterAll ( ( ) => {
137
126
log ( '---------------VMind performance test---------------' ) ;
0 commit comments