From 9b694d3c21692ea8f95ea72c3e6adc4b80634b03 Mon Sep 17 00:00:00 2001 From: weizjajj Date: Mon, 9 Sep 2024 11:36:25 +0800 Subject: [PATCH] fix as langchain --- agentuniverse/llm/llm.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agentuniverse/llm/llm.py b/agentuniverse/llm/llm.py index 680832bf..8bd038e4 100644 --- a/agentuniverse/llm/llm.py +++ b/agentuniverse/llm/llm.py @@ -159,9 +159,7 @@ def as_langchain_runnable(self, params=None) -> Runnable: """Get the langchain llm class.""" if params is None: params = {} - if self.langchain_instance is None: - self.langchain_instance = self.as_langchain() - return self.langchain_instance.bind(**params) + return self.as_langchain().bind(**params) @trace_llm def call(self, *args: Any, **kwargs: Any):