diff --git a/assets/wechat.jpg b/assets/wechat.jpg index e15b95293..cfc353527 100644 Binary files a/assets/wechat.jpg and b/assets/wechat.jpg differ diff --git a/dbgpt/agent/agents/expand/plugin_assistant_agent.py b/dbgpt/agent/agents/expand/plugin_assistant_agent.py index d1ad50ec0..aab0cff33 100644 --- a/dbgpt/agent/agents/expand/plugin_assistant_agent.py +++ b/dbgpt/agent/agents/expand/plugin_assistant_agent.py @@ -54,8 +54,8 @@ class PluginAssistantAgent(ConversableAgent): if item.type == ResourceType.Plugin: item_list.append(item.value) self.plugin_generator = await plugin_loader_client.a_load_plugin( - item_list, self.plugin_generator - ) + item_list, self.plugin_generator + ) def prepare_act_param(self) -> Optional[Dict]: return {"plugin_generator": self.plugin_generator} diff --git a/dbgpt/rag/knowledge/url.py b/dbgpt/rag/knowledge/url.py index aaeb74956..38670463b 100644 --- a/dbgpt/rag/knowledge/url.py +++ b/dbgpt/rag/knowledge/url.py @@ -26,7 +26,7 @@ class URLKnowledge(Knowledge): encoding(str, optional): csv encoding loader(Any, optional): loader """ - self._path = url + self._path = url or None self._type = knowledge_type self._loader = loader self._encoding = encoding @@ -39,8 +39,12 @@ class URLKnowledge(Knowledge): else: from langchain.document_loaders import WebBaseLoader - web_reader = WebBaseLoader(web_path=self._path) - documents = web_reader.load() + if self._path is not None: + web_reader = WebBaseLoader(web_path=self._path) + documents = web_reader.load() + else: + # Handle the case where self._path is None + raise ValueError("web_path cannot be None") return [Document.langchain2doc(lc_document) for lc_document in documents] @classmethod