tooluniverse.core_tool 模块

CORE API 工具,用于搜索开放获取的学术论文。

CORE 是全球最大的开放获取研究论文集合。该工具提供对来自全球各大存储库和期刊的超过2亿篇开放获取论文的访问。

class tooluniverse.core_tool.CoreTool[源代码]

基类:BaseTool

用于搜索CORE开放获取学术论文的工具。

__init__(tool_config=None)[源代码]
run(tool_arguments)[源代码]

执行 CORE 搜索。

参数:

tool_arguments – 包含搜索参数的字典

返回值

纸质词典列表

class tooluniverse.core_tool.CorePDFSnippetsTool[源代码]

基类:BaseTool

Fetch 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

__init__(tool_config)[源代码]
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 arguments

  • stream_callback (callable, optional) – Callback for streaming responses

  • use_cache (bool, optional) – Whether result caching is enabled

  • validate (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.