@lobehub/chat 1.136.9 → 1.136.11

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/changelog/v1.json +18 -0
  3. package/package.json +1 -1
  4. package/packages/database/src/repositories/aiInfra/index.test.ts +234 -0
  5. package/packages/database/src/repositories/aiInfra/index.ts +106 -8
  6. package/packages/model-bank/src/types/aiModel.ts +2 -0
  7. package/packages/model-runtime/src/providers/google/index.ts +1 -1
  8. package/packages/model-runtime/src/providers/novita/__snapshots__/index.test.ts.snap +54 -0
  9. package/packages/model-runtime/src/providers/openai/__snapshots__/index.test.ts.snap +84 -0
  10. package/packages/model-runtime/src/utils/modelParse.test.ts +103 -0
  11. package/packages/model-runtime/src/utils/modelParse.ts +98 -23
  12. package/packages/model-runtime/src/utils/postProcessModelList.test.ts +0 -3
  13. package/packages/model-runtime/src/utils/postProcessModelList.ts +17 -4
  14. package/packages/prompts/src/prompts/index.ts +1 -0
  15. package/packages/prompts/src/prompts/search/crawlResults.test.ts +172 -0
  16. package/packages/prompts/src/prompts/search/crawlResults.ts +82 -0
  17. package/packages/prompts/src/prompts/search/index.ts +2 -0
  18. package/packages/prompts/src/prompts/search/searchResults.test.ts +138 -0
  19. package/packages/prompts/src/prompts/search/searchResults.ts +58 -0
  20. package/packages/prompts/src/prompts/search/xmlEscape.ts +21 -0
  21. package/packages/types/src/llm.ts +16 -0
  22. package/packages/types/src/tool/builtin.ts +8 -0
  23. package/packages/types/src/tool/index.ts +2 -0
  24. package/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/Form.tsx +25 -0
  25. package/src/features/ChatInput/ActionBar/Search/Controls.tsx +47 -20
  26. package/src/features/Conversation/Messages/Assistant/Tool/Inspector/BuiltinPluginTitle.tsx +17 -13
  27. package/src/features/Conversation/Messages/Assistant/Tool/Inspector/ToolTitle.tsx +1 -8
  28. package/src/features/Conversation/Messages/Assistant/Tool/Render/Arguments/index.tsx +12 -16
  29. package/src/features/Conversation/Messages/Assistant/Tool/Render/LoadingPlaceholder/index.tsx +29 -0
  30. package/src/features/Conversation/Messages/Assistant/Tool/Render/index.tsx +26 -7
  31. package/src/features/Conversation/Messages/Assistant/Tool/index.tsx +2 -0
  32. package/src/features/PluginsUI/Render/BuiltinType/index.test.tsx +5 -5
  33. package/src/features/PluginsUI/Render/BuiltinType/index.tsx +1 -7
  34. package/src/helpers/getSearchConfig.test.ts +41 -0
  35. package/src/helpers/getSearchConfig.ts +5 -1
  36. package/src/locales/default/modelProvider.ts +15 -0
  37. package/src/store/aiInfra/slices/aiModel/action.ts +3 -0
  38. package/src/store/aiInfra/slices/aiModel/selectors.ts +7 -0
  39. package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +5 -1
  40. package/src/store/chat/slices/aiChat/actions/generateAIChatV2.ts +5 -1
  41. package/src/store/chat/slices/builtinTool/actions/search.test.ts +4 -3
  42. package/src/store/chat/slices/builtinTool/actions/search.ts +23 -15
  43. package/src/store/chat/slices/message/selectors.ts +10 -0
  44. package/src/styles/text.ts +10 -7
  45. package/src/tools/placeholders.ts +8 -0
  46. package/src/tools/web-browsing/Placeholder/PageContent.tsx +27 -0
  47. package/src/tools/web-browsing/Placeholder/Search.tsx +65 -0
  48. package/src/tools/web-browsing/Placeholder/index.tsx +40 -0
  49. package/src/tools/web-browsing/Render/PageContent/Loading.tsx +14 -5
  50. package/src/tools/web-browsing/Render/PageContent/Result.tsx +14 -13
  51. package/src/tools/web-browsing/Render/PageContent/index.tsx +15 -6
  52. package/src/tools/web-browsing/Render/Search/SearchQuery/SearchView.tsx +13 -19
  53. package/src/tools/web-browsing/Render/Search/SearchResult/index.tsx +21 -26
  54. package/src/tools/web-browsing/components/EngineAvatar.tsx +8 -2
  55. package/src/tools/web-browsing/const.ts +8 -1
