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 <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Woody 2026-04-23 19:02:41 +08:00
parent f21085b3df
commit c6abe5c335
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,9 @@ class _EmbeddingFunctionWrapper:
def __init__(self, settings): def __init__(self, settings):
self.settings = settings self.settings = settings
def name(self) -> str:
return "custom_embedding_wrapper"
def __call__(self, input): def __call__(self, input):
from app.services.embedding_client import EmbeddingClient from app.services.embedding_client import EmbeddingClient
import asyncio import asyncio