From 95a7a47d0f98bc452c4c08e7990ca40610cb2986 Mon Sep 17 00:00:00 2001 From: yuehuazhang Date: Thu, 5 Dec 2024 23:19:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feature:=E4=BA=92=E8=81=94=E7=BD=91?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-build.yaml | 2 +- .../server/agent/tools_factory/__init__.py | 1 + .../tools_factory/batch_search_internet.py | 169 ++++++++++++++++++ .../agent/tools_factory/search_internet.py | 12 -- chatchat-server/chatchat/settings.py | 4 + chatchat-server/chatchat/utils.py | 169 ------------------ .../chatchat/webui_pages/graph_agent/graph.py | 11 +- chatchat-server/poetry.lock | 146 +++++++-------- 8 files changed, 257 insertions(+), 257 deletions(-) create mode 100644 chatchat-server/chatchat/server/agent/tools_factory/batch_search_internet.py diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 90ea855..b7c4ccf 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -2,7 +2,7 @@ name: docker-build on: push: branches: - - master +# - master paths-ignore: - 'README.md' - 'README_en.md' diff --git a/chatchat-server/chatchat/server/agent/tools_factory/__init__.py b/chatchat-server/chatchat/server/agent/tools_factory/__init__.py index 6b94e87..f2610d0 100644 --- a/chatchat-server/chatchat/server/agent/tools_factory/__init__.py +++ b/chatchat-server/chatchat/server/agent/tools_factory/__init__.py @@ -1,6 +1,7 @@ from .arxiv import arxiv from .calculate import calculate from .search_internet import search_internet +from .batch_search_internet import serperV2 from .search_local_knowledgebase import search_local_knowledgebase from .search_youtube import search_youtube # from .shell import shell diff --git a/chatchat-server/chatchat/server/agent/tools_factory/batch_search_internet.py b/chatchat-server/chatchat/server/agent/tools_factory/batch_search_internet.py new file mode 100644 index 0000000..585ca71 --- /dev/null +++ b/chatchat-server/chatchat/server/agent/tools_factory/batch_search_internet.py @@ -0,0 +1,169 @@ +import aiohttp +import asyncio +import re +import hashlib + +from pydantic import Field + +from langchain.docstore.document import Document +from langchain_text_splitters import RecursiveCharacterTextSplitter + +from chatchat.server.agent.tools_factory.tools_registry import regist_tool +from chatchat.server.utils import get_tool_config + + +async def get_search_results(params): + try: + config = get_tool_config("search_internet")["search_engine_config"]["google"] + url = config["google_search_url"] + params["api_key"] = config["google_key"] + + async with aiohttp.ClientSession() as session: + async with session.get(url, params=params) as response: + data = await response.json() + items = data.get("organic", []) + results = [] + for item in items: + item["uuid"] = hashlib.md5(item["link"].encode()).hexdigest() + item["score"] = 0.00 + results.append(item) + return results + except Exception as e: + print("get search result failed: ", e) + raise e + + +async def search(query, num=2, locale=''): + params = { + "q": query, + "gl": "cn", + "num": num, + "hl": "zh-cn" + } + if locale: + params["hl"] = locale + + try: + search_results = await get_search_results(params=params) + return search_results + except Exception as e: + print(f"search failed: {e}") + raise e + + +async def fetch_url(session, url): + try: + async with session.get(url, ssl=False) as response: + response.raise_for_stauts() + response.encoding = 'utf-8' + html = await response.text() + return html + except Exception as e: + print(f"请求URL失败 {url} : {e}") + return "" + + +async def html_to_markdown(html): + from html2text import HTML2Text + try: + converter = HTML2Text() + converter.ignore_links = True + converter.ignore_images = True + markdown = converter.handle(html) + return markdown + except Exception as e: + print(f"HTML 转换为 Md失败:{e}") + return "" + + +async def fetch_markdown(session, url): + try: + html = await fetch_url(session, url) + markdown = await html_to_markdown(html) + + markdown = re.sub(r'\n{3,}', '\n\n', markdown) + return url, markdown + + except Exception as e: + print(f"获取Md 失败 {url} : {e}") + return url, "" + + +def md5(data: str): + _md5 = hashlib.md5() + _md5.update(data.encode('utf-8')) + _hash = _md5.hexdigest() + + return _hash + + +async def batch_fetch_urls(urls): + try: + timeout = aiohttp.ClientTimeout(total=10, connect=-1) + async with aiohttp.ClientSession(timeout=timeout) as session: + tasks = [fetch_markdown(session, url) for url in urls] + results = await asyncio.gather(*tasks, return_exceptions=True) + final_results = [] + for result in results: + if isinstance(result, asyncio.TimeoutError): + continue + elif isinstance(result, Exception): + pass + else: + final_results.append(result) + return final_results + except Exception as e: + print(f"批量获取url失败: {e}") + return [] + + +async def fetch_details(search_results): + urls = [document.metadata['link'] for document in search_results if 'link' in document.metadata] + try: + details = await batch_fetch_urls(urls) + except Exception as e: + raise e + + content_maps = {url: content for url, content in details} + + for document in search_results: + link = document.metadata['link'] + if link in content_maps: + document.page_content = content_maps[link] + + text_splitter = RecursiveCharacterTextSplitter(chunk_size=700, chunk_overlap=100) + chunks = text_splitter.split_documents(search_results) + return chunks + + +def build_document(search_result): + documents = [] + for result in search_result: + if 'uuid' in result: + uuid = result['uuid'] + else: + uuid = md5(result['link']) + text = result['snippet'] + + document = Document( + page_content=text, + metadata={ + "uuid": uuid, + "title": result["title"], + "snippet": result["snippet"], + "link": result["link"] + }, + ) + documents.append(document) + return documents + + +@regist_tool(title="互联网批量搜索") +async def serperV2(query: str = Field(description="The search query title")): + """ + useful for when you need to search the internet for information + translate user question to serperV2 Required questions that can be evaluated by serperV2 + """ + response = await search(query) + result = await fetch_details(build_document(response)) + return result diff --git a/chatchat-server/chatchat/server/agent/tools_factory/search_internet.py b/chatchat-server/chatchat/server/agent/tools_factory/search_internet.py index ed0a2a3..ed8a99b 100644 --- a/chatchat-server/chatchat/server/agent/tools_factory/search_internet.py +++ b/chatchat-server/chatchat/server/agent/tools_factory/search_internet.py @@ -4,7 +4,6 @@ from chatchat.settings import Settings from chatchat.server.utils import get_tool_config -from chatchat.server.utils import search, fetch_details, build_document from .tools_registry import BaseToolOutput, regist_tool @@ -123,14 +122,3 @@ def search_engine(query: str, top_k: int = 0, engine_name: str = "", config: dic def search_internet(query: str = Field(description="query for Internet search")): """Use this tool to use bing search engine to search the internet and get information.""" return BaseToolOutput(search_engine(query=query)) - - -@registry_tool(title="联网查询") -async def serperV2(query: str = Field(description="The search query title")): - """ - useful for when you need to search the internet for information - translate user question to serperV2 Required questions that can be evaluated by serperV2 - """ - response = await search(query) - result = await fetch_details(build_document(response)) - return result diff --git a/chatchat-server/chatchat/settings.py b/chatchat-server/chatchat/settings.py index 334b7b9..c7b7cfa 100644 --- a/chatchat-server/chatchat/settings.py +++ b/chatchat-server/chatchat/settings.py @@ -576,6 +576,10 @@ class ToolSettings(BaseFileSettings): "chunk_size": 500, "chunk_overlap": 0, }, + "google": { + "google_search_url": "https://google.serper.dev/search", + "google_key": "", + } }, "top_k": 5, "verbose": "Origin", diff --git a/chatchat-server/chatchat/utils.py b/chatchat-server/chatchat/utils.py index b6ece13..38df0ac 100644 --- a/chatchat-server/chatchat/utils.py +++ b/chatchat-server/chatchat/utils.py @@ -9,30 +9,6 @@ from chatchat.settings import Settings -from typing import ( - Union, - Tuple, - Dict, - List, - Callable, - Generator, - Any, - Awaitable -) -import aiohttp -import asyncio -import base64 -import json -import re -import httpx -import urllib.parse -from html2text import HTML2Text -import hashlib -import requests -from concurrent.futures import ThreadPoolExecutor, as_completed -from langchain.docstore.document import Document -from langchain_text_splitters import RecursiveCharacterTextSplitter - def _filter_logs(record: dict) -> bool: # hide debug logs if Settings.basic_settings.log_verbose=False if record["level"].no <= 10 and not Settings.basic_settings.log_verbose: @@ -155,148 +131,3 @@ def get_config_dict( def get_timestamp_ms(): t = time.time() return int(round(t * 1000)) - - -async def get_search_results(params): - try: - url = "https://google.serper.dev/search" - params["api_key"] = "e3d6ad661787a7318e1ccb5ed2ebdc431ce7b5c5" - - async with aiohttp.ClientSession() as session: - async with session.get(url, params=params) as response: - data = await response.json() - items = data.get("organic", []) - results = [] - for item in items: - item["uuid"] = hashlib.md5(item["link"].encode()).hexdigest() - item["score"] = 0.00 - results.append(item) - return results - except Exception as e: - print("get search result failed: ", e) - raise e - - -async def search(query, num=2, locale=''): - params = { - "q": query, - "gl": "cn", - "num": num, - "hl": "zh-cn" - } - if locale: - params["hl"] = locale - - try: - search_results = await get_search_results(params=params) - return search_results - except Exception as e: - print(f"search failed: {e}") - raise e - - -async def fetch_url(session, url): - try: - async with session.get(url, ssl=False) as response: - response.raise_for_stauts() - response.encoding = 'utf-8' - html = await response.text() - return html - except Exception as e: - print(f"请求URL失败 {url} : {e}") - return "" - - - -async def html_to_markdown(html): - try: - converter = HTML2Text() - converter.ignore_links = True - converter.ignore_images = True - markdown = converter.handle(html) - return markdown - except Exception as e: - print(f"HTML 转换为 Md失败:{e}") - return "" - - -async def fetch_markdown(session, url): - try: - html = await fetch_url(session, url) - markdown = await html_to_markdown(html) - - markdown = re.sub(r'\n{3,}', '\n\n', markdown) - return url, markdown - - except Exception as e: - print(f"获取Md 失败 {url} : {e}") - return url, "" - - -async def batch_fetch_urls(urls): - try: - timeout = aiohttp.ClientTimeout(total=10, connect=-1) - async with aiohttp.ClientSession(timeout=timeout) as session: - tasks = [fetch_markdown(session, url) for url in urls] - results = await asyncio.gather(*tasks, return_exceptions=True) - final_results = [] - for result in results: - if isinstance(result, asyncio.TimeoutError): - continue - elif isinstance(result, Exception): - pass - else: - final_results.append(result) - return final_results - except Exception as e: - print(f"批量获取url失败: {e}") - return [] - - -async def fetch_details(search_results): - urls = [document.metadata['link'] for document in search_results if 'link' in document.metadata] - try: - details = await batch_fetch_urls(urls) - except Exception as e: - raise e - - content_maps = {url: content for url, content in details} - - for document in search_results: - link = document.metadata['link'] - if link in content_maps: - document.page_content = content_maps[link] - - text_splitter = RecursiveCharacterTextSplitter(chunk_size=700, chunk_overlap=100) - chunks = text_splitter.split_documents(search_results) - return chunks - - -def md5(data: str): - _md5 = hashlib.md5() - _md5.update(data.encode('utf-8')) - _hash = _md5.hexdigest() - - return _hash - - -def build_document(search_result): - documents = [] - for result in search_result: - if 'uuid' in result: - uuid = result['uuid'] - else: - uuid = md5(result['link']) - text = result['snippet'] - - document = Document( - page_content=text, - metadata={ - "uuid": uuid, - "title": result["title"], - "snippet": result["snippet"], - "link": result["link"] - }, - ) - documents.append(document) - return documents diff --git a/chatchat-server/chatchat/webui_pages/graph_agent/graph.py b/chatchat-server/chatchat/webui_pages/graph_agent/graph.py index 2dde22e..73bcea1 100644 --- a/chatchat-server/chatchat/webui_pages/graph_agent/graph.py +++ b/chatchat-server/chatchat/webui_pages/graph_agent/graph.py @@ -243,7 +243,6 @@ async def graph_agent_page(): ) tools_list = list_tools() - # tool_names = ["None"] + list(tools_list) if selected_graph == "数据库查询机器人[Beta]": selected_tools = st.multiselect( label="选择工具", @@ -253,6 +252,15 @@ async def graph_agent_page(): default="query_sql_data", help="仅可选择 SQL查询工具" ) + elif selected_graph == "自我反思机器人[Beta]": + selected_tools = st.multiselect( + label="选择工具", + options=list(tools_list), + format_func=lambda x: tools_list[x]["title"], + key="selected_tools", + default="search_internet", + help="支持多选" + ) else: # selected_tools demo: ['search_internet', 'search_youtube'] selected_tools = st.multiselect( @@ -260,7 +268,6 @@ async def graph_agent_page(): options=list(tools_list), format_func=lambda x: tools_list[x]["title"], key="selected_tools", - default="search_internet", help="支持多选" ) diff --git a/chatchat-server/poetry.lock b/chatchat-server/poetry.lock index fa24228..8cbdb17 100644 --- a/chatchat-server/poetry.lock +++ b/chatchat-server/poetry.lock @@ -1416,61 +1416,61 @@ files = [ [[package]] name = "fonttools" -version = "4.55.1" +version = "4.55.2" description = "Tools to manipulate font files" optional = false python-versions = ">=3.8" files = [ - {file = "fonttools-4.55.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c17a6f9814f83772cd6d9c9009928e1afa4ab66210a31ced721556651075a9a0"}, - {file = "fonttools-4.55.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c4d14eecc814826a01db87a40af3407c892ba49996bc6e49961e386cd78b537c"}, - {file = "fonttools-4.55.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8589f9a15dc005592b94ecdc45b4dfae9bbe9e73542e89af5a5e776e745db83b"}, - {file = "fonttools-4.55.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfee95bd9395bcd9e6c78955387554335109b6a613db71ef006020b42f761c58"}, - {file = "fonttools-4.55.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:34fa2ecc0bf1923d1a51bf2216a006de2c3c0db02c6aa1470ea50b62b8619bd5"}, - {file = "fonttools-4.55.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:9c1c48483148bfb1b9ad951133ceea957faa004f6cb475b67e7bc75d482b48f8"}, - {file = "fonttools-4.55.1-cp310-cp310-win32.whl", hash = "sha256:3e2fc388ca7d023b3c45badd71016fd4185f93e51a22cfe4bd65378af7fba759"}, - {file = "fonttools-4.55.1-cp310-cp310-win_amd64.whl", hash = "sha256:c4c36c71f69d2b3ee30394b0986e5f8b2c461e7eff48dde49b08a90ded9fcdbd"}, - {file = "fonttools-4.55.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5daab3a55d460577f45bb8f5a8eca01fa6cde43ef2ab943b527991f54b735c41"}, - {file = "fonttools-4.55.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:acf1e80cf96c2fbc79e46f669d8713a9a79faaebcc68e31a9fbe600cf8027992"}, - {file = "fonttools-4.55.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e88a0329f7f88a210f09f79c088fb64f8032fc3ab65e2390a40b7d3a11773026"}, - {file = "fonttools-4.55.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03105b42259a8a94b2f0cbf1bee45f7a8a34e7b26c946a8fb89b4967e44091a8"}, - {file = "fonttools-4.55.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9af3577e821649879ab5774ad0e060af34816af556c77c6d3820345d12bf415e"}, - {file = "fonttools-4.55.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:34bd5de3d0ad085359b79a96575cd6bd1bc2976320ef24a2aa152ead36dbf656"}, - {file = "fonttools-4.55.1-cp311-cp311-win32.whl", hash = "sha256:5da92c4b637f0155a41f345fa81143c8e17425260fcb21521cb2ad4d2cea2a95"}, - {file = "fonttools-4.55.1-cp311-cp311-win_amd64.whl", hash = "sha256:f70234253d15f844e6da1178f019a931f03181463ce0c7b19648b8c370527b07"}, - {file = "fonttools-4.55.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9c372e527d58ba64b695f15f8014e97bc8826cf64d3380fc89b4196edd3c0fa8"}, - {file = "fonttools-4.55.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:845a967d3bef3245ba81fb5582dc731f6c2c8417fa211f1068c56893504bc000"}, - {file = "fonttools-4.55.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f03be82bcd4ba4418adf10e6165743f824bb09d6594c2743d7f93ea50968805b"}, - {file = "fonttools-4.55.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c42e935cf146f826f556d977660dac88f2fa3fb2efa27d5636c0b89a60c16edf"}, - {file = "fonttools-4.55.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:96328bf91e05621d8e40d9f854af7a262cb0e8313e9b38e7f3a7f3c4c0caaa8b"}, - {file = "fonttools-4.55.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:291acec4d774e8cd2d8472d88c04643a77a3324a15247951bd6cfc969799b69e"}, - {file = "fonttools-4.55.1-cp312-cp312-win32.whl", hash = "sha256:6d768d6632809aec1c3fa8f195b173386d85602334701a6894a601a4d3c80368"}, - {file = "fonttools-4.55.1-cp312-cp312-win_amd64.whl", hash = "sha256:2a3850afdb0be1f79a1e95340a2059226511675c5b68098d4e49bfbeb48a8aab"}, - {file = "fonttools-4.55.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:0c88d427eaf8bd8497b9051f56e0f5f9fb96a311aa7c72cda35e03e18d59cd16"}, - {file = "fonttools-4.55.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f062c95a725a79fd908fe8407b6ad63e230e1c7d6dece2d5d6ecaf843d6927f6"}, - {file = "fonttools-4.55.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f298c5324c45cad073475146bf560f4110ce2dc2488ff12231a343ec489f77bc"}, - {file = "fonttools-4.55.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f06dbb71344ffd85a6cb7e27970a178952f0bdd8d319ed938e64ba4bcc41700"}, - {file = "fonttools-4.55.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4c46b3525166976f5855b1f039b02433dc51eb635fb54d6a111e0c5d6e6cdc4c"}, - {file = "fonttools-4.55.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:af46f52a21e086a2f89b87bd941c9f0f91e5f769e1a5eb3b37c912228814d3e5"}, - {file = "fonttools-4.55.1-cp313-cp313-win32.whl", hash = "sha256:cd7f36335c5725a3fd724cc667c10c3f5254e779bdc5bffefebb33cf5a75ecb1"}, - {file = "fonttools-4.55.1-cp313-cp313-win_amd64.whl", hash = "sha256:5d6394897710ccac7f74df48492d7f02b9586ff0588c66a2c218844e90534b22"}, - {file = "fonttools-4.55.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:52c4f4b383c56e1a4fe8dab1b63c2269ba9eab0695d2d8e033fa037e61e6f1ef"}, - {file = "fonttools-4.55.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d83892dafdbd62b56545c77b6bd4fa49eef6ec1d6b95e042ee2c930503d1831e"}, - {file = "fonttools-4.55.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:604d5bf16f811fcaaaec2dde139f7ce958462487565edcd54b6fadacb2942083"}, - {file = "fonttools-4.55.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3324b92feb5fd084923a8e89a8248afd5b9f9d81ab9517d7b07cc84403bd448"}, - {file = "fonttools-4.55.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:30f8b1ca9b919c04850678d026fc330c19acaa9e3b282fcacc09a5eb3c8d20c3"}, - {file = "fonttools-4.55.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:1835c98df2cf28c86a66d234895c87df7b9325fd079a8019c5053a389ff55d23"}, - {file = "fonttools-4.55.1-cp38-cp38-win32.whl", hash = "sha256:9f202703720a7cc0049f2ed1a2047925e264384eb5cc4d34f80200d7b17f1b6a"}, - {file = "fonttools-4.55.1-cp38-cp38-win_amd64.whl", hash = "sha256:2efff20aed0338d37c2ff58766bd67f4b9607ded61cf3d6baf1b3e25ea74e119"}, - {file = "fonttools-4.55.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3032d9bf010c395e6eca2851666cafb1f4ecde85d420188555e928ad0144326e"}, - {file = "fonttools-4.55.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0794055588c30ffe25426048e8a7c0a5271942727cd61fc939391e37f4d580d5"}, - {file = "fonttools-4.55.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13ba980e3ffd3206b8c63a365f90dc10eeec27da946d5ee5373c3a325a46d77c"}, - {file = "fonttools-4.55.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d7063babd7434a17a5e355e87de9b2306c85a5c19c7da0794be15c58aab0c39"}, - {file = "fonttools-4.55.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ed84c15144015a58ef550dd6312884c9fb31a2dbc31a6467bcdafd63be7db476"}, - {file = "fonttools-4.55.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e89419d88b0bbfdb55209e03a17afa2d20db3c2fa0d785543c9d0875668195d5"}, - {file = "fonttools-4.55.1-cp39-cp39-win32.whl", hash = "sha256:6eb781e401b93cda99356bc043ababead2a5096550984d8a4ecf3d5c9f859dc2"}, - {file = "fonttools-4.55.1-cp39-cp39-win_amd64.whl", hash = "sha256:db1031acf04523c5a51c3e1ae19c21a1c32bc5f820a477dd4659a02f9cb82002"}, - {file = "fonttools-4.55.1-py3-none-any.whl", hash = "sha256:4bcfb11f90f48b48c366dd638d773a52fca0d1b9e056dc01df766bf5835baa08"}, - {file = "fonttools-4.55.1.tar.gz", hash = "sha256:85bb2e985718b0df96afc659abfe194c171726054314b019dbbfed31581673c7"}, + {file = "fonttools-4.55.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:bef0f8603834643b1a6419d57902f18e7d950ec1a998fb70410635c598dc1a1e"}, + {file = "fonttools-4.55.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:944228b86d472612d3b48bcc83b31c25c2271e63fdc74539adfcfa7a96d487fb"}, + {file = "fonttools-4.55.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f0e55f5da594b85f269cfbecd2f6bd3e07d0abba68870bc3f34854de4fa4678"}, + {file = "fonttools-4.55.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5b1a6e576db0c83c1b91925bf1363478c4bb968dbe8433147332fb5782ce6190"}, + {file = "fonttools-4.55.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:616368b15716781bc84df5c2191dc0540137aaef56c2771eb4b89b90933f347a"}, + {file = "fonttools-4.55.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7bbae4f3915225c2c37670da68e2bf18a21206060ad31dfb95fec91ef641caa7"}, + {file = "fonttools-4.55.2-cp310-cp310-win32.whl", hash = "sha256:8b02b10648d69d67a7eb055f4d3eedf4a85deb22fb7a19fbd9acbae7c7538199"}, + {file = "fonttools-4.55.2-cp310-cp310-win_amd64.whl", hash = "sha256:bbea0ab841113ac8e8edde067e099b7288ffc6ac2dded538b131c2c0595d5f77"}, + {file = "fonttools-4.55.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d34525e8141286fa976e14806639d32294bfb38d28bbdb5f6be9f46a1cd695a6"}, + {file = "fonttools-4.55.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0ecd1c2b1c2ec46bb73685bc5473c72e16ed0930ef79bc2919ccadc43a99fb16"}, + {file = "fonttools-4.55.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9008438ad59e5a8e403a62fbefef2b2ff377eb3857d90a3f2a5f4d674ff441b2"}, + {file = "fonttools-4.55.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:131591ac8d7a47043aaf29581aba755ae151d46e49d2bf49608601efd71e8b4d"}, + {file = "fonttools-4.55.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4c83381c3e3e3d9caa25527c4300543578341f21aae89e4fbbb4debdda8d82a2"}, + {file = "fonttools-4.55.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:42aca564b575252fd9954ed0d91d97a24de24289a16ce8ff74ed0bdf5ecebf11"}, + {file = "fonttools-4.55.2-cp311-cp311-win32.whl", hash = "sha256:c6457f650ebe15baa17fc06e256227f0a47f46f80f27ec5a0b00160de8dc2c13"}, + {file = "fonttools-4.55.2-cp311-cp311-win_amd64.whl", hash = "sha256:5cfa67414d7414442a5635ff634384101c54f53bb7b0e04aa6a61b013fcce194"}, + {file = "fonttools-4.55.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:18f082445b8fe5e91c53e6184f4c1c73f3f965c8bcc614c6cd6effd573ce6c1a"}, + {file = "fonttools-4.55.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:27c0f91adbbd706e8acd1db73e3e510118e62d0ffb651864567dccc5b2339f90"}, + {file = "fonttools-4.55.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d8ccce035320d63dba0c35f52499322f5531dbe85bba1514c7cea26297e4c54"}, + {file = "fonttools-4.55.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96e126df9615df214ec7f04bebcf60076297fbc10b75c777ce58b702d7708ffb"}, + {file = "fonttools-4.55.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:508ebb42956a7a931c4092dfa2d9b4ffd4f94cea09b8211199090d2bd082506b"}, + {file = "fonttools-4.55.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c1b9de46ef7b683d50400abf9f1578eaceee271ff51c36bf4b7366f2be29f498"}, + {file = "fonttools-4.55.2-cp312-cp312-win32.whl", hash = "sha256:2df61d9fc15199cc86dad29f64dd686874a3a52dda0c2d8597d21f509f95c332"}, + {file = "fonttools-4.55.2-cp312-cp312-win_amd64.whl", hash = "sha256:d337ec087da8216a828574aa0525d869df0a2ac217a2efc1890974ddd1fbc5b9"}, + {file = "fonttools-4.55.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:10aff204e2edee1d312fa595c06f201adf8d528a3b659cfb34cd47eceaaa6a26"}, + {file = "fonttools-4.55.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:09fe922a3eff181fd07dd724cdb441fb6b9fc355fd1c0f1aa79aca60faf1fbdd"}, + {file = "fonttools-4.55.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:487e1e8b524143a799bda0169c48b44a23a6027c1bb1957d5a172a7d3a1dd704"}, + {file = "fonttools-4.55.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b1726872e09268bbedb14dc02e58b7ea31ecdd1204c6073eda4911746b44797"}, + {file = "fonttools-4.55.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6fc88cfb58b0cd7b48718c3e61dd0d0a3ee8e2c86b973342967ce09fbf1db6d4"}, + {file = "fonttools-4.55.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e857fe1859901ad8c5cab32e0eebc920adb09f413d2d73b74b677cf47b28590c"}, + {file = "fonttools-4.55.2-cp313-cp313-win32.whl", hash = "sha256:81ccd2b3a420b8050c7d9db3be0555d71662973b3ef2a1d921a2880b58957db8"}, + {file = "fonttools-4.55.2-cp313-cp313-win_amd64.whl", hash = "sha256:d559eb1744c7dcfa90ae60cb1a4b3595e898e48f4198738c321468c01180cd83"}, + {file = "fonttools-4.55.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6b5917ef79cac8300b88fd6113003fd01bbbbea2ea060a27b95d8f77cb4c65c2"}, + {file = "fonttools-4.55.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:663eba5615d6abaaf616432354eb7ce951d518e43404371bcc2b0694ef21e8d6"}, + {file = "fonttools-4.55.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:803d5cef5fc47f44f5084d154aa3d6f069bb1b60e32390c225f897fa19b0f939"}, + {file = "fonttools-4.55.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8bc5f100de0173cc39102c0399bd6c3bd544bbdf224957933f10ee442d43cddd"}, + {file = "fonttools-4.55.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3d9bbc1e380fdaf04ad9eabd8e3e6a4301eaf3487940893e9fd98537ea2e283b"}, + {file = "fonttools-4.55.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:42a9afedff07b6f75aa0f39b5e49922ac764580ef3efce035ca30284b2ee65c8"}, + {file = "fonttools-4.55.2-cp38-cp38-win32.whl", hash = "sha256:f1c76f423f1a241df08f87614364dff6e0b7ce23c962c1b74bd995ec7c0dad13"}, + {file = "fonttools-4.55.2-cp38-cp38-win_amd64.whl", hash = "sha256:25062b6ca03464dd5179fc2040fb19e03391b7cc49b9cc4f879312e638605c5c"}, + {file = "fonttools-4.55.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d1100d8e665fe386a79cab59446992de881ea74d0d6c191bb988642692aa2421"}, + {file = "fonttools-4.55.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dbdc251c5e472e5ae6bc816f9b82718b8e93ff7992e7331d6cf3562b96aa268e"}, + {file = "fonttools-4.55.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0bf24d2b02dbc9376d795a63062632ff73e3e9e60c0229373f500aed7e86dd7"}, + {file = "fonttools-4.55.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4ff250ed4ff05015dfd9cf2adf7570c7a383ca80f4d9732ac484a5ed0d8453c"}, + {file = "fonttools-4.55.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:44cf2a98aa661dbdeb8c03f5e405b074e2935196780bb729888639f5276067d9"}, + {file = "fonttools-4.55.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22ef222740eb89d189bf0612eb98fbae592c61d7efeac51bfbc2a1592d469557"}, + {file = "fonttools-4.55.2-cp39-cp39-win32.whl", hash = "sha256:93f439ca27e55f585e7aaa04a74990acd983b5f2245e41d6b79f0a8b44e684d8"}, + {file = "fonttools-4.55.2-cp39-cp39-win_amd64.whl", hash = "sha256:627cf10d6f5af5bec6324c18a2670f134c29e1b7dce3fb62e8ef88baa6cba7a9"}, + {file = "fonttools-4.55.2-py3-none-any.whl", hash = "sha256:8e2d89fbe9b08d96e22c7a81ec04a4e8d8439c31223e2dc6f2f9fc8ff14bdf9f"}, + {file = "fonttools-4.55.2.tar.gz", hash = "sha256:45947e7b3f9673f91df125d375eb57b9a23f2a603f438a1aebf3171bffa7a205"}, ] [package.extras] @@ -2918,13 +2918,13 @@ langgraph-checkpoint = ">=2.0.2,<3.0.0" [[package]] name = "langgraph-sdk" -version = "0.1.42" +version = "0.1.43" description = "SDK for interacting with LangGraph API" optional = false python-versions = "<4.0.0,>=3.9.0" files = [ - {file = "langgraph_sdk-0.1.42-py3-none-any.whl", hash = "sha256:9e53133a417d525dd4a39ecc0c4704fa6845efce5d2a23995ad01988c8bb11a5"}, - {file = "langgraph_sdk-0.1.42.tar.gz", hash = "sha256:b927d2271dc526a80983a89bbde303729d82ad810c64b2105ea9113203de1166"}, + {file = "langgraph_sdk-0.1.43-py3-none-any.whl", hash = "sha256:b299dd091a7547dba0ffd041ccacadd1caeb57e0c52f2ccf80de64eac45f6e7a"}, + {file = "langgraph_sdk-0.1.43.tar.gz", hash = "sha256:3df9c1bc946dcaf0e3e4453e51509166495e2ce1dcd2273426e22ff9317e64f5"}, ] [package.dependencies] @@ -4512,22 +4512,22 @@ files = [ [[package]] name = "protobuf" -version = "5.29.0" +version = "5.29.1" description = "" optional = false python-versions = ">=3.8" files = [ - {file = "protobuf-5.29.0-cp310-abi3-win32.whl", hash = "sha256:ea7fb379b257911c8c020688d455e8f74efd2f734b72dc1ea4b4d7e9fd1326f2"}, - {file = "protobuf-5.29.0-cp310-abi3-win_amd64.whl", hash = "sha256:34a90cf30c908f47f40ebea7811f743d360e202b6f10d40c02529ebd84afc069"}, - {file = "protobuf-5.29.0-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:c931c61d0cc143a2e756b1e7f8197a508de5365efd40f83c907a9febf36e6b43"}, - {file = "protobuf-5.29.0-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:85286a47caf63b34fa92fdc1fd98b649a8895db595cfa746c5286eeae890a0b1"}, - {file = "protobuf-5.29.0-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:0d10091d6d03537c3f902279fcf11e95372bdd36a79556311da0487455791b20"}, - {file = "protobuf-5.29.0-cp38-cp38-win32.whl", hash = "sha256:0cd67a1e5c2d88930aa767f702773b2d054e29957432d7c6a18f8be02a07719a"}, - {file = "protobuf-5.29.0-cp38-cp38-win_amd64.whl", hash = "sha256:e467f81fdd12ded9655cea3e9b83dc319d93b394ce810b556fb0f421d8613e86"}, - {file = "protobuf-5.29.0-cp39-cp39-win32.whl", hash = "sha256:17d128eebbd5d8aee80300aed7a43a48a25170af3337f6f1333d1fac2c6839ac"}, - {file = "protobuf-5.29.0-cp39-cp39-win_amd64.whl", hash = "sha256:6c3009e22717c6cc9e6594bb11ef9f15f669b19957ad4087214d69e08a213368"}, - {file = "protobuf-5.29.0-py3-none-any.whl", hash = "sha256:88c4af76a73183e21061881360240c0cdd3c39d263b4e8fb570aaf83348d608f"}, - {file = "protobuf-5.29.0.tar.gz", hash = "sha256:445a0c02483869ed8513a585d80020d012c6dc60075f96fa0563a724987b1001"}, + {file = "protobuf-5.29.1-cp310-abi3-win32.whl", hash = "sha256:22c1f539024241ee545cbcb00ee160ad1877975690b16656ff87dde107b5f110"}, + {file = "protobuf-5.29.1-cp310-abi3-win_amd64.whl", hash = "sha256:1fc55267f086dd4050d18ef839d7bd69300d0d08c2a53ca7df3920cc271a3c34"}, + {file = "protobuf-5.29.1-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:d473655e29c0c4bbf8b69e9a8fb54645bc289dead6d753b952e7aa660254ae18"}, + {file = "protobuf-5.29.1-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:b5ba1d0e4c8a40ae0496d0e2ecfdbb82e1776928a205106d14ad6985a09ec155"}, + {file = "protobuf-5.29.1-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:8ee1461b3af56145aca2800e6a3e2f928108c749ba8feccc6f5dd0062c410c0d"}, + {file = "protobuf-5.29.1-cp38-cp38-win32.whl", hash = "sha256:50879eb0eb1246e3a5eabbbe566b44b10348939b7cc1b267567e8c3d07213853"}, + {file = "protobuf-5.29.1-cp38-cp38-win_amd64.whl", hash = "sha256:027fbcc48cea65a6b17028510fdd054147057fa78f4772eb547b9274e5219331"}, + {file = "protobuf-5.29.1-cp39-cp39-win32.whl", hash = "sha256:5a41deccfa5e745cef5c65a560c76ec0ed8e70908a67cc8f4da5fce588b50d57"}, + {file = "protobuf-5.29.1-cp39-cp39-win_amd64.whl", hash = "sha256:012ce28d862ff417fd629285aca5d9772807f15ceb1a0dbd15b88f58c776c98c"}, + {file = "protobuf-5.29.1-py3-none-any.whl", hash = "sha256:32600ddb9c2a53dedc25b8581ea0f1fd8ea04956373c0c07577ce58d312522e0"}, + {file = "protobuf-5.29.1.tar.gz", hash = "sha256:683be02ca21a6ffe80db6dd02c0b5b2892322c59ca57fd6c872d652cb80549cb"}, ] [[package]] @@ -6390,13 +6390,13 @@ files = [ [[package]] name = "six" -version = "1.16.0" +version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, + {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, + {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, ] [[package]] @@ -7882,13 +7882,13 @@ requests = "*" [[package]] name = "zhipuai" -version = "2.1.5.20241203" +version = "2.1.5.20241204" description = "A SDK library for accessing big model apis from ZhipuAI" optional = true python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" files = [ - {file = "zhipuai-2.1.5.20241203-py3-none-any.whl", hash = "sha256:77267aebbb7dabbff1d0706c4fc1d529feb17959613d1b130ba58a733548c21c"}, - {file = "zhipuai-2.1.5.20241203.tar.gz", hash = "sha256:4096a467cb3f43c4eb63e6e19564d2347624ceaf89a529b9e849fff0935f3da2"}, + {file = "zhipuai-2.1.5.20241204-py3-none-any.whl", hash = "sha256:063c7527d6741ced82eedb19d53fd24ce61cf43ab835ee3c0262843f59503a7c"}, + {file = "zhipuai-2.1.5.20241204.tar.gz", hash = "sha256:888b42a83c8f1daf07375b84e560219eedab96b9f9e59542f0329928291db635"}, ] [package.dependencies] From e0a7aa89911fa13eae8e74a9e5e6bc99914e2a7b Mon Sep 17 00:00:00 2001 From: yuehuazhang Date: Thu, 5 Dec 2024 23:21:40 +0800 Subject: [PATCH 2/2] fix:remove action --- .github/workflows/docker-build.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index b7c4ccf..c965294 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -1,15 +1,15 @@ name: docker-build on: - push: - branches: +# push: +# branches: # - master - paths-ignore: - - 'README.md' - - 'README_en.md' - - 'docs/**' - - '.github/actions/**' - - '.github/ISSUE_TEMPLATE/**' - - 'docker/docker-compose.yaml' +# paths-ignore: +# - 'README.md' +# - 'README_en.md' +# - 'docs/**' +# - '.github/actions/**' +# - '.github/ISSUE_TEMPLATE/**' +# - 'docker/docker-compose.yaml' # pull_request: # branches: # - master