@@ -9,6 +9,7 @@ exports[`NovitaAI > models > should get models 1`] = `
9
9
  "enabled": false,
10
10
  "functionCall": false,
11
11
  "id": "meta-llama/llama-3-8b-instruct",
12
+ "imageOutput": false,
12
13
  "maxOutput": undefined,
13
14
  "pricing": {
14
15
  "units": [
@@ -28,7 +29,9 @@ exports[`NovitaAI > models > should get models 1`] = `
28
29
  },
29
30
  "reasoning": false,
30
31
  "releasedAt": "2024-04-25",
32
+ "search": false,
31
33
  "type": "chat",
34
+ "video": false,
32
35
  "vision": false,
33
36
  },
34
37
  {
@@ -38,6 +41,7 @@ exports[`NovitaAI > models > should get models 1`] = `
38
41
  "enabled": false,
39
42
  "functionCall": false,
40
43
  "id": "meta-llama/llama-3-70b-instruct",
44
+ "imageOutput": false,
41
45
  "maxOutput": undefined,
42
46
  "pricing": {
43
47
  "units": [
@@ -57,7 +61,9 @@ exports[`NovitaAI > models > should get models 1`] = `
57
61
  },
58
62
  "reasoning": false,
59
63
  "releasedAt": "2024-04-25",
64
+ "search": false,
60
65
  "type": "chat",
66
+ "video": false,
61
67
  "vision": false,
62
68
  },
63
69
  {
@@ -67,6 +73,7 @@ exports[`NovitaAI > models > should get models 1`] = `
67
73
  "enabled": false,
68
74
  "functionCall": false,
69
75
  "id": "meta-llama/llama-3.1-8b-instruct",
76
+ "imageOutput": false,
70
77
  "maxOutput": undefined,
71
78
  "pricing": {
72
79
  "units": [
@@ -86,7 +93,9 @@ exports[`NovitaAI > models > should get models 1`] = `
86
93
  },
87
94
  "reasoning": false,
88
95
  "releasedAt": "2024-07-24",
96
+ "search": false,
89
97
  "type": "chat",
98
+ "video": false,
90
99
  "vision": false,
91
100
  },
92
101
  {
@@ -96,6 +105,7 @@ exports[`NovitaAI > models > should get models 1`] = `
96
105
  "enabled": false,
97
106
  "functionCall": false,
98
107
  "id": "meta-llama/llama-3.1-70b-instruct",
108
+ "imageOutput": false,
99
109
  "maxOutput": undefined,
100
110
  "pricing": {
101
111
  "units": [
@@ -115,7 +125,9 @@ exports[`NovitaAI > models > should get models 1`] = `
115
125
  },
116
126
  "reasoning": false,
117
127
  "releasedAt": "2024-07-24",
128
+ "search": false,
118
129
  "type": "chat",
130
+ "video": false,
119
131
  "vision": false,
120
132
  },
121
133
  {
@@ -125,6 +137,7 @@ exports[`NovitaAI > models > should get models 1`] = `
125
137
  "enabled": false,
126
138
  "functionCall": false,
127
139
  "id": "meta-llama/llama-3.1-405b-instruct",
140
+ "imageOutput": false,
128
141
  "maxOutput": undefined,
129
142
  "pricing": {
130
143
  "units": [
@@ -144,7 +157,9 @@ exports[`NovitaAI > models > should get models 1`] = `
144
157
  },
