feat(mem0-ts): add LM Studio embedder and LLM support (#4354)

Co-authored-by: utkarsh240799 <utkarsh240799@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Utkarsh
2026-03-17 18:21:35 +05:30
committed by GitHub
co-authored by utkarsh240799 Claude Opus 4.6
parent 9eb5b9ed29
commit 336fbce60a
11 changed files with 861 additions and 6 deletions
+24 -1
View File
@@ -1,7 +1,30 @@
/// <reference types="jest" />
import { VectorStoreFactory } from "../src/utils/factory";
import {
EmbedderFactory,
VectorStoreFactory,
} from "../src/utils/factory";
import { LMStudioEmbedder } from "../src/embeddings/lmstudio";
import { AzureAISearch } from "../src/vector_stores/azure_ai_search";
describe("EmbedderFactory", () => {
describe("create", () => {
it("should create LM Studio embedder with baseURL", () => {
const embedder = EmbedderFactory.create("lmstudio", {
model: "text-embedding-gte-qwen2-1.5b-instruct",
baseURL: "http://localhost:1234/v1",
});
expect(embedder).toBeInstanceOf(LMStudioEmbedder);
});
it("should throw error for unsupported embedder provider", () => {
expect(() => {
EmbedderFactory.create("unsupported-embedder", {});
}).toThrow("Unsupported embedder provider: unsupported-embedder");
});
});
});
describe("VectorStoreFactory", () => {
describe("create", () => {
it("should create Azure AI Search vector store", () => {