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:
parent
f21085b3df
commit
c6abe5c335
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue