-
Notifications
You must be signed in to change notification settings - Fork 736
Conversation
this is awesome! will review soon |
llama_hub/semantic_scholar/README.md
Outdated
ServiceContext, | ||
) | ||
|
||
s2reader = download_loader('SemanticScholarReader') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you never import download_loader
from llama_index
also recommended way now is from llama_hub.semantic_scholar.base import SemanticScholarReader
(e.g. import as package)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh thanks for pointing that out. I have included it here 20819ea
llama_hub/semanticscholar/base.py
Outdated
import logging | ||
from llama_index.readers.base import BaseReader | ||
from llama_index.readers.schema.base import Document | ||
from semanticscholar import SemanticScholar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you do the import from the class constructor or methods? The reason is that we want this to be lazily imported.
Take a look at other loader implementations as example!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for this suggestion! I have moved it here 977671c
This module loads papers from semantic scholar search for which the user can question and get answers to. It is using the semanticscholar library to search and get results.
The user can define a broader search space, get the
Documents
loaded inllama_index
and then ask questions as demoed here -