utilitas 1998.2.43 → 1998.2.44

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/lib/alan.mjs CHANGED
@@ -54,7 +54,7 @@ const [
54
54
  CLAUDE_35_HAIKU, CLOUD_37_SONNET, AUDIO, WAV, CHATGPT_MINI, ATTACHMENTS,
55
55
  CHAT, OPENAI_VOICE, MEDIUM, LOW, HIGH, GPT_REASONING_EFFORT, THINK,
56
56
  THINK_STR, THINK_END, AZURE, TOOLS_STR, TOOLS_END, TOOLS, TEXT, THINKING,
57
- OK, FUNC,
57
+ OK, FUNC, GPT_45,
58
58
  ] = [
59
59
  'OPENAI', 'GEMINI', 'CHATGPT', 'OPENAI_EMBEDDING', 'GEMINI_EMEDDING',
60
60
  'OPENAI_TRAINING', 'OLLAMA', 'CLAUDE', 'gpt-4o-mini', 'gpt-4o', 'o1',
@@ -67,6 +67,7 @@ const [
67
67
  '[ATTACHMENTS]', 'CHAT', 'OPENAI_VOICE', 'medium', 'low', 'high',
68
68
  'medium', 'think', '<think>', '</think>', 'AZURE', '<tools>',
69
69
  '</tools>', 'tools', 'text', 'thinking', 'OK', 'function',
70
+ 'gpt-4.5-preview',
70
71
  ];
71
72
 
72
73
  const [
@@ -147,9 +148,9 @@ const MODELS = {
147
148
  contextWindow: 128000,
148
149
  imageCostTokens: 1105,
149
150
  maxOutputTokens: 16384,
150
- requestLimitsRPM: 5000,
151
- tokenLimitsTPD: 40000000,
152
- tokenLimitsTPM: 4000000,
151
+ requestLimitsRPM: 10000,
152
+ tokenLimitsTPD: 1000000000,
153
+ tokenLimitsTPM: 10000000,
153
154
  trainingData: 'Oct 2023',
154
155
  json: true,
155
156
  vision: true,
@@ -166,9 +167,9 @@ const MODELS = {
166
167
  contextWindow: 128000,
167
168
  imageCostTokens: 1105,
168
169
  maxOutputTokens: 16384,
169
- requestLimitsRPM: 5000,
170
- tokenLimitsTPD: 100000000,
171
- tokenLimitsTPM: 800000,
170
+ requestLimitsRPM: 10000,
171
+ tokenLimitsTPD: 20000000,
172
+ tokenLimitsTPM: 2000000,
172
173
  trainingData: 'Oct 2023',
173
174
  json: true,
174
175
  vision: true,
@@ -185,9 +186,9 @@ const MODELS = {
185
186
  contextWindow: 200000,
186
187
  imageCostTokens: 1105,
187
188
  maxOutputTokens: 100000,
188
- requestLimitsRPM: 500,
189
- tokenLimitsTPD: 100000000,
190
- tokenLimitsTPM: 800000,
189
+ requestLimitsRPM: 10000,
190
+ tokenLimitsTPD: 200000000,
191
+ tokenLimitsTPM: 2000000,
191
192
  trainingData: 'Oct 2023',
192
193
  json: true,
193
194
  reasoning: true,
@@ -205,9 +206,9 @@ const MODELS = {
205
206
  contextWindow: 200000,
206
207
  imageCostTokens: 1105,
207
208
  maxOutputTokens: 100000,
208
- requestLimitsRPM: 5000,
209
- tokenLimitsTPD: 40000000,
210
- tokenLimitsTPM: 4000000,
209
+ requestLimitsRPM: 10000,
210
+ tokenLimitsTPD: 1000000000,
211
+ tokenLimitsTPM: 10000000,
211
212
  trainingData: 'Oct 2023',
212
213
  json: true,
213
214
  reasoning: true,
@@ -221,6 +222,21 @@ const MODELS = {
221
222
  // wav,
222
223
  // ],
223
224
  },
225
+ [GPT_45]: {
226
+ contextWindow: 128000,
227
+ imageCostTokens: 1105,
228
+ maxOutputTokens: 16384,
229
+ requestLimitsRPM: 10000,
230
+ tokenLimitsTPD: 100000000,
231
+ tokenLimitsTPM: 1000000,
232
+ json: true,
233
+ vision: true,
234
+ tools: true,
235
+ supportedMimeTypes: [
236
+ png, jpeg, gif, webp,
237
+ ],
238
+ trainingData: 'Oct 2023',
239
+ },
224
240
  [GEMINI_20_FLASH]: {
225
241
  // https://ai.google.dev/gemini-api/docs/models/gemini
226
242
  // https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-multimodal-prompts?hl=en#gemini-send-multimodal-samples-pdf-nodejs
@@ -661,6 +677,7 @@ const getInfoEnd = text => Math.max(...[THINK_END, TOOLS_END].map(x => {
661
677
  return keyEnd >= 0 ? (keyEnd + x.length) : 0;
662
678
  }));
663
679
 
680
+ // @todo: escape ``` in think and tools
664
681
  const packResp = async (resp, options) => {
665
682
  if (options?.raw) { return resp; }
666
683
  let [txt, audio, references, simpleText, referencesMarkdown, end, json] = [
@@ -1518,9 +1535,8 @@ export {
1518
1535
  ATTACHMENT_TOKEN_COST, CLOUD_37_SONNET, CODE_INTERPRETER, DEEPSEEK_R1,
1519
1536
  DEEPSEEK_R1_32B, DEEPSEEK_R1_70B, DEFAULT_MODELS,
1520
1537
  EMBEDDING_001,
1521
- FUNCTION, GEMINI_20_FLASH, GEMINI_20_FLASH_THINKING, GPT_4O, GPT_4O_MINI, GPT_O1, GPT_O3_MINI, INSTRUCTIONS, MODELS,
1522
- OPENAI_VOICE,
1523
- RETRIEVAL,
1538
+ FUNCTION, GEMINI_20_FLASH, GEMINI_20_FLASH_THINKING, GPT_45, GPT_4O, GPT_4O_MINI, GPT_O1, GPT_O3_MINI, INSTRUCTIONS, MODELS,
1539
+ OPENAI_VOICE, RETRIEVAL,
1524
1540
  TEXT_EMBEDDING_3_SMALL, _NEED, analyzeSessions,
1525
1541
  buildGptTrainingCase,
1526
1542
  buildGptTrainingCases,
package/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1998.2.43",
4
+ "version": "1998.2.44",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1998.2.43",
4
+ "version": "1998.2.44",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",