AAEE86 deleted the add-zhipuai-web_search branch October 21, 2024 09:03 lau-td pushed a commit to heydevs-io/dify that referenced this pull request Oct 23, 2024 add zhipuai web search (langgenius#8668) eaea9ff idonotknow pushed a commit to AceDataCloud/Dify that referenced this...
4. 联网搜索服务 (web_search) service: zhipuai.web_search data: query: "今日新闻摘要" # 必选,搜索内容 stream: false # 可选,是否使用流式响应 功能特点: 使用智谱AI的web-search-pro工具 支持实时流式响应 提供准确的搜索结果 5. 实体分析服务 (entity_analysis) service: zhipuai.entity_analysis dat...
fromlangchain_zhipuimportconvert_to_web_search_toolllm.bind(tools=[convert_to_web_search_tool(search_query="周星驰电影")]).invoke("哪部电影好看?") function 工具 fromlangchain_core.utils.function_callingimportconvert_to_openai_toolfromlangchain.toolsimporttool@tooldefsearch(query:str)->str:"""查...
search_params=kbs_config.get("milvus_kwargs")["search_params"] Expand DownExpand Up@@ -89,6 +89,14 @@ def do_delete_doc(self, kb_file: KnowledgeFile, **kwargs): ifself.milvus.col: self.milvus.col.delete(expr=f'pk in{id_list}') ...
const ( // MODEL_VERSION_4 MODEL_VERSION_4 = "glm-4" // MODEL_VERSION_3 MODEL_VERSION_3 = "glm-3-turbo" ) const ( // TOOLS_TYPE_FOR_RETRIEVAL 知识库类型 TOOLS_TYPE_FOR_RETRIEVAL = "retrieval" // TOOLS_TYPE_FOR_WEB_SEARCH 联网搜索 TOOLS_TYPE_FOR_WEB_SEARCH = "web_search" )...
from langchain_zhipu import convert_to_web_search_tool llm.bind(tools=[convert_to_web_search_tool(search_query="周星驰电影")]).invoke("哪部电影好看?") function 工具 from langchain_core.utils.function_calling import convert_to_openai_tool from langchain.tools import tool @tool def search(que...
search_params=kbs_config.get("milvus_kwargs")["search_params"] Expand DownExpand Up@@ -89,6 +89,14 @@ def do_delete_doc(self, kb_file: KnowledgeFile, **kwargs): ifself.milvus.col: self.milvus.col.delete(expr=f'pk in{id_list}') ...
search_params=kbs_config.get("milvus_kwargs")["search_params"] @@ -89,6 +89,14 @@ def do_delete_doc(self, kb_file: KnowledgeFile, **kwargs): if self.milvus.col: self.milvus.col.delete(expr=f'pk in {id_list}') # Issue 2846, for windows # if self.milvus.col: # file_path...
{ // 知识库ID KnowledgeId string `json:"knowledge_id"` // 请求模型时的知识库模板 PromptTemplate string `json:"prompt_template,omitempty"` } // WebSearch type WebSearch struct { // 是否启用搜索,默认弃用 Enable bool `json:"enable,omitempty"` // 强制搜索自定义关键内容,此时模型会根据自定义...