@promptbook/ollama 0.94.0-5 → 0.94.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/umd/index.umd.js CHANGED
@@ -25,12 +25,52 @@
25
25
  * @generated
26
26
  * @see https://github.com/webgptorg/promptbook
27
27
  */
28
- const PROMPTBOOK_ENGINE_VERSION = '0.94.0-5';
28
+ const PROMPTBOOK_ENGINE_VERSION = '0.94.0';
29
29
  /**
30
30
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
31
31
  * Note: [💞] Ignore a discrepancy between file name and entity name
32
32
  */
33
33
 
34
+ /**
35
+ * Detects if the code is running in a browser environment in main thread (Not in a web worker)
36
+ *
37
+ * Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
38
+ *
39
+ * @public exported from `@promptbook/utils`
40
+ */
41
+ const $isRunningInBrowser = new Function(`
42
+ try {
43
+ return this === window;
44
+ } catch (e) {
45
+ return false;
46
+ }
47
+ `);
48
+ /**
49
+ * TODO: [🎺]
50
+ */
51
+
52
+ /**
53
+ * Detects if the code is running in a web worker
54
+ *
55
+ * Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
56
+ *
57
+ * @public exported from `@promptbook/utils`
58
+ */
59
+ const $isRunningInWebWorker = new Function(`
60
+ try {
61
+ if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
62
+ return true;
63
+ } else {
64
+ return false;
65
+ }
66
+ } catch (e) {
67
+ return false;
68
+ }
69
+ `);
70
+ /**
71
+ * TODO: [🎺]
72
+ */
73
+
34
74
  /**
35
75
  * Freezes the given object and all its nested objects recursively
36
76
  *
@@ -1062,7 +1102,7 @@
1062
1102
  modelVariant: 'COMPLETION',
1063
1103
  modelTitle: 'davinci-002',
1064
1104
  modelName: 'davinci-002',
1065
- modelDescription: 'Legacy completion model with strong performance on text generation tasks. Optimized for complex instructions and longer outputs.',
1105
+ modelDescription: 'Legacy completion model with 4K token context window. Excels at complex text generation, creative writing, and detailed content creation with strong contextual understanding. Optimized for instructions requiring nuanced outputs and extended reasoning. Suitable for applications needing high-quality text generation without conversation management.',
1066
1106
  pricing: {
1067
1107
  prompt: pricing(`$2.00 / 1M tokens`),
1068
1108
  output: pricing(`$2.00 / 1M tokens`),
@@ -1080,7 +1120,7 @@
1080
1120
  modelVariant: 'CHAT',
1081
1121
  modelTitle: 'gpt-3.5-turbo-16k',
1082
1122
  modelName: 'gpt-3.5-turbo-16k',
1083
- modelDescription: 'GPT-3.5 Turbo with extended 16k token context length for handling longer conversations and documents.',
1123
+ modelDescription: 'Extended context GPT-3.5 Turbo with 16K token window. Maintains core capabilities of standard 3.5 Turbo while supporting longer conversations and documents. Features good balance of performance and cost for applications requiring more context than standard 4K models. Effective for document analysis, extended conversations, and multi-step reasoning tasks.',
1084
1124
  pricing: {
1085
1125
  prompt: pricing(`$3.00 / 1M tokens`),
1086
1126
  output: pricing(`$4.00 / 1M tokens`),
@@ -1104,7 +1144,7 @@
1104
1144
  modelVariant: 'CHAT',
1105
1145
  modelTitle: 'gpt-4',
1106
1146
  modelName: 'gpt-4',
1107
- modelDescription: 'GPT-4 is a powerful language model with enhanced reasoning, instruction-following capabilities, and 8K context window. Optimized for complex tasks requiring deep understanding.',
1147
+ modelDescription: 'Powerful language model with 8K context window featuring sophisticated reasoning, instruction-following, and knowledge capabilities. Demonstrates strong performance on complex tasks requiring deep understanding and multi-step reasoning. Excels at code generation, logical analysis, and nuanced content creation. Suitable for advanced applications requiring high-quality outputs.',
1108
1148
  pricing: {
1109
1149
  prompt: pricing(`$30.00 / 1M tokens`),
1110
1150
  output: pricing(`$60.00 / 1M tokens`),
@@ -1116,7 +1156,7 @@
1116
1156
  modelVariant: 'CHAT',
1117
1157
  modelTitle: 'gpt-4-32k',
1118
1158
  modelName: 'gpt-4-32k',
1119
- modelDescription: 'Extended context version of GPT-4 with a 32K token window for processing very long inputs and generating comprehensive responses for complex tasks.',
1159
+ modelDescription: 'Extended context version of GPT-4 with 32K token window. Maintains all capabilities of standard GPT-4 while supporting analysis of very lengthy documents, code bases, and conversations. Features enhanced ability to maintain context over long interactions and process detailed information from large inputs. Ideal for document analysis, legal review, and complex problem-solving.',
1120
1160
  pricing: {
1121
1161
  prompt: pricing(`$60.00 / 1M tokens`),
1122
1162
  output: pricing(`$120.00 / 1M tokens`),
@@ -1139,7 +1179,7 @@
1139
1179
  modelVariant: 'CHAT',
1140
1180
  modelTitle: 'gpt-4-turbo-2024-04-09',
1141
1181
  modelName: 'gpt-4-turbo-2024-04-09',
1142
- modelDescription: 'Latest stable GPT-4 Turbo model from April 2024 with enhanced reasoning and context handling capabilities. Offers 128K context window and improved performance.',
1182
+ modelDescription: 'Latest stable GPT-4 Turbo from April 2024 with 128K context window. Features enhanced reasoning chains, improved factual accuracy with 40% reduction in hallucinations, and better instruction following compared to earlier versions. Includes advanced function calling capabilities and knowledge up to April 2024. Provides optimal performance for enterprise applications requiring reliability.',
1143
1183
  pricing: {
1144
1184
  prompt: pricing(`$10.00 / 1M tokens`),
1145
1185
  output: pricing(`$30.00 / 1M tokens`),
@@ -1151,7 +1191,7 @@
1151
1191
  modelVariant: 'CHAT',
1152
1192
  modelTitle: 'gpt-3.5-turbo-1106',
1153
1193
  modelName: 'gpt-3.5-turbo-1106',
1154
- modelDescription: 'November 2023 version of GPT-3.5 Turbo with improved instruction following and a 16K token context window.',
1194
+ modelDescription: 'November 2023 version of GPT-3.5 Turbo with 16K token context window. Features improved instruction following, more consistent output formatting, and enhanced function calling capabilities. Includes knowledge cutoff from April 2023. Suitable for applications requiring good performance at lower cost than GPT-4 models.',
1155
1195
  pricing: {
1156
1196
  prompt: pricing(`$1.00 / 1M tokens`),
1157
1197
  output: pricing(`$2.00 / 1M tokens`),
@@ -1163,7 +1203,7 @@
1163
1203
  modelVariant: 'CHAT',
1164
1204
  modelTitle: 'gpt-4-turbo',
1165
1205
  modelName: 'gpt-4-turbo',
1166
- modelDescription: 'More capable model than GPT-4 with improved instruction following, function calling and a 128K token context window for handling very large documents.',
1206
+ modelDescription: 'More capable and cost-efficient version of GPT-4 with 128K token context window. Features improved instruction following, advanced function calling capabilities, and better performance on coding tasks. Maintains superior reasoning and knowledge while offering substantial cost reduction compared to base GPT-4. Ideal for complex applications requiring extensive context processing.',
1167
1207
  pricing: {
1168
1208
  prompt: pricing(`$10.00 / 1M tokens`),
1169
1209
  output: pricing(`$30.00 / 1M tokens`),
@@ -1175,10 +1215,10 @@
1175
1215
  modelVariant: 'COMPLETION',
1176
1216
  modelTitle: 'gpt-3.5-turbo-instruct-0914',
1177
1217
  modelName: 'gpt-3.5-turbo-instruct-0914',
1178
- modelDescription: 'September 2023 version of GPT-3.5 Turbo optimized for completion-style instruction following with a 4K context window.',
1218
+ modelDescription: 'September 2023 version of GPT-3.5 Turbo Instruct with 4K context window. Optimized for completion-style instruction following with deterministic responses. Better suited than chat models for applications requiring specific formatted outputs without conversation management. Knowledge cutoff from September 2021.',
1179
1219
  pricing: {
1180
1220
  prompt: pricing(`$1.50 / 1M tokens`),
1181
- output: pricing(`$2.00 / 1M tokens`), // <- For gpt-3.5-turbo-instruct
1221
+ output: pricing(`$2.00 / 1M tokens`),
1182
1222
  },
1183
1223
  },
1184
1224
  /**/
