From c6abe5c335f863a6c71d8f9c5fe5129597894225 Mon Sep 17 00:00:00 2001 From: Woody Date: Thu, 23 Apr 2026 19:02:41 +0800 Subject: [PATCH] fix(backend): add name() method to EmbeddingFunctionWrapper for ChromaDB 1.5.8 ChromaDB 1.5.8 requires embedding functions to implement the name() method from the EmbeddingFunction protocol. Without this, collection.get() fails with AttributeError. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- backend/app/core/database.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/app/core/database.py b/backend/app/core/database.py index d54f06f..1a19157 100644 --- a/backend/app/core/database.py +++ b/backend/app/core/database.py @@ -10,6 +10,9 @@ class _EmbeddingFunctionWrapper: def __init__(self, settings): self.settings = settings + def name(self) -> str: + return "custom_embedding_wrapper" + def __call__(self, input): from app.services.embedding_client import EmbeddingClient import asyncio