@oh-my-pi/pi-mnemopi 16.2.1 → 16.2.3
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/CHANGELOG.md +6 -0
- package/package.json +4 -4
- package/src/core/embeddings.ts +2 -1
- package/src/core/extraction/client.ts +3 -2
- package/src/core/local-llm.ts +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-mnemopi",
|
|
4
|
-
"version": "16.2.
|
|
4
|
+
"version": "16.2.3",
|
|
5
5
|
"description": "Local SQLite memory engine for Oh My Pi agents",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"fmt": "biome format --write ."
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@oh-my-pi/pi-ai": "16.2.
|
|
43
|
-
"@oh-my-pi/pi-catalog": "16.2.
|
|
44
|
-
"@oh-my-pi/pi-utils": "16.2.
|
|
42
|
+
"@oh-my-pi/pi-ai": "16.2.3",
|
|
43
|
+
"@oh-my-pi/pi-catalog": "16.2.3",
|
|
44
|
+
"@oh-my-pi/pi-utils": "16.2.3",
|
|
45
45
|
"lru-cache": "11.5.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
package/src/core/embeddings.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mkdirSync } from "node:fs";
|
|
2
|
-
import { type ApiKey, getOpenRouterHeaders,
|
|
2
|
+
import { type ApiKey, getOpenRouterHeaders, withAuth } from "@oh-my-pi/pi-ai";
|
|
3
|
+
import { ProviderHttpError } from "@oh-my-pi/pi-ai/error";
|
|
3
4
|
import { hostMatchesUrl } from "@oh-my-pi/pi-catalog/hosts";
|
|
4
5
|
import {
|
|
5
6
|
$env,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ApiKey, type FetchImpl, withAuth } from "@oh-my-pi/pi-ai";
|
|
2
|
+
import * as AIError from "@oh-my-pi/pi-ai/error";
|
|
2
3
|
|
|
3
4
|
import { getDiagnostics } from "./diagnostics";
|
|
4
5
|
import { EXTRACTION_SYSTEM_PROMPT, EXTRACTION_USER_TEMPLATE } from "./prompts";
|
|
@@ -81,8 +82,8 @@ export class ExtractionClient {
|
|
|
81
82
|
try {
|
|
82
83
|
return await this.callApi(model, messages, temperature, maxTokens, key);
|
|
83
84
|
} catch (exc) {
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
85
|
+
const flags = AIError.classify(exc);
|
|
86
|
+
if (AIError.is(flags, AIError.Flag.UsageLimit) || AIError.is(flags, AIError.Flag.Transient)) {
|
|
86
87
|
rateLimitError = exc;
|
|
87
88
|
await sleep(Math.min(RATE_LIMIT_BACKOFF_MAX_MS, RATE_LIMIT_BACKOFF_BASE_MS * 2 ** attempt));
|
|
88
89
|
continue;
|
package/src/core/local-llm.ts
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
completeSimple,
|
|
6
6
|
type FetchImpl,
|
|
7
7
|
type Model,
|
|
8
|
-
ProviderHttpError,
|
|
9
8
|
withAuth,
|
|
10
9
|
} from "@oh-my-pi/pi-ai";
|
|
10
|
+
import { ProviderHttpError } from "@oh-my-pi/pi-ai/error";
|
|
11
11
|
import { type CompleteOptions, callHostLlm, getHostLlmBackend } from "./llm-backends";
|
|
12
12
|
import {
|
|
13
13
|
getMnemopiRuntimeOptions,
|