mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-27 04:53:31 +00:00
fix(memory): wire Ollama into doctor and tests
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
Gustavo Madeira Santana
parent
00317343e7
commit
e4ef85e2df
@@ -255,7 +255,7 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.23.0",
|
"packageManager": "pnpm@10.30.2",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"minimumReleaseAge": 2880,
|
"minimumReleaseAge": 2880,
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export async function noteMemorySearchHealth(
|
|||||||
if (hasLocalEmbeddings(resolved.local)) {
|
if (hasLocalEmbeddings(resolved.local)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (const provider of ["openai", "gemini", "voyage", "mistral"] as const) {
|
for (const provider of ["openai", "gemini", "voyage", "mistral", "ollama"] as const) {
|
||||||
if (hasRemoteApiKey || (await hasApiKeyForProvider(provider, cfg, agentDir))) {
|
if (hasRemoteApiKey || (await hasApiKeyForProvider(provider, cfg, agentDir))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -186,7 +186,7 @@ function hasLocalEmbeddings(local: { modelPath?: string }, useDefaultFallback =
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function hasApiKeyForProvider(
|
async function hasApiKeyForProvider(
|
||||||
provider: "openai" | "gemini" | "voyage" | "mistral",
|
provider: "openai" | "gemini" | "voyage" | "mistral" | "ollama",
|
||||||
cfg: OpenClawConfig,
|
cfg: OpenClawConfig,
|
||||||
agentDir: string,
|
agentDir: string,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ describe("embeddings-ollama", () => {
|
|||||||
headers: { "content-type": "application/json" },
|
headers: { "content-type": "application/json" },
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
// @ts-expect-error test override
|
|
||||||
globalThis.fetch = fetchMock;
|
globalThis.fetch = fetchMock;
|
||||||
|
|
||||||
const { provider } = await createOllamaEmbeddingProvider({
|
const { provider } = await createOllamaEmbeddingProvider({
|
||||||
|
|||||||
Reference in New Issue
Block a user