From 3cee9bc49514fb11e7ffae5f75c5be5e5507f8a3 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Fri, 1 Nov 2024 17:33:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=8C=85=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models_provider/impl/xf_model_provider/model/llm.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/setting/models_provider/impl/xf_model_provider/model/llm.py b/apps/setting/models_provider/impl/xf_model_provider/model/llm.py index 7c3b39d31..6380f752f 100644 --- a/apps/setting/models_provider/impl/xf_model_provider/model/llm.py +++ b/apps/setting/models_provider/impl/xf_model_provider/model/llm.py @@ -9,7 +9,7 @@ from typing import List, Optional, Any, Iterator, Dict from langchain_community.chat_models.sparkllm import \ - ChatSparkLLM, _convert_message_to_dict, _convert_delta_to_message_chunk + ChatSparkLLM, convert_message_to_dict, _convert_delta_to_message_chunk from langchain_core.callbacks import CallbackManagerForLLMRun from langchain_core.messages import BaseMessage, AIMessageChunk from langchain_core.outputs import ChatGenerationChunk @@ -56,7 +56,7 @@ class XFChatSparkLLM(MaxKBBaseModel, ChatSparkLLM): default_chunk_class = AIMessageChunk self.client.arun( - [_convert_message_to_dict(m) for m in messages], + [convert_message_to_dict(m) for m in messages], self.spark_user_id, self.model_kwargs, True, diff --git a/pyproject.toml b/pyproject.toml index a421f2888..24bbcb0ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ djangorestframework = "^3.15.2" drf-yasg = "1.21.7" django-filter = "23.2" langchain = "0.2.16" -langchain_community = "0.2.4" +langchain_community = "0.2.17" langchain-huggingface = "^0.0.3" psycopg2-binary = "2.9.7" jieba = "^0.42.1"