gpt-tokenizer 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -8
- package/cjs/GptEncoding.d.ts +33 -6
- package/cjs/GptEncoding.js +79 -34
- package/cjs/GptEncoding.js.map +1 -1
- package/cjs/GptEncoding.test.js +54 -0
- package/cjs/GptEncoding.test.js.map +1 -1
- package/cjs/encoding/cl100k_base.d.ts +3 -3
- package/cjs/encoding/cl100k_base.js +6 -4
- package/cjs/encoding/cl100k_base.js.map +1 -1
- package/cjs/encoding/p50k_base.d.ts +2 -2
- package/cjs/encoding/p50k_base.js +4 -4
- package/cjs/encoding/p50k_base.js.map +1 -1
- package/cjs/encoding/p50k_edit.d.ts +2 -2
- package/cjs/encoding/p50k_edit.js +4 -4
- package/cjs/encoding/p50k_edit.js.map +1 -1
- package/cjs/encoding/r50k_base.d.ts +2 -2
- package/cjs/encoding/r50k_base.js +4 -4
- package/cjs/encoding/r50k_base.js.map +1 -1
- package/cjs/mapping.d.ts +37 -0
- package/cjs/mapping.js +34 -2
- package/cjs/mapping.js.map +1 -1
- package/cjs/model/gpt-3.5-turbo-0301.d.ts +6 -0
- package/cjs/model/gpt-3.5-turbo-0301.js +38 -0
- package/cjs/model/gpt-3.5-turbo-0301.js.map +1 -0
- package/cjs/model/gpt-3.5-turbo.d.ts +6 -1
- package/cjs/model/gpt-3.5-turbo.js +21 -1
- package/cjs/model/gpt-3.5-turbo.js.map +1 -1
- package/cjs/model/gpt-4-0314.d.ts +6 -0
- package/cjs/model/gpt-4-0314.js +38 -0
- package/cjs/model/gpt-4-0314.js.map +1 -0
- package/cjs/model/gpt-4-32k-0314.d.ts +6 -0
- package/cjs/model/gpt-4-32k-0314.js +38 -0
- package/cjs/model/gpt-4-32k-0314.js.map +1 -0
- package/cjs/model/gpt-4-32k.d.ts +6 -0
- package/cjs/model/gpt-4-32k.js +38 -0
- package/cjs/model/gpt-4-32k.js.map +1 -0
- package/cjs/model/gpt-4.d.ts +6 -1
- package/cjs/model/gpt-4.js +21 -1
- package/cjs/model/gpt-4.js.map +1 -1
- package/cjs/modelParams.d.ts +5 -4
- package/cjs/modelParams.js +7 -4
- package/cjs/modelParams.js.map +1 -1
- package/cjs/specialTokens.d.ts +3 -0
- package/cjs/specialTokens.js +4 -1
- package/cjs/specialTokens.js.map +1 -1
- package/cjs/util.d.ts +2 -0
- package/cjs/util.js +19 -0
- package/cjs/util.js.map +1 -0
- package/dist/cl100k_base.js +1 -1
- package/dist/cl100k_base.js.map +1 -1
- package/dist/p50k_base.js +1 -1
- package/dist/p50k_base.js.map +1 -1
- package/dist/p50k_edit.js +1 -1
- package/dist/p50k_edit.js.map +1 -1
- package/dist/r50k_base.js +1 -1
- package/dist/r50k_base.js.map +1 -1
- package/esm/GptEncoding.d.ts +33 -6
- package/esm/GptEncoding.js +81 -36
- package/esm/GptEncoding.js.map +1 -1
- package/esm/GptEncoding.test.js +55 -1
- package/esm/GptEncoding.test.js.map +1 -1
- package/esm/codegen/generateByModel.js +19 -0
- package/esm/codegen/generateByModel.js.map +1 -0
- package/esm/{generateJsModels.js → codegen/generateJsEncodings.js} +4 -4
- package/esm/codegen/generateJsEncodings.js.map +1 -0
- package/esm/encoding/cl100k_base.d.ts +3 -3
- package/esm/encoding/cl100k_base.js +3 -3
- package/esm/encoding/cl100k_base.js.map +1 -1
- package/esm/encoding/p50k_base.d.ts +2 -2
- package/esm/encoding/p50k_base.js +1 -1
- package/esm/encoding/p50k_base.js.map +1 -1
- package/esm/encoding/p50k_edit.d.ts +2 -2
- package/esm/encoding/p50k_edit.js +1 -1
- package/esm/encoding/p50k_edit.js.map +1 -1
- package/esm/encoding/r50k_base.d.ts +2 -2
- package/esm/encoding/r50k_base.js +1 -1
- package/esm/encoding/r50k_base.js.map +1 -1
- package/esm/mapping.d.ts +37 -0
- package/esm/mapping.js +32 -0
- package/esm/mapping.js.map +1 -1
- package/esm/model/gpt-3.5-turbo-0301.d.ts +6 -0
- package/esm/model/gpt-3.5-turbo-0301.js +11 -0
- package/esm/model/gpt-3.5-turbo-0301.js.map +1 -0
- package/esm/model/gpt-3.5-turbo.d.ts +6 -1
- package/esm/model/gpt-3.5-turbo.js +10 -1
- package/esm/model/gpt-3.5-turbo.js.map +1 -1
- package/esm/model/gpt-4-0314.d.ts +6 -0
- package/esm/model/gpt-4-0314.js +11 -0
- package/esm/model/gpt-4-0314.js.map +1 -0
- package/esm/model/gpt-4-32k-0314.d.ts +6 -0
- package/esm/model/gpt-4-32k-0314.js +11 -0
- package/esm/model/gpt-4-32k-0314.js.map +1 -0
- package/esm/model/gpt-4-32k.d.ts +6 -0
- package/esm/model/gpt-4-32k.js +11 -0
- package/esm/model/gpt-4-32k.js.map +1 -0
- package/esm/model/gpt-4.d.ts +6 -1
- package/esm/model/gpt-4.js +10 -1
- package/esm/model/gpt-4.js.map +1 -1
- package/esm/modelParams.d.ts +5 -4
- package/esm/modelParams.js +6 -3
- package/esm/modelParams.js.map +1 -1
- package/esm/specialTokens.d.ts +3 -0
- package/esm/specialTokens.js +3 -0
- package/esm/specialTokens.js.map +1 -1
- package/esm/util.d.ts +2 -0
- package/esm/util.js +14 -0
- package/esm/util.js.map +1 -0
- package/package.json +8 -6
- package/src/GptEncoding.test.ts +78 -1
- package/src/GptEncoding.ts +125 -44
- package/src/__snapshots__/GptEncoding.test.ts.snap +811 -0
- package/src/codegen/generateByModel.ts +35 -0
- package/src/{generateJsModels.ts → codegen/generateJsEncodings.ts} +3 -3
- package/src/encoding/cl100k_base.ts +5 -1
- package/src/encoding/p50k_base.ts +1 -1
- package/src/encoding/p50k_edit.ts +1 -1
- package/src/encoding/r50k_base.ts +1 -1
- package/src/mapping.ts +42 -0
- package/src/model/gpt-3.5-turbo-0301.ts +32 -0
- package/src/model/gpt-3.5-turbo.ts +32 -1
- package/src/model/gpt-4-0314.ts +32 -0
- package/src/model/gpt-4-32k-0314.ts +32 -0
- package/src/model/gpt-4-32k.ts +32 -0
- package/src/model/gpt-4.ts +32 -1
- package/src/modelParams.ts +17 -10
- package/src/specialTokens.ts +3 -0
- package/src/util.ts +15 -0
- package/esm/generateByModel.js +0 -13
- package/esm/generateByModel.js.map +0 -1
- package/esm/generateJsModels.js.map +0 -1
- package/src/generateByModel.ts +0 -20
- /package/esm/{generateByModel.d.ts → codegen/generateByModel.d.ts} +0 -0
- /package/esm/{generateJsModels.d.ts → codegen/generateJsEncodings.d.ts} +0 -0
|
@@ -0,0 +1,811 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`gpt-3.5-turbo chat functionality encodes a chat correctly 1`] = `
|
|
4
|
+
[
|
|
5
|
+
100264,
|
|
6
|
+
9125,
|
|
7
|
+
198,
|
|
8
|
+
2675,
|
|
9
|
+
527,
|
|
10
|
+
264,
|
|
11
|
+
11190,
|
|
12
|
+
11,
|
|
13
|
+
5497,
|
|
14
|
+
93685,
|
|
15
|
+
287,
|
|
16
|
+
18328,
|
|
17
|
+
430,
|
|
18
|
+
48018,
|
|
19
|
+
13166,
|
|
20
|
+
503,
|
|
21
|
+
71921,
|
|
22
|
+
1139,
|
|
23
|
+
14733,
|
|
24
|
+
6498,
|
|
25
|
+
13,
|
|
26
|
+
100265,
|
|
27
|
+
198,
|
|
28
|
+
100264,
|
|
29
|
+
8858,
|
|
30
|
+
3398,
|
|
31
|
+
198,
|
|
32
|
+
3648,
|
|
33
|
+
80526,
|
|
34
|
+
552,
|
|
35
|
+
690,
|
|
36
|
+
1520,
|
|
37
|
+
6678,
|
|
38
|
+
1948,
|
|
39
|
+
8614,
|
|
40
|
+
6650,
|
|
41
|
+
13,
|
|
42
|
+
100265,
|
|
43
|
+
198,
|
|
44
|
+
100264,
|
|
45
|
+
8858,
|
|
46
|
+
12354,
|
|
47
|
+
11451,
|
|
48
|
+
198,
|
|
49
|
+
42575,
|
|
50
|
+
3318,
|
|
51
|
+
1664,
|
|
52
|
+
3871,
|
|
53
|
+
690,
|
|
54
|
+
5376,
|
|
55
|
+
13254,
|
|
56
|
+
13,
|
|
57
|
+
100265,
|
|
58
|
+
198,
|
|
59
|
+
100264,
|
|
60
|
+
8858,
|
|
61
|
+
3398,
|
|
62
|
+
198,
|
|
63
|
+
10267,
|
|
64
|
+
596,
|
|
65
|
+
12960,
|
|
66
|
+
1203,
|
|
67
|
+
994,
|
|
68
|
+
584,
|
|
69
|
+
617,
|
|
70
|
+
810,
|
|
71
|
+
34494,
|
|
72
|
+
311,
|
|
73
|
+
5916,
|
|
74
|
+
2385,
|
|
75
|
+
389,
|
|
76
|
+
10708,
|
|
77
|
+
369,
|
|
78
|
+
7319,
|
|
79
|
+
33164,
|
|
80
|
+
13,
|
|
81
|
+
100265,
|
|
82
|
+
198,
|
|
83
|
+
100264,
|
|
84
|
+
8858,
|
|
85
|
+
12354,
|
|
86
|
+
11451,
|
|
87
|
+
198,
|
|
88
|
+
10267,
|
|
89
|
+
596,
|
|
90
|
+
3137,
|
|
91
|
+
3010,
|
|
92
|
+
994,
|
|
93
|
+
584,
|
|
94
|
+
2351,
|
|
95
|
+
2753,
|
|
96
|
+
13326,
|
|
97
|
+
922,
|
|
98
|
+
1268,
|
|
99
|
+
311,
|
|
100
|
+
656,
|
|
101
|
+
2731,
|
|
102
|
+
13,
|
|
103
|
+
100265,
|
|
104
|
+
198,
|
|
105
|
+
100264,
|
|
106
|
+
882,
|
|
107
|
+
198,
|
|
108
|
+
2028,
|
|
109
|
+
3389,
|
|
110
|
+
27137,
|
|
111
|
+
3445,
|
|
112
|
+
584,
|
|
113
|
+
1541,
|
|
114
|
+
956,
|
|
115
|
+
617,
|
|
116
|
+
892,
|
|
117
|
+
311,
|
|
118
|
+
44790,
|
|
119
|
+
279,
|
|
120
|
+
18435,
|
|
121
|
+
369,
|
|
122
|
+
279,
|
|
123
|
+
3016,
|
|
124
|
+
6493,
|
|
125
|
+
481,
|
|
126
|
+
13,
|
|
127
|
+
100265,
|
|
128
|
+
198,
|
|
129
|
+
100264,
|
|
130
|
+
78191,
|
|
131
|
+
198,
|
|
132
|
+
]
|
|
133
|
+
`;
|
|
134
|
+
|
|
135
|
+
exports[`gpt-3.5-turbo chat functionality encodes a chat correctly 2`] = `
|
|
136
|
+
"<|im_start|>system
|
|
137
|
+
You are a helpful, pattern-following assistant that translates corporate jargon into plain English.<|im_end|>
|
|
138
|
+
<|im_start|>example_user
|
|
139
|
+
New synergies will help drive top-line growth.<|im_end|>
|
|
140
|
+
<|im_start|>example_assistant
|
|
141
|
+
Things working well together will increase revenue.<|im_end|>
|
|
142
|
+
<|im_start|>example_user
|
|
143
|
+
Let's circle back when we have more bandwidth to touch base on opportunities for increased leverage.<|im_end|>
|
|
144
|
+
<|im_start|>example_assistant
|
|
145
|
+
Let's talk later when we're less busy about how to do better.<|im_end|>
|
|
146
|
+
<|im_start|>user
|
|
147
|
+
This late pivot means we don't have time to boil the ocean for the client deliverable.<|im_end|>
|
|
148
|
+
<|im_start|>assistant
|
|
149
|
+
"
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
exports[`gpt-3.5-turbo-0301 chat functionality encodes a chat correctly 1`] = `
|
|
153
|
+
[
|
|
154
|
+
100264,
|
|
155
|
+
9125,
|
|
156
|
+
198,
|
|
157
|
+
2675,
|
|
158
|
+
527,
|
|
159
|
+
264,
|
|
160
|
+
11190,
|
|
161
|
+
11,
|
|
162
|
+
5497,
|
|
163
|
+
93685,
|
|
164
|
+
287,
|
|
165
|
+
18328,
|
|
166
|
+
430,
|
|
167
|
+
48018,
|
|
168
|
+
13166,
|
|
169
|
+
503,
|
|
170
|
+
71921,
|
|
171
|
+
1139,
|
|
172
|
+
14733,
|
|
173
|
+
6498,
|
|
174
|
+
13,
|
|
175
|
+
100265,
|
|
176
|
+
198,
|
|
177
|
+
100264,
|
|
178
|
+
8858,
|
|
179
|
+
3398,
|
|
180
|
+
198,
|
|
181
|
+
3648,
|
|
182
|
+
80526,
|
|
183
|
+
552,
|
|
184
|
+
690,
|
|
185
|
+
1520,
|
|
186
|
+
6678,
|
|
187
|
+
1948,
|
|
188
|
+
8614,
|
|
189
|
+
6650,
|
|
190
|
+
13,
|
|
191
|
+
100265,
|
|
192
|
+
198,
|
|
193
|
+
100264,
|
|
194
|
+
8858,
|
|
195
|
+
12354,
|
|
196
|
+
11451,
|
|
197
|
+
198,
|
|
198
|
+
42575,
|
|
199
|
+
3318,
|
|
200
|
+
1664,
|
|
201
|
+
3871,
|
|
202
|
+
690,
|
|
203
|
+
5376,
|
|
204
|
+
13254,
|
|
205
|
+
13,
|
|
206
|
+
100265,
|
|
207
|
+
198,
|
|
208
|
+
100264,
|
|
209
|
+
8858,
|
|
210
|
+
3398,
|
|
211
|
+
198,
|
|
212
|
+
10267,
|
|
213
|
+
596,
|
|
214
|
+
12960,
|
|
215
|
+
1203,
|
|
216
|
+
994,
|
|
217
|
+
584,
|
|
218
|
+
617,
|
|
219
|
+
810,
|
|
220
|
+
34494,
|
|
221
|
+
311,
|
|
222
|
+
5916,
|
|
223
|
+
2385,
|
|
224
|
+
389,
|
|
225
|
+
10708,
|
|
226
|
+
369,
|
|
227
|
+
7319,
|
|
228
|
+
33164,
|
|
229
|
+
13,
|
|
230
|
+
100265,
|
|
231
|
+
198,
|
|
232
|
+
100264,
|
|
233
|
+
8858,
|
|
234
|
+
12354,
|
|
235
|
+
11451,
|
|
236
|
+
198,
|
|
237
|
+
10267,
|
|
238
|
+
596,
|
|
239
|
+
3137,
|
|
240
|
+
3010,
|
|
241
|
+
994,
|
|
242
|
+
584,
|
|
243
|
+
2351,
|
|
244
|
+
2753,
|
|
245
|
+
13326,
|
|
246
|
+
922,
|
|
247
|
+
1268,
|
|
248
|
+
311,
|
|
249
|
+
656,
|
|
250
|
+
2731,
|
|
251
|
+
13,
|
|
252
|
+
100265,
|
|
253
|
+
198,
|
|
254
|
+
100264,
|
|
255
|
+
882,
|
|
256
|
+
198,
|
|
257
|
+
2028,
|
|
258
|
+
3389,
|
|
259
|
+
27137,
|
|
260
|
+
3445,
|
|
261
|
+
584,
|
|
262
|
+
1541,
|
|
263
|
+
956,
|
|
264
|
+
617,
|
|
265
|
+
892,
|
|
266
|
+
311,
|
|
267
|
+
44790,
|
|
268
|
+
279,
|
|
269
|
+
18435,
|
|
270
|
+
369,
|
|
271
|
+
279,
|
|
272
|
+
3016,
|
|
273
|
+
6493,
|
|
274
|
+
481,
|
|
275
|
+
13,
|
|
276
|
+
100265,
|
|
277
|
+
198,
|
|
278
|
+
100264,
|
|
279
|
+
78191,
|
|
280
|
+
198,
|
|
281
|
+
]
|
|
282
|
+
`;
|
|
283
|
+
|
|
284
|
+
exports[`gpt-3.5-turbo-0301 chat functionality encodes a chat correctly 2`] = `
|
|
285
|
+
"<|im_start|>system
|
|
286
|
+
You are a helpful, pattern-following assistant that translates corporate jargon into plain English.<|im_end|>
|
|
287
|
+
<|im_start|>example_user
|
|
288
|
+
New synergies will help drive top-line growth.<|im_end|>
|
|
289
|
+
<|im_start|>example_assistant
|
|
290
|
+
Things working well together will increase revenue.<|im_end|>
|
|
291
|
+
<|im_start|>example_user
|
|
292
|
+
Let's circle back when we have more bandwidth to touch base on opportunities for increased leverage.<|im_end|>
|
|
293
|
+
<|im_start|>example_assistant
|
|
294
|
+
Let's talk later when we're less busy about how to do better.<|im_end|>
|
|
295
|
+
<|im_start|>user
|
|
296
|
+
This late pivot means we don't have time to boil the ocean for the client deliverable.<|im_end|>
|
|
297
|
+
<|im_start|>assistant
|
|
298
|
+
"
|
|
299
|
+
`;
|
|
300
|
+
|
|
301
|
+
exports[`gpt-4 chat functionality encodes a chat correctly 1`] = `
|
|
302
|
+
[
|
|
303
|
+
100264,
|
|
304
|
+
9125,
|
|
305
|
+
100266,
|
|
306
|
+
2675,
|
|
307
|
+
527,
|
|
308
|
+
264,
|
|
309
|
+
11190,
|
|
310
|
+
11,
|
|
311
|
+
5497,
|
|
312
|
+
93685,
|
|
313
|
+
287,
|
|
314
|
+
18328,
|
|
315
|
+
430,
|
|
316
|
+
48018,
|
|
317
|
+
13166,
|
|
318
|
+
503,
|
|
319
|
+
71921,
|
|
320
|
+
1139,
|
|
321
|
+
14733,
|
|
322
|
+
6498,
|
|
323
|
+
13,
|
|
324
|
+
100265,
|
|
325
|
+
100264,
|
|
326
|
+
8858,
|
|
327
|
+
3398,
|
|
328
|
+
100266,
|
|
329
|
+
3648,
|
|
330
|
+
80526,
|
|
331
|
+
552,
|
|
332
|
+
690,
|
|
333
|
+
1520,
|
|
334
|
+
6678,
|
|
335
|
+
1948,
|
|
336
|
+
8614,
|
|
337
|
+
6650,
|
|
338
|
+
13,
|
|
339
|
+
100265,
|
|
340
|
+
100264,
|
|
341
|
+
8858,
|
|
342
|
+
12354,
|
|
343
|
+
11451,
|
|
344
|
+
100266,
|
|
345
|
+
42575,
|
|
346
|
+
3318,
|
|
347
|
+
1664,
|
|
348
|
+
3871,
|
|
349
|
+
690,
|
|
350
|
+
5376,
|
|
351
|
+
13254,
|
|
352
|
+
13,
|
|
353
|
+
100265,
|
|
354
|
+
100264,
|
|
355
|
+
8858,
|
|
356
|
+
3398,
|
|
357
|
+
100266,
|
|
358
|
+
10267,
|
|
359
|
+
596,
|
|
360
|
+
12960,
|
|
361
|
+
1203,
|
|
362
|
+
994,
|
|
363
|
+
584,
|
|
364
|
+
617,
|
|
365
|
+
810,
|
|
366
|
+
34494,
|
|
367
|
+
311,
|
|
368
|
+
5916,
|
|
369
|
+
2385,
|
|
370
|
+
389,
|
|
371
|
+
10708,
|
|
372
|
+
369,
|
|
373
|
+
7319,
|
|
374
|
+
33164,
|
|
375
|
+
13,
|
|
376
|
+
100265,
|
|
377
|
+
100264,
|
|
378
|
+
8858,
|
|
379
|
+
12354,
|
|
380
|
+
11451,
|
|
381
|
+
100266,
|
|
382
|
+
10267,
|
|
383
|
+
596,
|
|
384
|
+
3137,
|
|
385
|
+
3010,
|
|
386
|
+
994,
|
|
387
|
+
584,
|
|
388
|
+
2351,
|
|
389
|
+
2753,
|
|
390
|
+
13326,
|
|
391
|
+
922,
|
|
392
|
+
1268,
|
|
393
|
+
311,
|
|
394
|
+
656,
|
|
395
|
+
2731,
|
|
396
|
+
13,
|
|
397
|
+
100265,
|
|
398
|
+
100264,
|
|
399
|
+
882,
|
|
400
|
+
100266,
|
|
401
|
+
2028,
|
|
402
|
+
3389,
|
|
403
|
+
27137,
|
|
404
|
+
3445,
|
|
405
|
+
584,
|
|
406
|
+
1541,
|
|
407
|
+
956,
|
|
408
|
+
617,
|
|
409
|
+
892,
|
|
410
|
+
311,
|
|
411
|
+
44790,
|
|
412
|
+
279,
|
|
413
|
+
18435,
|
|
414
|
+
369,
|
|
415
|
+
279,
|
|
416
|
+
3016,
|
|
417
|
+
6493,
|
|
418
|
+
481,
|
|
419
|
+
13,
|
|
420
|
+
100265,
|
|
421
|
+
100264,
|
|
422
|
+
78191,
|
|
423
|
+
100266,
|
|
424
|
+
]
|
|
425
|
+
`;
|
|
426
|
+
|
|
427
|
+
exports[`gpt-4 chat functionality encodes a chat correctly 2`] = `"<|im_start|>system<|im_sep|>You are a helpful, pattern-following assistant that translates corporate jargon into plain English.<|im_end|><|im_start|>example_user<|im_sep|>New synergies will help drive top-line growth.<|im_end|><|im_start|>example_assistant<|im_sep|>Things working well together will increase revenue.<|im_end|><|im_start|>example_user<|im_sep|>Let's circle back when we have more bandwidth to touch base on opportunities for increased leverage.<|im_end|><|im_start|>example_assistant<|im_sep|>Let's talk later when we're less busy about how to do better.<|im_end|><|im_start|>user<|im_sep|>This late pivot means we don't have time to boil the ocean for the client deliverable.<|im_end|><|im_start|>assistant<|im_sep|>"`;
|
|
428
|
+
|
|
429
|
+
exports[`gpt-4-0314 chat functionality encodes a chat correctly 1`] = `
|
|
430
|
+
[
|
|
431
|
+
100264,
|
|
432
|
+
9125,
|
|
433
|
+
100266,
|
|
434
|
+
2675,
|
|
435
|
+
527,
|
|
436
|
+
264,
|
|
437
|
+
11190,
|
|
438
|
+
11,
|
|
439
|
+
5497,
|
|
440
|
+
93685,
|
|
441
|
+
287,
|
|
442
|
+
18328,
|
|
443
|
+
430,
|
|
444
|
+
48018,
|
|
445
|
+
13166,
|
|
446
|
+
503,
|
|
447
|
+
71921,
|
|
448
|
+
1139,
|
|
449
|
+
14733,
|
|
450
|
+
6498,
|
|
451
|
+
13,
|
|
452
|
+
100265,
|
|
453
|
+
100264,
|
|
454
|
+
8858,
|
|
455
|
+
3398,
|
|
456
|
+
100266,
|
|
457
|
+
3648,
|
|
458
|
+
80526,
|
|
459
|
+
552,
|
|
460
|
+
690,
|
|
461
|
+
1520,
|
|
462
|
+
6678,
|
|
463
|
+
1948,
|
|
464
|
+
8614,
|
|
465
|
+
6650,
|
|
466
|
+
13,
|
|
467
|
+
100265,
|
|
468
|
+
100264,
|
|
469
|
+
8858,
|
|
470
|
+
12354,
|
|
471
|
+
11451,
|
|
472
|
+
100266,
|
|
473
|
+
42575,
|
|
474
|
+
3318,
|
|
475
|
+
1664,
|
|
476
|
+
3871,
|
|
477
|
+
690,
|
|
478
|
+
5376,
|
|
479
|
+
13254,
|
|
480
|
+
13,
|
|
481
|
+
100265,
|
|
482
|
+
100264,
|
|
483
|
+
8858,
|
|
484
|
+
3398,
|
|
485
|
+
100266,
|
|
486
|
+
10267,
|
|
487
|
+
596,
|
|
488
|
+
12960,
|
|
489
|
+
1203,
|
|
490
|
+
994,
|
|
491
|
+
584,
|
|
492
|
+
617,
|
|
493
|
+
810,
|
|
494
|
+
34494,
|
|
495
|
+
311,
|
|
496
|
+
5916,
|
|
497
|
+
2385,
|
|
498
|
+
389,
|
|
499
|
+
10708,
|
|
500
|
+
369,
|
|
501
|
+
7319,
|
|
502
|
+
33164,
|
|
503
|
+
13,
|
|
504
|
+
100265,
|
|
505
|
+
100264,
|
|
506
|
+
8858,
|
|
507
|
+
12354,
|
|
508
|
+
11451,
|
|
509
|
+
100266,
|
|
510
|
+
10267,
|
|
511
|
+
596,
|
|
512
|
+
3137,
|
|
513
|
+
3010,
|
|
514
|
+
994,
|
|
515
|
+
584,
|
|
516
|
+
2351,
|
|
517
|
+
2753,
|
|
518
|
+
13326,
|
|
519
|
+
922,
|
|
520
|
+
1268,
|
|
521
|
+
311,
|
|
522
|
+
656,
|
|
523
|
+
2731,
|
|
524
|
+
13,
|
|
525
|
+
100265,
|
|
526
|
+
100264,
|
|
527
|
+
882,
|
|
528
|
+
100266,
|
|
529
|
+
2028,
|
|
530
|
+
3389,
|
|
531
|
+
27137,
|
|
532
|
+
3445,
|
|
533
|
+
584,
|
|
534
|
+
1541,
|
|
535
|
+
956,
|
|
536
|
+
617,
|
|
537
|
+
892,
|
|
538
|
+
311,
|
|
539
|
+
44790,
|
|
540
|
+
279,
|
|
541
|
+
18435,
|
|
542
|
+
369,
|
|
543
|
+
279,
|
|
544
|
+
3016,
|
|
545
|
+
6493,
|
|
546
|
+
481,
|
|
547
|
+
13,
|
|
548
|
+
100265,
|
|
549
|
+
100264,
|
|
550
|
+
78191,
|
|
551
|
+
100266,
|
|
552
|
+
]
|
|
553
|
+
`;
|
|
554
|
+
|
|
555
|
+
exports[`gpt-4-0314 chat functionality encodes a chat correctly 2`] = `"<|im_start|>system<|im_sep|>You are a helpful, pattern-following assistant that translates corporate jargon into plain English.<|im_end|><|im_start|>example_user<|im_sep|>New synergies will help drive top-line growth.<|im_end|><|im_start|>example_assistant<|im_sep|>Things working well together will increase revenue.<|im_end|><|im_start|>example_user<|im_sep|>Let's circle back when we have more bandwidth to touch base on opportunities for increased leverage.<|im_end|><|im_start|>example_assistant<|im_sep|>Let's talk later when we're less busy about how to do better.<|im_end|><|im_start|>user<|im_sep|>This late pivot means we don't have time to boil the ocean for the client deliverable.<|im_end|><|im_start|>assistant<|im_sep|>"`;
|
|
556
|
+
|
|
557
|
+
exports[`gpt-4-32k chat functionality encodes a chat correctly 1`] = `
|
|
558
|
+
[
|
|
559
|
+
100264,
|
|
560
|
+
9125,
|
|
561
|
+
100266,
|
|
562
|
+
2675,
|
|
563
|
+
527,
|
|
564
|
+
264,
|
|
565
|
+
11190,
|
|
566
|
+
11,
|
|
567
|
+
5497,
|
|
568
|
+
93685,
|
|
569
|
+
287,
|
|
570
|
+
18328,
|
|
571
|
+
430,
|
|
572
|
+
48018,
|
|
573
|
+
13166,
|
|
574
|
+
503,
|
|
575
|
+
71921,
|
|
576
|
+
1139,
|
|
577
|
+
14733,
|
|
578
|
+
6498,
|
|
579
|
+
13,
|
|
580
|
+
100265,
|
|
581
|
+
100264,
|
|
582
|
+
8858,
|
|
583
|
+
3398,
|
|
584
|
+
100266,
|
|
585
|
+
3648,
|
|
586
|
+
80526,
|
|
587
|
+
552,
|
|
588
|
+
690,
|
|
589
|
+
1520,
|
|
590
|
+
6678,
|
|
591
|
+
1948,
|
|
592
|
+
8614,
|
|
593
|
+
6650,
|
|
594
|
+
13,
|
|
595
|
+
100265,
|
|
596
|
+
100264,
|
|
597
|
+
8858,
|
|
598
|
+
12354,
|
|
599
|
+
11451,
|
|
600
|
+
100266,
|
|
601
|
+
42575,
|
|
602
|
+
3318,
|
|
603
|
+
1664,
|
|
604
|
+
3871,
|
|
605
|
+
690,
|
|
606
|
+
5376,
|
|
607
|
+
13254,
|
|
608
|
+
13,
|
|
609
|
+
100265,
|
|
610
|
+
100264,
|
|
611
|
+
8858,
|
|
612
|
+
3398,
|
|
613
|
+
100266,
|
|
614
|
+
10267,
|
|
615
|
+
596,
|
|
616
|
+
12960,
|
|
617
|
+
1203,
|
|
618
|
+
994,
|
|
619
|
+
584,
|
|
620
|
+
617,
|
|
621
|
+
810,
|
|
622
|
+
34494,
|
|
623
|
+
311,
|
|
624
|
+
5916,
|
|
625
|
+
2385,
|
|
626
|
+
389,
|
|
627
|
+
10708,
|
|
628
|
+
369,
|
|
629
|
+
7319,
|
|
630
|
+
33164,
|
|
631
|
+
13,
|
|
632
|
+
100265,
|
|
633
|
+
100264,
|
|
634
|
+
8858,
|
|
635
|
+
12354,
|
|
636
|
+
11451,
|
|
637
|
+
100266,
|
|
638
|
+
10267,
|
|
639
|
+
596,
|
|
640
|
+
3137,
|
|
641
|
+
3010,
|
|
642
|
+
994,
|
|
643
|
+
584,
|
|
644
|
+
2351,
|
|
645
|
+
2753,
|
|
646
|
+
13326,
|
|
647
|
+
922,
|
|
648
|
+
1268,
|
|
649
|
+
311,
|
|
650
|
+
656,
|
|
651
|
+
2731,
|
|
652
|
+
13,
|
|
653
|
+
100265,
|
|
654
|
+
100264,
|
|
655
|
+
882,
|
|
656
|
+
100266,
|
|
657
|
+
2028,
|
|
658
|
+
3389,
|
|
659
|
+
27137,
|
|
660
|
+
3445,
|
|
661
|
+
584,
|
|
662
|
+
1541,
|
|
663
|
+
956,
|
|
664
|
+
617,
|
|
665
|
+
892,
|
|
666
|
+
311,
|
|
667
|
+
44790,
|
|
668
|
+
279,
|
|
669
|
+
18435,
|
|
670
|
+
369,
|
|
671
|
+
279,
|
|
672
|
+
3016,
|
|
673
|
+
6493,
|
|
674
|
+
481,
|
|
675
|
+
13,
|
|
676
|
+
100265,
|
|
677
|
+
100264,
|
|
678
|
+
78191,
|
|
679
|
+
100266,
|
|
680
|
+
]
|
|
681
|
+
`;
|
|
682
|
+
|
|
683
|
+
exports[`gpt-4-32k chat functionality encodes a chat correctly 2`] = `"<|im_start|>system<|im_sep|>You are a helpful, pattern-following assistant that translates corporate jargon into plain English.<|im_end|><|im_start|>example_user<|im_sep|>New synergies will help drive top-line growth.<|im_end|><|im_start|>example_assistant<|im_sep|>Things working well together will increase revenue.<|im_end|><|im_start|>example_user<|im_sep|>Let's circle back when we have more bandwidth to touch base on opportunities for increased leverage.<|im_end|><|im_start|>example_assistant<|im_sep|>Let's talk later when we're less busy about how to do better.<|im_end|><|im_start|>user<|im_sep|>This late pivot means we don't have time to boil the ocean for the client deliverable.<|im_end|><|im_start|>assistant<|im_sep|>"`;
|
|
684
|
+
|
|
685
|
+
exports[`gpt-4-32k-0314 chat functionality encodes a chat correctly 1`] = `
|
|
686
|
+
[
|
|
687
|
+
100264,
|
|
688
|
+
9125,
|
|
689
|
+
100266,
|
|
690
|
+
2675,
|
|
691
|
+
527,
|
|
692
|
+
264,
|
|
693
|
+
11190,
|
|
694
|
+
11,
|
|
695
|
+
5497,
|
|
696
|
+
93685,
|
|
697
|
+
287,
|
|
698
|
+
18328,
|
|
699
|
+
430,
|
|
700
|
+
48018,
|
|
701
|
+
13166,
|
|
702
|
+
503,
|
|
703
|
+
71921,
|
|
704
|
+
1139,
|
|
705
|
+
14733,
|
|
706
|
+
6498,
|
|
707
|
+
13,
|
|
708
|
+
100265,
|
|
709
|
+
100264,
|
|
710
|
+
8858,
|
|
711
|
+
3398,
|
|
712
|
+
100266,
|
|
713
|
+
3648,
|
|
714
|
+
80526,
|
|
715
|
+
552,
|
|
716
|
+
690,
|
|
717
|
+
1520,
|
|
718
|
+
6678,
|
|
719
|
+
1948,
|
|
720
|
+
8614,
|
|
721
|
+
6650,
|
|
722
|
+
13,
|
|
723
|
+
100265,
|
|
724
|
+
100264,
|
|
725
|
+
8858,
|
|
726
|
+
12354,
|
|
727
|
+
11451,
|
|
728
|
+
100266,
|
|
729
|
+
42575,
|
|
730
|
+
3318,
|
|
731
|
+
1664,
|
|
732
|
+
3871,
|
|
733
|
+
690,
|
|
734
|
+
5376,
|
|
735
|
+
13254,
|
|
736
|
+
13,
|
|
737
|
+
100265,
|
|
738
|
+
100264,
|
|
739
|
+
8858,
|
|
740
|
+
3398,
|
|
741
|
+
100266,
|
|
742
|
+
10267,
|
|
743
|
+
596,
|
|
744
|
+
12960,
|
|
745
|
+
1203,
|
|
746
|
+
994,
|
|
747
|
+
584,
|
|
748
|
+
617,
|
|
749
|
+
810,
|
|
750
|
+
34494,
|
|
751
|
+
311,
|
|
752
|
+
5916,
|
|
753
|
+
2385,
|
|
754
|
+
389,
|
|
755
|
+
10708,
|
|
756
|
+
369,
|
|
757
|
+
7319,
|
|
758
|
+
33164,
|
|
759
|
+
13,
|
|
760
|
+
100265,
|
|
761
|
+
100264,
|
|
762
|
+
8858,
|
|
763
|
+
12354,
|
|
764
|
+
11451,
|
|
765
|
+
100266,
|
|
766
|
+
10267,
|
|
767
|
+
596,
|
|
768
|
+
3137,
|
|
769
|
+
3010,
|
|
770
|
+
994,
|
|
771
|
+
584,
|
|
772
|
+
2351,
|
|
773
|
+
2753,
|
|
774
|
+
13326,
|
|
775
|
+
922,
|
|
776
|
+
1268,
|
|
777
|
+
311,
|
|
778
|
+
656,
|
|
779
|
+
2731,
|
|
780
|
+
13,
|
|
781
|
+
100265,
|
|
782
|
+
100264,
|
|
783
|
+
882,
|
|
784
|
+
100266,
|
|
785
|
+
2028,
|
|
786
|
+
3389,
|
|
787
|
+
27137,
|
|
788
|
+
3445,
|
|
789
|
+
584,
|
|
790
|
+
1541,
|
|
791
|
+
956,
|
|
792
|
+
617,
|
|
793
|
+
892,
|
|
794
|
+
311,
|
|
795
|
+
44790,
|
|
796
|
+
279,
|
|
797
|
+
18435,
|
|
798
|
+
369,
|
|
799
|
+
279,
|
|
800
|
+
3016,
|
|
801
|
+
6493,
|
|
802
|
+
481,
|
|
803
|
+
13,
|
|
804
|
+
100265,
|
|
805
|
+
100264,
|
|
806
|
+
78191,
|
|
807
|
+
100266,
|
|
808
|
+
]
|
|
809
|
+
`;
|
|
810
|
+
|
|
811
|
+
exports[`gpt-4-32k-0314 chat functionality encodes a chat correctly 2`] = `"<|im_start|>system<|im_sep|>You are a helpful, pattern-following assistant that translates corporate jargon into plain English.<|im_end|><|im_start|>example_user<|im_sep|>New synergies will help drive top-line growth.<|im_end|><|im_start|>example_assistant<|im_sep|>Things working well together will increase revenue.<|im_end|><|im_start|>example_user<|im_sep|>Let's circle back when we have more bandwidth to touch base on opportunities for increased leverage.<|im_end|><|im_start|>example_assistant<|im_sep|>Let's talk later when we're less busy about how to do better.<|im_end|><|im_start|>user<|im_sep|>This late pivot means we don't have time to boil the ocean for the client deliverable.<|im_end|><|im_start|>assistant<|im_sep|>"`;
|