@@ -1187,7 +1227,7 @@
1187
1227
  modelVariant: 'COMPLETION',
1188
1228
  modelTitle: 'gpt-3.5-turbo-instruct',
1189
1229
  modelName: 'gpt-3.5-turbo-instruct',
1190
- modelDescription: 'Optimized version of GPT-3.5 for completion-style API with good instruction following and a 4K token context window.',
1230
+ modelDescription: 'Optimized version of GPT-3.5 for completion-style API with 4K token context window. Features strong instruction following with single-turn design rather than multi-turn conversation. Provides more consistent, deterministic outputs compared to chat models. Well-suited for templated content generation and structured text transformation tasks.',
1191
1231
  pricing: {
1192
1232
  prompt: pricing(`$1.50 / 1M tokens`),
1193
1233
  output: pricing(`$2.00 / 1M tokens`),
@@ -1205,7 +1245,7 @@
1205
1245
  modelVariant: 'CHAT',
1206
1246
  modelTitle: 'gpt-3.5-turbo',
1207
1247
  modelName: 'gpt-3.5-turbo',
1208
- modelDescription: 'Latest version of GPT-3.5 Turbo with improved performance and instruction following capabilities. Default 4K context window with options for 16K.',
1248
+ modelDescription: 'Latest version of GPT-3.5 Turbo with 4K token default context window (16K available). Features continually improved performance with enhanced instruction following and reduced hallucinations. Offers excellent balance between capability and cost efficiency. Suitable for most general-purpose applications requiring good AI capabilities at reasonable cost.',
1209
1249
  pricing: {
1210
1250
  prompt: pricing(`$0.50 / 1M tokens`),
1211
1251
  output: pricing(`$1.50 / 1M tokens`),
@@ -1217,7 +1257,7 @@
1217
1257
  modelVariant: 'CHAT',
1218
1258
  modelTitle: 'gpt-3.5-turbo-0301',
1219
1259
  modelName: 'gpt-3.5-turbo-0301',
1220
- modelDescription: 'March 2023 version of GPT-3.5 Turbo with a 4K token context window. Legacy model maintained for backward compatibility.',
1260
+ modelDescription: 'March 2023 version of GPT-3.5 Turbo with 4K token context window. Legacy model maintained for backward compatibility with specific application behaviors. Features solid conversational abilities and basic instruction following. Knowledge cutoff from September 2021. Suitable for applications explicitly designed for this version.',
1221
1261
  pricing: {
1222
1262
  prompt: pricing(`$1.50 / 1M tokens`),
1223
1263
  output: pricing(`$2.00 / 1M tokens`),
@@ -1229,7 +1269,7 @@
1229
1269
  modelVariant: 'COMPLETION',
1230
1270
  modelTitle: 'babbage-002',
1231
1271
  modelName: 'babbage-002',
1232
- modelDescription: 'Efficient legacy completion model with a good balance of performance and speed. Suitable for straightforward text generation tasks.',
1272
+ modelDescription: 'Efficient legacy completion model with 4K context window balancing performance and speed. Features moderate reasoning capabilities with focus on straightforward text generation tasks. Significantly more efficient than davinci models while maintaining adequate quality for many applications. Suitable for high-volume, cost-sensitive text generation needs.',
1233
1273
  pricing: {
1234
1274
  prompt: pricing(`$0.40 / 1M tokens`),
1235
1275
  output: pricing(`$0.40 / 1M tokens`),
@@ -1241,7 +1281,7 @@
1241
1281
  modelVariant: 'CHAT',
1242
1282
  modelTitle: 'gpt-4-1106-preview',
1243
1283
  modelName: 'gpt-4-1106-preview',
1244
- modelDescription: 'November 2023 preview version of GPT-4 Turbo with improved instruction following and a 128K token context window.',
1284
+ modelDescription: 'November 2023 preview version of GPT-4 Turbo with 128K token context window. Features improved instruction following, better function calling capabilities, and enhanced reasoning. Includes knowledge cutoff from April 2023. Suitable for complex applications requiring extensive document understanding and sophisticated interactions.',
1245
1285
  pricing: {
1246
1286
  prompt: pricing(`$10.00 / 1M tokens`),
1247
1287
  output: pricing(`$30.00 / 1M tokens`),
@@ -1253,7 +1293,7 @@
1253
1293
  modelVariant: 'CHAT',
1254
1294
  modelTitle: 'gpt-4-0125-preview',
1255
1295
  modelName: 'gpt-4-0125-preview',
1256
- modelDescription: 'January 2024 preview version of GPT-4 Turbo with improved reasoning capabilities and a 128K token context window.',
1296
+ modelDescription: 'January 2024 preview version of GPT-4 Turbo with 128K token context window. Features improved reasoning capabilities, enhanced tool use, and more reliable function calling. Includes knowledge cutoff from October 2023. Offers better performance on complex logical tasks and more consistent outputs than previous preview versions.',
1257
1297
  pricing: {
1258
1298
  prompt: pricing(`$10.00 / 1M tokens`),
1259
1299
  output: pricing(`$30.00 / 1M tokens`),
@@ -1271,7 +1311,7 @@
1271
1311
  modelVariant: 'CHAT',
1272
1312
  modelTitle: 'gpt-3.5-turbo-0125',
1273
1313
  modelName: 'gpt-3.5-turbo-0125',
1274
- modelDescription: 'January 2024 version of GPT-3.5 Turbo with improved reasoning capabilities and a 16K token context window.',
1314
+ modelDescription: 'January 2024 version of GPT-3.5 Turbo with 16K token context window. Features improved reasoning capabilities, better instruction adherence, and reduced hallucinations compared to previous versions. Includes knowledge cutoff from September 2021. Provides good performance for most general applications at reasonable cost.',
1275
1315
  pricing: {
1276
1316
  prompt: pricing(`$0.50 / 1M tokens`),
1277
1317
  output: pricing(`$1.50 / 1M tokens`),
@@ -1283,7 +1323,7 @@
1283
1323
  modelVariant: 'CHAT',
1284
1324
  modelTitle: 'gpt-4-turbo-preview',
1285
1325
  modelName: 'gpt-4-turbo-preview',
1286
- modelDescription: 'Preview version of GPT-4 Turbo that points to the latest model version. Features improved instruction following, 128K token context window and lower latency.',
1326
+ modelDescription: 'Preview version of GPT-4 Turbo with 128K token context window that points to the latest development model. Features cutting-edge improvements to instruction following, knowledge representation, and tool use capabilities. Provides access to newest features but may have occasional behavior changes. Best for non-critical applications wanting latest capabilities.',
1287
1327
  pricing: {
1288
1328
  prompt: pricing(`$10.00 / 1M tokens`),
1289
1329
  output: pricing(`$30.00 / 1M tokens`),
@@ -1295,11 +1335,10 @@
1295
1335
  modelVariant: 'EMBEDDING',
1296
1336
  modelTitle: 'text-embedding-3-large',
1297
1337
  modelName: 'text-embedding-3-large',
1298
- modelDescription: "OpenAI's most capable text embedding model designed for high-quality embeddings for complex similarity tasks and information retrieval.",
1338
+ modelDescription: "OpenAI's most capable text embedding model generating 3072-dimensional vectors. Designed for high-quality embeddings for complex similarity tasks, clustering, and information retrieval. Features enhanced cross-lingual capabilities and significantly improved performance on retrieval and classification benchmarks. Ideal for sophisticated RAG systems and semantic search applications.",
1299
1339
  pricing: {
1300
1340
  prompt: pricing(`$0.13 / 1M tokens`),
1301
- // TODO: [🏏] Leverage the batch API @see https://platform.openai.com/docs/guides/batch
1302
- output: 0, // <- Note: [🆖] In Embedding models you dont pay for output
1341
+ output: 0,
1303
1342
  },
1304
1343
  },
1305
1344
  /**/
@@ -1308,11 +1347,10 @@
1308
1347
  modelVariant: 'EMBEDDING',
1309
1348
  modelTitle: 'text-embedding-3-small',
1310
1349
  modelName: 'text-embedding-3-small',
1311
- modelDescription: 'Cost-effective embedding model with good performance for simpler tasks like text similarity and retrieval. Good balance of quality and efficiency.',
1350
+ modelDescription: 'Cost-effective embedding model generating 1536-dimensional vectors. Balances quality and efficiency for simpler tasks while maintaining good performance on text similarity and retrieval applications. Offers 20% better quality than ada-002 at significantly lower cost. Ideal for production embedding applications with cost constraints.',
1312
1351
  pricing: {
1313
1352
  prompt: pricing(`$0.02 / 1M tokens`),
1314
- // TODO: [🏏] Leverage the batch API @see https://platform.openai.com/docs/guides/batch
1315
- output: 0, // <- Note: [🆖] In Embedding models you dont pay for output
1353
+ output: 0,
1316
1354
  },
1317
1355
  },
1318
1356
  /**/
@@ -1321,7 +1359,7 @@
1321
1359
  modelVariant: 'CHAT',
1322
1360
  modelTitle: 'gpt-3.5-turbo-0613',
1323
1361
  modelName: 'gpt-3.5-turbo-0613',
1324
- modelDescription: 'June 2023 version of GPT-3.5 Turbo with function calling capabilities and a 4K token context window.',
1362
+ modelDescription: "June 2023 version of GPT-3.5 Turbo with 4K token context window. Features function calling capabilities for structured data extraction and API interaction. Includes knowledge cutoff from September 2021. Maintained for applications specifically designed for this version's behaviors and capabilities.",
1325
1363
  pricing: {
1326
1364
  prompt: pricing(`$1.50 / 1M tokens`),
1327
1365
  output: pricing(`$2.00 / 1M tokens`),
@@ -1333,11 +1371,10 @@
1333
1371
  modelVariant: 'EMBEDDING',
1334
1372
  modelTitle: 'text-embedding-ada-002',
1335
1373
  modelName: 'text-embedding-ada-002',
1336
- modelDescription: 'Legacy text embedding model suitable for text similarity and retrieval augmented generation use cases. Replaced by newer embedding-3 models.',
1374
+ modelDescription: 'Legacy text embedding model generating 1536-dimensional vectors suitable for text similarity and retrieval applications. Processes up to 8K tokens per request with consistent embedding quality. While superseded by newer embedding-3 models, still maintains adequate performance for many semantic search and classification tasks.',
1337
1375
  pricing: {
1338
1376
  prompt: pricing(`$0.1 / 1M tokens`),
1339
- // TODO: [🏏] Leverage the batch API @see https://platform.openai.com/docs/guides/batch
1340
- output: 0, // <- Note: [🆖] In Embedding models you dont pay for output
1377
+ output: 0,
1341
1378
  },
1342
1379
  },
1343
1380
  /**/
@@ -1364,7 +1401,7 @@
1364
1401
  modelVariant: 'CHAT',
1365
1402
  modelTitle: 'gpt-4o-2024-05-13',
1366
1403
  modelName: 'gpt-4o-2024-05-13',
1367
- modelDescription: 'May 2024 version of GPT-4o with enhanced multimodal capabilities, improved reasoning, and optimized for vision, audio and chat at lower latencies.',
1404
+ modelDescription: 'May 2024 version of GPT-4o with 128K context window. Features enhanced multimodal capabilities including superior image understanding (up to 20MP), audio processing, and improved reasoning. Optimized for 2x lower latency than GPT-4 Turbo while maintaining high performance. Includes knowledge up to October 2023. Ideal for production applications requiring reliable multimodal capabilities.',
1368
1405
  pricing: {
1369
1406
  prompt: pricing(`$5.00 / 1M tokens`),
1370
1407
  output: pricing(`$15.00 / 1M tokens`),
@@ -1376,7 +1413,7 @@
1376
1413
  modelVariant: 'CHAT',
1377
1414
  modelTitle: 'gpt-4o',
1378
1415
  modelName: 'gpt-4o',
1379
- modelDescription: "OpenAI's most advanced multimodal model optimized for performance, speed, and cost. Capable of vision, reasoning, and high quality text generation.",
1416
+ modelDescription: "OpenAI's most advanced general-purpose multimodal model with 128K context window. Optimized for balanced performance, speed, and cost with 2x faster responses than GPT-4 Turbo. Features excellent vision processing, audio understanding, reasoning, and text generation quality. Represents optimal balance of capability and efficiency for most advanced applications.",
1380
1417
  pricing: {
1381
1418
  prompt: pricing(`$5.00 / 1M tokens`),
1382
1419
  output: pricing(`$15.00 / 1M tokens`),
@@ -1388,7 +1425,7 @@
1388
1425
  modelVariant: 'CHAT',
1389
1426
  modelTitle: 'gpt-4o-mini',
1390
1427
  modelName: 'gpt-4o-mini',
1391
- modelDescription: 'Smaller, more cost-effective version of GPT-4o with good performance across text, vision, and audio tasks at reduced complexity.',
1428
+ modelDescription: 'Smaller, more cost-effective version of GPT-4o with 128K context window. Maintains impressive capabilities across text, vision, and audio tasks while operating at significantly lower cost. Features 3x faster inference than GPT-4o with good performance on general tasks. Excellent for applications requiring good quality multimodal capabilities at scale.',
1392
1429
  pricing: {
1393
1430
  prompt: pricing(`$0.15 / 1M tokens`),
1394
1431
  output: pricing(`$0.60 / 1M tokens`),
@@ -1400,7 +1437,7 @@
1400
1437
  modelVariant: 'CHAT',
1401
1438
  modelTitle: 'o1-preview',
1402
1439
  modelName: 'o1-preview',
1403
- modelDescription: 'Advanced reasoning model with exceptional performance on complex logical, mathematical, and analytical tasks. Built for deep reasoning and specialized professional tasks.',
1440
+ modelDescription: 'Advanced reasoning model with 128K context window specializing in complex logical, mathematical, and analytical tasks. Features exceptional step-by-step problem-solving capabilities, advanced mathematical and scientific reasoning, and superior performance on STEM-focused problems. Significantly outperforms GPT-4 on quantitative reasoning benchmarks. Ideal for professional and specialized applications.',
1404
1441
  pricing: {
1405
1442
  prompt: pricing(`$15.00 / 1M tokens`),
1406
1443
  output: pricing(`$60.00 / 1M tokens`),
@@ -1412,8 +1449,7 @@
1412
1449
  modelVariant: 'CHAT',
1413
1450
  modelTitle: 'o1-preview-2024-09-12',
1414
1451
  modelName: 'o1-preview-2024-09-12',
1415
- modelDescription: 'September 2024 version of O1 preview with specialized reasoning capabilities for complex tasks requiring precise analytical thinking.',
1416
- // <- TODO: [💩] Some better system to organize these date suffixes and versions
1452
+ modelDescription: 'September 2024 version of O1 preview with 128K context window. Features specialized reasoning capabilities with 30% improvement on mathematical and scientific accuracy over previous versions. Includes enhanced support for formal logic, statistical analysis, and technical domains. Optimized for professional applications requiring precise analytical thinking and rigorous methodologies.',
1417
1453
  pricing: {
1418
1454
  prompt: pricing(`$15.00 / 1M tokens`),
1419
1455
  output: pricing(`$60.00 / 1M tokens`),
@@ -1425,7 +1461,7 @@
1425
1461
  modelVariant: 'CHAT',
1426
1462
  modelTitle: 'o1-mini',
1427
1463
  modelName: 'o1-mini',
1428
- modelDescription: 'Smaller, cost-effective version of the O1 model with good performance on reasoning tasks while maintaining efficiency for everyday analytical use.',
1464
+ modelDescription: 'Smaller, cost-effective version of the O1 model with 128K context window. Maintains strong analytical reasoning abilities while reducing computational requirements by 70%. Features good performance on mathematical, logical, and scientific tasks at significantly lower cost than full O1. Excellent for everyday analytical applications that benefit from reasoning focus.',
1429
1465
  pricing: {
1430
1466
  prompt: pricing(`$3.00 / 1M tokens`),
1431
1467
  output: pricing(`$12.00 / 1M tokens`),
@@ -1437,7 +1473,7 @@
1437
1473
  modelVariant: 'CHAT',
1438
1474
  modelTitle: 'o1',
1439
1475
  modelName: 'o1',
1440
- modelDescription: "OpenAI's advanced reasoning model focused on logic and problem-solving. Designed for complex analytical tasks with rigorous step-by-step reasoning. 128K context window.",
1476
+ modelDescription: "OpenAI's advanced reasoning model with 128K context window focusing on logical problem-solving and analytical thinking. Features exceptional performance on quantitative tasks, step-by-step deduction, and complex technical problems. Maintains 95%+ of o1-preview capabilities with production-ready stability. Ideal for scientific computing, financial analysis, and professional applications.",
1441
1477
  pricing: {
1442
1478
  prompt: pricing(`$15.00 / 1M tokens`),
1443
1479
  output: pricing(`$60.00 / 1M tokens`),
@@ -1449,11 +1485,10 @@
1449
1485
  modelVariant: 'CHAT',
1450
1486
  modelTitle: 'o3-mini',
1451
1487
  modelName: 'o3-mini',
1452
- modelDescription: 'Cost-effective reasoning model optimized for academic and scientific problem-solving. Efficient performance on STEM tasks with deep mathematical and scientific knowledge. 128K context window.',
1488
+ modelDescription: 'Cost-effective reasoning model with 128K context window optimized for academic and scientific problem-solving. Features efficient performance on STEM tasks with specialized capabilities in mathematics, physics, chemistry, and computer science. Offers 80% of O1 performance on technical domains at significantly lower cost. Ideal for educational applications and research support.',
1453
1489
  pricing: {
1454
1490
  prompt: pricing(`$3.00 / 1M tokens`),
1455
1491
  output: pricing(`$12.00 / 1M tokens`),
1456
- // <- TODO: !! Unsure, check the pricing
1457
1492
  },
1458
1493
  },
1459
1494
  /**/
@@ -1462,7 +1497,7 @@
1462
1497
  modelVariant: 'CHAT',
1463
1498
  modelTitle: 'o1-mini-2024-09-12',
1464
1499
  modelName: 'o1-mini-2024-09-12',
1465
- modelDescription: "September 2024 version of O1-mini with balanced reasoning capabilities and cost-efficiency. Good for analytical tasks that don't require the full O1 model.",
1500
+ modelDescription: "September 2024 version of O1-mini with 128K context window featuring balanced reasoning capabilities and cost-efficiency. Includes 25% improvement in mathematical accuracy and enhanced performance on coding tasks compared to previous versions. Maintains efficient resource utilization while delivering improved results for analytical applications that don't require the full O1 model.",
1466
1501
  pricing: {
1467
1502
  prompt: pricing(`$3.00 / 1M tokens`),
1468
1503
  output: pricing(`$12.00 / 1M tokens`),
@@ -1474,7 +1509,7 @@
1474
1509
  modelVariant: 'CHAT',
1475
1510
  modelTitle: 'gpt-3.5-turbo-16k-0613',
1476
1511
  modelName: 'gpt-3.5-turbo-16k-0613',
1477
- modelDescription: 'June 2023 version of GPT-3.5 Turbo with extended 16k token context window for processing longer conversations and documents.',
1512
+ modelDescription: "June 2023 version of GPT-3.5 Turbo with extended 16K token context window. Features good handling of longer conversations and documents with improved memory management across extended contexts. Includes knowledge cutoff from September 2021. Maintained for applications specifically designed for this version's behaviors and capabilities.",
1478
1513
  pricing: {
1479
1514
  prompt: pricing(`$3.00 / 1M tokens`),
1480
1515
  output: pricing(`$4.00 / 1M tokens`),
@@ -2063,131 +2098,221 @@
2063
2098
  const OLLAMA_MODELS = exportJson({
2064
2099
  name: 'OLLAMA_MODELS',
2065
2100
  value: [
2101
+ {
2102
+ modelVariant: 'CHAT',
2103
+ modelTitle: 'llama3',
2104
+ modelName: 'llama3',
2105
+ modelDescription: 'Meta Llama 3 (8B-70B parameters) with 8K context window. Latest generation foundation model with enhanced reasoning, instruction following, and factual accuracy. Superior performance to Llama 2 across all benchmarks with improved multilingual capabilities.',
2106
+ },
2107
+ {
2108
+ modelVariant: 'CHAT',
2109
+ modelTitle: 'llama3-chat',
2110
+ modelName: 'llama3-chat',
2111
+ modelDescription: 'Meta Llama 3 Chat with 8K context window, fine-tuned specifically for dialogue with significantly improved instruction following. Features enhanced safety guardrails and reduced hallucinations. Recommended over Llama 2 Chat for all conversational applications.',
2112
+ },
2113
+ {
2114
+ modelVariant: 'CHAT',
2115
+ modelTitle: 'llama3-instruct',
2116
+ modelName: 'llama3-instruct',
2117
+ modelDescription: 'Meta Llama 3 Instruct with 8K context window, fine-tuned for following specific instructions with precise outputs. Features improved structured response formatting and accurate completion of complex directives.',
2118
+ },
2119
+ {
2120
+ modelVariant: 'CHAT',
2121
+ modelTitle: 'codellama:13b',
2122
+ modelName: 'codellama:13b',
2123
+ modelDescription: 'Meta CodeLlama 13B with 16K context window, specialized foundation model for code generation and understanding. Supports multiple programming languages with strong contextual code completion capabilities.',
2124
+ },
2125
+ {
2126
+ modelVariant: 'CHAT',
2127
+ modelTitle: 'codellama:34b',
2128
+ modelName: 'codellama:34b',
2129
+ modelDescription: 'Meta CodeLlama 34B with 16K context window, larger code-specialized model with improved reasoning about complex programming tasks. Enhanced documentation generation and bug detection compared to smaller variants.',
2130
+ },
2131
+ {
2132
+ modelVariant: 'CHAT',
2133
+ modelTitle: 'phi3:mini',
2134
+ modelName: 'phi3:mini',
2135
+ modelDescription: 'Microsoft Phi-3 Mini (3.8B parameters) with 4K context window, highly efficient small language model with remarkable reasoning given its size. Performs competitively with much larger models on common benchmarks. Excellent for resource-constrained environments.',
2136
+ },
2137
+ {
2138
+ modelVariant: 'CHAT',
2139
+ modelTitle: 'phi3:medium',
2140
+ modelName: 'phi3:medium',
2141
+ modelDescription: 'Microsoft Phi-3 Medium (14B parameters) with 8K context window, balanced model offering strong performance with reasonable compute requirements. Features improved reasoning and factuality compared to Mini variant while maintaining efficiency.',
2142
+ },
2143
+ {
2144
+ modelVariant: 'CHAT',
2145
+ modelTitle: 'mistral-nemo',
2146
+ modelName: 'mistral-nemo',
2147
+ modelDescription: 'Mistral NeMo with 32K context window, open-source model optimized for enterprise use cases with improved reasoning and knowledge capabilities. Features strong performance on professional and domain-specific tasks.',
2148
+ },
2066
2149
  {
2067
2150
  modelVariant: 'CHAT',
2068
2151
  modelTitle: 'llama2',
2069
2152
  modelName: 'llama2',
2070
- modelDescription: 'Meta Llama 2, a general-purpose large language model.',
2153
+ modelDescription: 'Meta Llama 2 (7B-70B parameters) with 4K context window. General-purpose foundation model balancing performance and efficiency for text generation and reasoning tasks. Suitable for most non-specialized applications. Note: Superseded by Llama 3 models which offer better performance.',
2071
2154
  },
2072
2155
  {
2073
2156
  modelVariant: 'CHAT',
2074
2157
  modelTitle: 'llama2-chat',
2075
2158
  modelName: 'llama2-chat',
2076
- modelDescription: 'Meta Llama 2 Chat, optimized for conversational tasks.',
2159
+ modelDescription: 'Meta Llama 2 Chat with 4K context window, fine-tuned specifically for conversational AI. Enhanced instruction following and safer responses compared to base model. Ideal for chatbots and interactive applications. Note: Consider using newer Llama 3 Chat for improved performance.',
2077
2160
  },
2078
2161
  {
2079
2162
  modelVariant: 'CHAT',
2080
2163
  modelTitle: 'alpaca-7b',
2081
2164
  modelName: 'alpaca-7b',
2082
- modelDescription: 'Stanford Alpaca 7B, instruction-tuned LLaMA model.',
2165
+ modelDescription: 'Stanford Alpaca 7B with 2K context window, instruction-tuned LLaMA model focused on following specific directions. Optimized for resource efficiency while maintaining good response quality. Suitable for lightweight applications.',
2083
2166
  },
2084
2167
  {
2085
2168
  modelVariant: 'CHAT',
2086
2169
  modelTitle: 'alpaca-30b',
2087
2170
  modelName: 'alpaca-30b',
2088
- modelDescription: 'Stanford Alpaca 30B, larger instruction-tuned LLaMA model.',
2171
+ modelDescription: 'Stanford Alpaca 30B with 2K context window. Larger instruction-tuned LLaMA model with improved reasoning and content generation capabilities. Better performance than 7B variant but requires more computational resources.',
2089
2172
  },
2090
2173
  {
2091
2174
  modelVariant: 'CHAT',
2092
2175
  modelTitle: 'vicuna-13b',
2093
2176
  modelName: 'vicuna-13b',
2094
- modelDescription: 'Vicuna 13B, fine-tuned LLaMA for chat and instruction.',
2177
+ modelDescription: 'Vicuna 13B with 2K context window, fine-tuned from LLaMA for chat and instruction following. Known for balanced performance, good conversational abilities, and improved helpfulness over base models. Popular for diverse conversational applications.',
2095
2178
  },
2096
2179
  {
2097
2180
  modelVariant: 'CHAT',
2098
2181
  modelTitle: 'falcon-7b',
2099
2182
  modelName: 'falcon-7b',
2100
- modelDescription: 'Falcon 7B, a performant open large language model.',
2183
+ modelDescription: 'Falcon 7B with 2K context window, performant open large language model trained on 1.5 trillion tokens. Strong on general knowledge tasks with smaller computational requirements. Good balance of performance and efficiency.',
2101
2184
  },
2102
2185
  {
2103
2186
  modelVariant: 'CHAT',
2104
2187
  modelTitle: 'falcon-40b',
2105
2188
  modelName: 'falcon-40b',
2106
- modelDescription: 'Falcon 40B, a larger open large language model.',
2189
+ modelDescription: 'Falcon 40B with 2K context window, larger open large language model with enhanced reasoning and knowledge capabilities. Significantly better performance than 7B version but requires substantially more resources. Suitable for complex generation tasks.',
2107
2190
  },
2108
2191
  {
2109
2192
  modelVariant: 'CHAT',
2110
2193
  modelTitle: 'bloom-7b',
2111
2194
  modelName: 'bloom-7b',
2112
- modelDescription: 'BLOOM 7B, multilingual large language model.',
2195
+ modelDescription: 'BLOOM 7B with 2K context window, multilingual large language model supporting 46+ languages. Trained for diverse linguistic capabilities across languages. Especially useful for non-English or multilingual applications.',
2113
2196
  },
2114
2197
  {
2115
2198
  modelVariant: 'CHAT',
2116
2199
  modelTitle: 'mistral-7b',
2117
2200
  modelName: 'mistral-7b',
2118
- modelDescription: 'Mistral 7B, efficient and fast open LLM.',
2201
+ modelDescription: 'Mistral 7B with 8K context window, efficient and fast open LLM with performance rivaling much larger models. Features Grouped-Query Attention for faster inference. Excellent balance of quality and speed for various applications.',
2119
2202
  },
2120
2203
  {
2121
2204
  modelVariant: 'CHAT',
2122
2205
  modelTitle: 'gorilla',
2123
2206
  modelName: 'gorilla',
2124
- modelDescription: 'Gorilla, open-source LLM for tool use and APIs.',
2207
+ modelDescription: 'Gorilla with 4K context window, specialized open-source LLM for tool use and API interaction. Fine-tuned to understand and generate API calls accurately. Optimal for agent applications that interact with external tools and services.',
2125
2208
  },
2126
2209
  {
2127
2210
  modelVariant: 'CHAT',
2128
2211
  modelTitle: 'cerebras-13b',
2129
2212
  modelName: 'cerebras-13b',
2130
- modelDescription: 'Cerebras-GPT 13B, open large language model.',
2213
+ modelDescription: 'Cerebras-GPT 13B with 2K context window, trained on diverse high-quality datasets. Good general-purpose capabilities with particular strengths in factual response accuracy. Well-suited for applications requiring reliable information.',
2131
2214
  },
2132
2215
  {
2133
2216
  modelVariant: 'CHAT',
2134
2217
  modelTitle: 'openchat-7b',
2135
2218
  modelName: 'openchat-7b',
2136
- modelDescription: 'OpenChat 7B, fine-tuned for conversational tasks.',
2219
+ modelDescription: 'OpenChat 7B with 4K context window, optimized for conversational abilities and instruction following. Outperforms many larger models on benchmark tasks while maintaining efficiency. Ideal for interactive applications with limited resources.',
2137
2220
  },
2138
2221
  {
2139
2222
  modelVariant: 'CHAT',
2140
2223
  modelTitle: 'openchat-13b',
2141
2224
  modelName: 'openchat-13b',
2142
- modelDescription: 'OpenChat 13B, larger conversational LLM.',
2225
+ modelDescription: 'OpenChat 13B with 4K context window, larger conversational LLM with enhanced reasoning, helpfulness, and knowledge. Significant improvement over 7B variant in complex tasks and nuanced conversations. Well-balanced for most conversational applications.',
2143
2226
  },
2144
2227
  {
2145
2228
  modelVariant: 'CHAT',
2146
2229
  modelTitle: 'mpt-7b-chat',
2147
2230
  modelName: 'mpt-7b-chat',
2148
- modelDescription: 'MPT-7B Chat, optimized for dialogue and chat.',
2231
+ modelDescription: 'MPT-7B Chat with 4K context window (extendable to 65K+), optimized for dialogue using high-quality conversation data. Features enhanced conversational abilities with strong safety alignments. Good for deployment in public-facing chat applications.',
2149
2232
  },
2150
2233
  {
2151
2234
  modelVariant: 'CHAT',
2152
2235
  modelTitle: 'mpt-7b-instruct',
2153
2236
  modelName: 'mpt-7b-instruct',
2154
- modelDescription: 'MPT-7B Instruct, instruction-tuned variant.',
2237
+ modelDescription: 'MPT-7B Instruct with 4K context window (extendable to 65K+), instruction-tuned variant optimized for following specific directives. Better than chat variant for single-turn instruction tasks. Well-suited for content generation and task completion.',
2155
2238
  },
2156
2239
  {
2157
2240
  modelVariant: 'CHAT',
2158
2241
  modelTitle: 'command-7b',
2159
2242
  modelName: 'command-7b',
2160
- modelDescription: 'Command 7B, instruction-following LLM.',
2243
+ modelDescription: 'Command 7B with 4K context window, instruction-following LLM tuned specifically for direct command execution and helpful responses. Optimized for clarity of outputs and following explicit directions. Good for practical task-oriented applications.',
2161
2244
  },
2162
2245
  {
2163
2246
  modelVariant: 'CHAT',
2164
2247
  modelTitle: 'starcoder',
2165
2248
  modelName: 'starcoder',
2166
- modelDescription: 'StarCoder, code generation large language model.',
2249
+ modelDescription: 'StarCoder with 8K context window, specialized code generation large language model trained on permissively licensed code. Supports 80+ programming languages. Optimized for code completion, generation, and understanding tasks.',
2167
2250
  },
2168
2251
  {
2169
2252
  modelVariant: 'CHAT',
2170
2253
  modelTitle: 'starcoder2',
2171
2254
  modelName: 'starcoder2',
2172
- modelDescription: 'StarCoder2, improved code generation model.',
2255
+ modelDescription: 'StarCoder2 with 16K context window, improved code generation model with better reasoning about code, debugging capabilities, and documentation generation. Supports 600+ programming languages. Ideal for complex software development assistance.',
2173
2256
  },
2174
2257
  {
2175
2258
  modelVariant: 'CHAT',
2176
2259
  modelTitle: 'mixtral-7b-chat',
2177
2260
  modelName: 'mixtral-7b-chat',
2178
- modelDescription: 'Mixtral 7B Chat, Mixture-of-Experts conversational model.',
2261
+ modelDescription: 'Mixtral 7B Chat with 32K context window, Mixture-of-Experts conversational model with strong performance across diverse tasks. Efficiently routes inputs to specialized sub-networks for optimal processing. Well-balanced for most chat applications.',
2179
2262
  },
2180
2263
  {
2181
2264
  modelVariant: 'CHAT',
2182
2265
  modelTitle: 'mixtral-8x7b',
2183
2266
  modelName: 'mixtral-8x7b',
2184
- modelDescription: 'Mixtral 8x7B, Mixture-of-Experts large language model.',
2267
+ modelDescription: 'Mixtral 8x7B with 32K context window, advanced Mixture-of-Experts architecture using 8 expert networks of 7B parameters each. Competitive with much larger dense models while using less computation. Excellent general-purpose capabilities.',
2185
2268
  },
2186
2269
  {
2187
2270
  modelVariant: 'CHAT',
2188
2271
  modelTitle: 'mixtral-8x7b-instruct',
2189
2272
  modelName: 'mixtral-8x7b-instruct',
2190
- modelDescription: 'Mixtral 8x7B Instruct, instruction-tuned Mixture-of-Experts model.',
2273
+ modelDescription: 'Mixtral 8x7B Instruct with 32K context window, instruction-tuned Mixture-of-Experts model for direct task execution. Enhanced directive following and more structured outputs compared to base model. Optimal for specific instruction-based workloads.',
2274
+ },
2275
+ {
2276
+ modelVariant: 'CHAT',
2277
+ modelTitle: 'neural-chat',
2278
+ modelName: 'neural-chat',
2279
+ modelDescription: 'Intel Neural Chat (latest) with 8K context window, optimized for Intel hardware with efficient inference. Balanced model for general-purpose conversational applications with good instruction following capabilities.',
2280
+ },
2281
+ {
2282
+ modelVariant: 'CHAT',
2283
+ modelTitle: 'qwen:7b',
2284
+ modelName: 'qwen:7b',
2285
+ modelDescription: 'Alibaba Qwen 7B with 8K context window. Versatile model with strong multilingual capabilities, particularly for Chinese and English. Features good reasoning and knowledge across diverse domains.',
2286
+ },
2287
+ {
2288
+ modelVariant: 'CHAT',
2289
+ modelTitle: 'qwen:14b',
2290
+ modelName: 'qwen:14b',
2291
+ modelDescription: 'Alibaba Qwen 14B with 8K context window. Enhanced version with improved reasoning and knowledge capabilities. Particularly strong in multilingual applications and domain-specific tasks requiring deeper understanding.',
2292
+ },
2293
+ {
2294
+ modelVariant: 'CHAT',
2295
+ modelTitle: 'gemma:2b',
2296
+ modelName: 'gemma:2b',
2297
+ modelDescription: 'Google Gemma 2B with 8K context window. Lightweight but capable model designed for efficiency. Good performance for its size on common tasks, ideal for resource-constrained environments and quick responses.',
2298
+ },
2299
+ {
2300
+ modelVariant: 'CHAT',
2301
+ modelTitle: 'gemma:7b',
2302
+ modelName: 'gemma:7b',
2303
+ modelDescription: 'Google Gemma 7B with 8K context window. Well-balanced model offering strong performance across general tasks while maintaining reasonable resource requirements. Good alternative to similar-sized models with competitive capabilities.',
2304
+ },
2305
+ {
2306
+ modelVariant: 'CHAT',
2307
+ modelTitle: 'dolphin-mixtral',
2308
+ modelName: 'dolphin-mixtral',
2309
+ modelDescription: 'Dolphin Mixtral with 32K context window. Community-tuned version of Mixtral with enhanced instruction following and creative capabilities. Maintains the MoE architecture while improving conversational abilities and reducing hallucinations.',
2310
+ },
2311
+ {
2312
+ modelVariant: 'CHAT',
2313
+ modelTitle: 'yi:34b-chat',
2314
+ modelName: 'yi:34b-chat',
2315
+ modelDescription: 'Yi 34B Chat with 4K context window. Large bilingual model with exceptional English and Chinese capabilities. Strong performance on reasoning, knowledge, and instruction following tasks that competes with much larger commercial models.',
2191
2316
  },
2192
2317
  // <- [🕕]
2193
2318
  ],
@@ -2215,7 +2340,7 @@
2215
2340
  const openAiCompatibleOptions = {
2216
2341
  baseURL: DEFAULT_OLLAMA_BASE_URL,
2217
2342
  ...ollamaOptions,
2218
- userId: 'ollama',
2343
+ apiKey: 'ollama',
2219
2344
  };
2220
2345
  super(openAiCompatibleOptions);
2221
2346
  }
@@ -2274,6 +2399,9 @@
2274
2399
  * @public exported from `@promptbook/ollama`
2275
2400
  */
2276
2401
  const createOllamaExecutionTools = Object.assign((options) => {
2402
+ if (($isRunningInBrowser() || $isRunningInWebWorker()) && !options.dangerouslyAllowBrowser) {
2403
+ options = { ...options, dangerouslyAllowBrowser: true };
2404
+ }
2277
2405
  return new OllamaExecutionTools(options);
2278
2406
  }, {
2279
2407
  packageName: '@promptbook/ollama',