mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-07 22:09:57 +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": {
|
||||
"node": ">=22.12.0"
|
||||
},
|
||||
"packageManager": "pnpm@10.23.0",
|
||||
"packageManager": "pnpm@10.30.2",
|
||||
"pnpm": {
|
||||
"minimumReleaseAge": 2880,
|
||||
"overrides": {
|
||||
|
||||
@@ -117,7 +117,7 @@ export async function noteMemorySearchHealth(
|
||||
if (hasLocalEmbeddings(resolved.local)) {
|
||||
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))) {
|
||||
return;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ function hasLocalEmbeddings(local: { modelPath?: string }, useDefaultFallback =
|
||||
}
|
||||
|
||||
async function hasApiKeyForProvider(
|
||||
provider: "openai" | "gemini" | "voyage" | "mistral",
|
||||
provider: "openai" | "gemini" | "voyage" | "mistral" | "ollama",
|
||||
cfg: OpenClawConfig,
|
||||
agentDir: string,
|
||||
): Promise<boolean> {
|
||||
|
||||
@@ -11,7 +11,6 @@ describe("embeddings-ollama", () => {
|
||||
headers: { "content-type": "application/json" },
|
||||
}),
|
||||
);
|
||||
// @ts-expect-error test override
|
||||
globalThis.fetch = fetchMock;
|
||||
|
||||
const { provider } = await createOllamaEmbeddingProvider({
|
||||
|
||||
Reference in New Issue
Block a user