utilitas 1995.2.73 → 1995.2.74
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 +5 -5
- package/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/alan.mjs +30 -19
- package/lib/manifest.mjs +1 -1
- package/package.json +1 -1
package/lib/alan.mjs
CHANGED
|
@@ -13,15 +13,17 @@ const _NEED = [
|
|
|
13
13
|
];
|
|
14
14
|
|
|
15
15
|
const [
|
|
16
|
-
GPT_35_TURBO,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
GPT_35_TURBO, GPT_35_TURBO_16K, GPT_4, GPT_4_VISION, GEMINI_PRO,
|
|
17
|
+
GEMINI_PRO_VISION, EMBEDDING_001, EMBEDDING_GECKO_001, EMBEDDING_GECKO_002,
|
|
18
|
+
EMBEDDING_GECKO_ML001, MISTRAL, TEXT_EMBEDDING_3_SMALL,
|
|
19
|
+
TEXT_EMBEDDING_3_LARGE, GPT_4_TURBO
|
|
19
20
|
] = [
|
|
20
|
-
'gpt-3.5-turbo', 'gpt-3.5-turbo-1106', 'gpt-4', 'gpt-4-
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'textembedding-gecko@
|
|
24
|
-
'
|
|
21
|
+
'gpt-3.5-turbo', 'gpt-3.5-turbo-1106', 'gpt-4', 'gpt-4-vision-preview',
|
|
22
|
+
'gemini-pro', 'gemini-pro-vision', 'embedding-001',
|
|
23
|
+
'textembedding-gecko@001', 'textembedding-gecko@002',
|
|
24
|
+
'textembedding-gecko-multilingual@001', 'mistral',
|
|
25
|
+
'text-embedding-3-small', 'text-embedding-3-large',
|
|
26
|
+
'gpt-4-turbo-preview',
|
|
25
27
|
];
|
|
26
28
|
|
|
27
29
|
const [tool, provider, messages, text] = [
|
|
@@ -75,8 +77,8 @@ const DEFAULT_MODELS = {
|
|
|
75
77
|
[GEMINI_EMEDDING]: EMBEDDING_001,
|
|
76
78
|
[GEMINI]: GEMINI_PRO,
|
|
77
79
|
[OLLAMA]: MISTRAL,
|
|
78
|
-
[OPENAI_EMBEDDING]:
|
|
79
|
-
[OPENAI_TRAINING]:
|
|
80
|
+
[OPENAI_EMBEDDING]: TEXT_EMBEDDING_3_SMALL,
|
|
81
|
+
[OPENAI_TRAINING]: GPT_35_TURBO_16K,
|
|
80
82
|
[VERTEX_EMEDDING]: EMBEDDING_GECKO_ML001,
|
|
81
83
|
[VERTEX]: GEMINI_PRO_VISION,
|
|
82
84
|
};
|
|
@@ -88,7 +90,7 @@ const chatConfig = {
|
|
|
88
90
|
let tokeniser;
|
|
89
91
|
|
|
90
92
|
// https://platform.openai.com/docs/models/continuous-model-upgrades
|
|
91
|
-
// https://platform.openai.com/account/limits // Tier
|
|
93
|
+
// https://platform.openai.com/account/limits // Tier 3
|
|
92
94
|
// https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini
|
|
93
95
|
// https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models
|
|
94
96
|
const MODELS = {
|
|
@@ -98,7 +100,7 @@ const MODELS = {
|
|
|
98
100
|
requestLimitsRPM: 5000,
|
|
99
101
|
trainingData: 'Sep 2021',
|
|
100
102
|
},
|
|
101
|
-
[
|
|
103
|
+
[GPT_35_TURBO_16K]: {
|
|
102
104
|
contextWindow: 16385,
|
|
103
105
|
maxOutputTokens: 4096,
|
|
104
106
|
tokenLimitsTPM: 160000,
|
|
@@ -111,7 +113,7 @@ const MODELS = {
|
|
|
111
113
|
requestLimitsRPM: 5000,
|
|
112
114
|
trainingData: 'Sep 2021',
|
|
113
115
|
},
|
|
114
|
-
[
|
|
116
|
+
[GPT_4_TURBO]: {
|
|
115
117
|
contextWindow: 128000,
|
|
116
118
|
maxOutputTokens: 4096,
|
|
117
119
|
tokenLimitsTPM: 300000,
|
|
@@ -154,11 +156,20 @@ const MODELS = {
|
|
|
154
156
|
tokenLimitsTPM: Infinity,
|
|
155
157
|
requestLimitsRPM: Infinity,
|
|
156
158
|
},
|
|
157
|
-
[
|
|
158
|
-
contextWindow:
|
|
159
|
+
[TEXT_EMBEDDING_3_SMALL]: {
|
|
160
|
+
contextWindow: 8191,
|
|
161
|
+
outputDimension: 1536,
|
|
159
162
|
tokenLimitsTPM: 1000000,
|
|
160
163
|
requestLimitsRPM: 500,
|
|
161
|
-
trainingData: '
|
|
164
|
+
trainingData: 'Sep 2021',
|
|
165
|
+
embedding: true,
|
|
166
|
+
},
|
|
167
|
+
[TEXT_EMBEDDING_3_LARGE]: {
|
|
168
|
+
contextWindow: 8191,
|
|
169
|
+
outputDimension: 3072, // ERROR: column cannot have more than 2000 dimensions for hnsw index
|
|
170
|
+
tokenLimitsTPM: 1000000,
|
|
171
|
+
requestLimitsRPM: 500,
|
|
172
|
+
trainingData: 'Sep 2021',
|
|
162
173
|
embedding: true,
|
|
163
174
|
},
|
|
164
175
|
[GEMINI_EMEDDING]: {
|
|
@@ -949,15 +960,15 @@ export {
|
|
|
949
960
|
FUNCTION,
|
|
950
961
|
GEMINI_PRO_VISION,
|
|
951
962
|
GEMINI_PRO,
|
|
952
|
-
|
|
963
|
+
GPT_35_TURBO_16K,
|
|
953
964
|
GPT_35_TURBO,
|
|
954
|
-
|
|
965
|
+
GPT_4_TURBO,
|
|
955
966
|
GPT_4_VISION,
|
|
956
967
|
GPT_4,
|
|
957
968
|
MISTRAL,
|
|
958
969
|
MODELS,
|
|
959
970
|
RETRIEVAL,
|
|
960
|
-
|
|
971
|
+
TEXT_EMBEDDING_3_SMALL,
|
|
961
972
|
buildGptTrainingCase,
|
|
962
973
|
buildGptTrainingCases,
|
|
963
974
|
cancelGptFineTuningJob,
|
package/lib/manifest.mjs
CHANGED