tooluniverse.core_tool 模块¶
CORE API 工具,用于搜索开放获取的学术论文。
CORE 是全球最大的开放获取研究论文集合。该工具提供对来自全球各大存储库和期刊的超过2亿篇开放获取论文的访问。
- class tooluniverse.core_tool.CorePDFSnippetsTool[源代码]¶
基类:
BaseToolFetch an open-access PDF (commonly returned by CORE) and return bounded text snippets around user-provided terms.
Extraction backends (fastest first when extractor=”auto”): - PyMuPDF (fitz) - pypdf - markitdown
- run(arguments)[源代码]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- 参数:
arguments (
dict, optional) – Tool-specific argumentsstream_callback (
callable, optional) – Callback for streaming responsesuse_cache (
bool, optional) – Whether result caching is enabledvalidate (
bool, optional) – Whether parameter validation was performed
备注
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.