From c22a8d1c57953cd2bf3d945709ab2eebd7f05894 Mon Sep 17 00:00:00 2001 From: WH-2099 Date: Sat, 23 May 2026 17:34:48 +0800 Subject: [PATCH] fix: correct override decorator placement --- api/core/plugin/impl/model_runtime.py | 4 ---- api/core/rag/datasource/vdb/vector_factory.py | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/core/plugin/impl/model_runtime.py b/api/core/plugin/impl/model_runtime.py index b151055e37..d555f4d965 100644 --- a/api/core/plugin/impl/model_runtime.py +++ b/api/core/plugin/impl/model_runtime.py @@ -272,7 +272,6 @@ class PluginModelRuntime(ModelRuntime): return schema @overload - @override def invoke_llm( self, *, @@ -287,7 +286,6 @@ class PluginModelRuntime(ModelRuntime): ) -> LLMResult: ... @overload - @override def invoke_llm( self, *, @@ -338,7 +336,6 @@ class PluginModelRuntime(ModelRuntime): ) @overload - @override def invoke_llm_with_structured_output( self, *, @@ -353,7 +350,6 @@ class PluginModelRuntime(ModelRuntime): ) -> LLMResultWithStructuredOutput: ... @overload - @override def invoke_llm_with_structured_output( self, *, diff --git a/api/core/rag/datasource/vdb/vector_factory.py b/api/core/rag/datasource/vdb/vector_factory.py index a132571dcc..cd73bb9b1a 100644 --- a/api/core/rag/datasource/vdb/vector_factory.py +++ b/api/core/rag/datasource/vdb/vector_factory.py @@ -88,9 +88,11 @@ class _LazyEmbeddings(Embeddings): def embed_multimodal_query(self, multimodel_document: dict[str, Any]) -> list[float]: return self._ensure().embed_multimodal_query(multimodel_document) + @override async def aembed_documents(self, texts: list[str]) -> list[list[float]]: return await self._ensure().aembed_documents(texts) + @override async def aembed_query(self, text: str) -> list[float]: return await self._ensure().aembed_query(text)