145
158
  "reasoning": false,
146
159
  "releasedAt": "2024-07-24",
160
+ "search": false,
147
161
  "type": "chat",
162
+ "video": false,
148
163
  "vision": false,
149
164
  },
150
165
  {
@@ -155,6 +170,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
155
170
  "enabled": false,
156
171
  "functionCall": false,
157
172
  "id": "google/gemma-2-9b-it",
173
+ "imageOutput": false,
158
174
  "maxOutput": undefined,
159
175
  "pricing": {
160
176
  "units": [
@@ -174,7 +190,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
174
190
  },
175
191
  "reasoning": false,
176
192
  "releasedAt": "2024-07-18",
193
+ "search": false,
177
194
  "type": "chat",
195
+ "video": false,
178
196
  "vision": false,
179
197
  },
180
198
  {
@@ -184,6 +202,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
184
202
  "enabled": false,
185
203
  "functionCall": false,
186
204
  "id": "jondurbin/airoboros-l2-70b",
205
+ "imageOutput": false,
187
206
  "maxOutput": undefined,
188
207
  "pricing": {
189
208
  "units": [
@@ -203,7 +222,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
203
222
  },
204
223
  "reasoning": false,
205
224
  "releasedAt": "2024-07-17",
225
+ "search": false,
206
226
  "type": "chat",
227
+ "video": false,
207
228
  "vision": false,
208
229
  },
209
230
  {
@@ -213,6 +234,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
213
234
  "enabled": false,
214
235
  "functionCall": false,
215
236
  "id": "nousresearch/hermes-2-pro-llama-3-8b",
237
+ "imageOutput": false,
216
238
  "maxOutput": undefined,
217
239
  "pricing": {
218
240
  "units": [
@@ -232,7 +254,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
232
254
  },
233
255
  "reasoning": false,
234
256
  "releasedAt": "2024-06-27",
257
+ "search": false,
235
258
  "type": "chat",
259
+ "video": false,
236
260
  "vision": false,
237
261
  },
238
262
  {
@@ -242,6 +266,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
242
266
  "enabled": false,
243
267
  "functionCall": false,
244
268
  "id": "mistralai/mistral-7b-instruct",
269
+ "imageOutput": false,
245
270
  "maxOutput": undefined,
246
271
  "pricing": {
247
272
  "units": [
@@ -261,7 +286,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
261
286
  },
262
287
  "reasoning": false,
263
288
  "releasedAt": "2024-06-27",
289
+ "search": false,
264
290
  "type": "chat",
291
+ "video": false,
265
292
  "vision": false,
266
293
  },
267
294
  {
@@ -271,6 +298,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
271
298
  "enabled": false,
272
299
  "functionCall": false,
273
300
  "id": "cognitivecomputations/dolphin-mixtral-8x22b",
301
+ "imageOutput": false,
274
302
  "maxOutput": undefined,
275
303
  "pricing": {
276
304
  "units": [
@@ -290,7 +318,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
290
318
  },
291
319
  "reasoning": false,
292
320
  "releasedAt": "2024-06-27",
321
+ "search": false,
293
322
  "type": "chat",
323
+ "video": false,
294
324
  "vision": false,
295
325
  },
296
326
  {
@@ -300,6 +330,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
300
330
  "enabled": false,
301
331
  "functionCall": false,
302
332
  "id": "sao10k/l3-70b-euryale-v2.1",
333
+ "imageOutput": false,
303
334
  "maxOutput": undefined,
304
335
  "pricing": {
305
336
  "units": [
@@ -319,7 +350,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
319
350
  },
320
351
  "reasoning": false,
321
352
  "releasedAt": "2024-06-18",
353
+ "search": false,
322
354
  "type": "chat",
355
+ "video": false,
323
356
  "vision": false,
324
357
  },
325
358
  {
@@ -329,6 +362,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
329
362
  "enabled": false,
330
363
  "functionCall": false,
331
364
  "id": "sophosympatheia/midnight-rose-70b",
365
+ "imageOutput": false,
332
366
  "maxOutput": undefined,
333
367
  "pricing": {
334
368
  "units": [
@@ -348,7 +382,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
348
382
  },
349
383
  "reasoning": false,
350
384
  "releasedAt": "2024-06-17",
385
+ "search": false,
351
386
  "type": "chat",
387
+ "video": false,
352
388
  "vision": false,
353
389
  },
354
390
  {
@@ -358,6 +394,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
358
394
  "enabled": false,
359
395
  "functionCall": false,
360
396
  "id": "gryphe/mythomax-l2-13b",
397
+ "imageOutput": false,
361
398
  "maxOutput": undefined,
362
399
  "pricing": {
363
400
  "units": [
@@ -377,7 +414,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
377
414
  },
378
415
  "reasoning": false,
379
416
  "releasedAt": "2024-04-25",
417
+ "search": false,
380
418
  "type": "chat",
419
+ "video": false,
381
420
  "vision": false,
382
421
  },
383
422
  {
@@ -387,6 +426,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
387
426
  "enabled": false,
388
427
  "functionCall": false,
389
428
  "id": "nousresearch/nous-hermes-llama2-13b",
429
+ "imageOutput": false,
390
430
  "maxOutput": undefined,
391
431
  "pricing": {
392
432
  "units": [
@@ -406,7 +446,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
406
446
  },
407
447
  "reasoning": false,
408
448
  "releasedAt": "2024-04-25",
449
+ "search": false,
409
450
  "type": "chat",
451
+ "video": false,
410
452
  "vision": false,
411
453
  },
412
454
  {
@@ -416,6 +458,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
416
458
  "enabled": false,
417
459
  "functionCall": false,
418
460
  "id": "Nous-Hermes-2-Mixtral-8x7B-DPO",
461
+ "imageOutput": false,
419
462
  "maxOutput": undefined,
420
463
  "pricing": {
421
464
  "units": [
@@ -435,7 +478,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
435
478
  },
436
479
  "reasoning": false,
437
480
  "releasedAt": "2024-04-25",
481
+ "search": false,
438
482
  "type": "chat",
483
+ "video": false,
439
484
  "vision": false,
440
485
  },
441
486
  {
@@ -445,6 +490,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
445
490
  "enabled": false,
446
491
  "functionCall": false,
447
492
  "id": "lzlv_70b",
493
+ "imageOutput": false,
448
494
  "maxOutput": undefined,
449
495
  "pricing": {
450
496
  "units": [
@@ -464,7 +510,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
464
510
  },
465
511
  "reasoning": false,
466
512
  "releasedAt": "2024-04-25",
513
+ "search": false,
467
514
  "type": "chat",
515
+ "video": false,
468
516
  "vision": false,
469
517
  },
470
518
  {
@@ -474,6 +522,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
474
522
  "enabled": false,
475
523
  "functionCall": false,
476
524
  "id": "teknium/openhermes-2.5-mistral-7b",
525
+ "imageOutput": false,
477
526
  "maxOutput": undefined,
478
527
  "pricing": {
479
528
  "units": [
@@ -493,7 +542,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
493
542
  },
494
543
  "reasoning": false,
495
544
  "releasedAt": "2024-04-24",
545
+ "search": false,
496
546
  "type": "chat",
547
+ "video": false,
497
548
  "vision": false,
498
549
  },
499
550
  {
@@ -503,6 +554,7 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
503
554
  "enabled": false,
504
555
  "functionCall": false,
505
556
  "id": "microsoft/wizardlm-2-8x22b",
557
+ "imageOutput": false,
506
558
  "maxOutput": undefined,
507
559
  "pricing": {
508
560
  "units": [
@@ -522,7 +574,9 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
522
574
  },
523
575
  "reasoning": false,
524
576
  "releasedAt": "2024-04-24",
577
+ "search": false,
525
578
  "type": "chat",
579
+ "video": false,
526
580
  "vision": false,
527
581
  },
528
582
  ]