tooluniverse.semantic_scholar_tool moduleยถ
- class tooluniverse.semantic_scholar_tool.SemanticScholarTool[source]ยถ
Bases:
BaseToolTool to search for papers on Semantic Scholar including abstracts.
API key is read from environment variable SEMANTIC_SCHOLAR_API_KEY. Request an API key at: https://www.semanticscholar.org/product/api
Rate limits: - Without API key: 1 request/second - With API key: 100 requests/second
- run(arguments)[source]ยถ
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.
- Parameters:
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
Note
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.