Additional Semantic Scholar API#76
Merged
Merged
Conversation
…discovery into feature/semantic-apis
Collaborator
Author
|
@NISH1001 Please test and make the necessary changes required to make the PR adhere the current abstraction. |
NISH1001
requested changes
Jul 22, 2025
NISH1001
requested changes
Jul 22, 2025
Collaborator
|
ONce these changes are addressed, i can have a final look and merge. Thanks for the PR. |
Collaborator
NISH1001
requested changes
Jul 22, 2025
NISH1001
approved these changes
Jul 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This PR adds an additional endpoint to the SemanticScholarSearchTool. It also adds support for additional Semantic Scholar APIs in the future.
Details:
Add a field named endpoint to allow arun to direct Semantic Scholar tool calls to:
a. search by default (previous functionality)
b. get paper details using DOI via the /graph/v1/paper/DOI endpoint
Add PaperDataItem to structures.py. It represents a schema replicating the response from semantic scholar for a single paper (ref).
Add SearchItem as an abstraction to support different types of search results instead of restricting results to SearchResultItem. This way we can inherit from SearchItem and create result schemas based on the search. This change has been made only for SemanticScholarSearchTool as it has different endpoints that produce different results. SearchResultItem and PaperDataItem will inherit from SearchItem.
Usage:
Will allow users to fetch paper details for a given DOI or list of DOIs by calling Semantic Scholar's DOI endpoint.
Checks