From 832d1ada209f10a0ce474eeb2ffacb1ac4c95e66 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Tue, 18 Mar 2025 14:40:24 +0800 Subject: [PATCH] chore: mark invoke_llm as deprecated with a reference to the issue Sgned-off-by: -LAN- --- api/core/model_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/core/model_manager.py b/api/core/model_manager.py index 0d5e8a3e4b..2aef38959b 100644 --- a/api/core/model_manager.py +++ b/api/core/model_manager.py @@ -2,6 +2,8 @@ import logging from collections.abc import Callable, Generator, Iterable, Sequence from typing import IO, Any, Literal, Optional, Union, cast, overload +from typing_extensions import deprecated + from configs import dify_config from core.entities.embedding_type import EmbeddingInputType from core.entities.provider_configuration import ProviderConfiguration, ProviderModelBundle @@ -176,6 +178,7 @@ class ModelInstance: ), ) + @deprecated("invoke_llm is deprecated, see https://github.com/langgenius/dify/issues/16090") def get_llm_num_tokens( self, prompt_messages: list[PromptMessage], tools: Optional[list[PromptMessageTool]] = None ) -> int: