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:
co-authored by
utkarsh240799
Claude Opus 4.6
parent
9eb5b9ed29
commit
336fbce60a
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user