utilitas 1995.2.44 → 1995.2.45

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
@@ -757,7 +757,7 @@ const talk = async (input, options) => {
757
757
  const engine = unifyEngine({ engine: CHATGPT, ...options });
758
758
  assert(chatConfig.engines[engine], NOT_INIT);
759
759
  const model = options?.model || chatConfig.engines[engine].model;
760
- const MODEL = MODELS[model];
760
+ const _MODEL = MODELS[model];
761
761
  const sessionId = options?.sessionId || newSessionId();
762
762
  const session = await getSession(sessionId, { engine, ...options });
763
763
  let [resp, sys, messages, msgBuilder] = [null, [], [], null];
@@ -791,7 +791,7 @@ const talk = async (input, options) => {
791
791
  }
792
792
  while (countTokens([
793
793
  ...sys, ...messages, buildVertexMessage(input, { role: user })
794
- ]) >= MODEL.maxInputTokens) {
794
+ ]) >= _MODEL.maxInputTokens) {
795
795
  if (messages.length) {
796
796
  session.messages.shift();
797
797
  msgBuilder && msgBuilder();
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": "1995.2.44",
4
+ "version": "1995.2.45",
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": "1995.2.44",
4
+ "version": "1995.2.45",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",