生成数据:mattergen改成了同步

This commit is contained in:
lzy
2025-04-06 20:35:13 +08:00
parent 71d8dabd17
commit 72045e5cfe
14 changed files with 557 additions and 191 deletions

View File

@@ -5,6 +5,7 @@ This module provides functions for searching information on the web.
"""
import asyncio
import os
from typing import Annotated, Dict, Any, List
from langchain_community.utilities import SearxSearchWrapper
@@ -28,6 +29,8 @@ async def search_online(
Formatted string with search results (titles, snippets, links)
"""
# 确保 num_results 是整数
os.environ['HTTP_PROXY'] = ''
os.environ['HTTPS_PROXY'] = ''
try:
num_results = int(num_results)
except (TypeError, ValueError):