You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def load_data(
self, page_ids: Optional[List[str]] = None, database_id: Optional[str] = None
) -> str:
"""Loads content from a set of page ids or a database id.
Don't use this endpoint if you don't know the page ids or database id.
"""
page_ids = page_ids or []
docs = self.reader.load_data(page_ids=page_ids, database_id=database_id)
return "\n".join([doc.get_content() for doc in docs])
above code in the notion tool is incorrect the database_id should database_ids in the read, so exception will throw here
Version
llama-index-tools-notion = "^0.3.0"
Steps to Reproduce
import
llama-index-tools-notion = "^0.3.0"
simply calling the method load_data will have errors.
Relevant Logs/Tracbacks
The text was updated successfully, but these errors were encountered:
Hey @zhaoyilong1! 👋 I'm here to help you with any bugs, questions, or contributions you have regarding the NotionTool. I'll do my best to assist you while we wait for a human maintainer.
The issue you're encountering is due to a mismatch in the parameter name for the load_data method. The NotionTool class's load_data method is using database_id as a parameter, but it should be database_ids to match the expected parameter name in the reader object's load_data method [1].
To fix this, you should update the method signature and the call to the reader.load_data method to use database_ids instead of database_id. Here's how you can modify the code:
defload_data(
self, page_ids: Optional[List[str]] =None, database_ids: Optional[List[str]] =None
) ->str:
"""Loads content from a set of page ids or a database id. Don't use this endpoint if you don't know the page ids or database id. """page_ids=page_idsor []
docs=self.reader.load_data(page_ids=page_ids, database_ids=database_ids)
return"\n".join([doc.get_content() fordocindocs])
This change should resolve the error you're experiencing.
Bug Description
above code in the notion tool is incorrect the database_id should database_ids in the read, so exception will throw here
Version
llama-index-tools-notion = "^0.3.0"
Steps to Reproduce
import
llama-index-tools-notion = "^0.3.0"
simply calling the method load_data will have errors.
Relevant Logs/Tracbacks
The text was updated successfully, but these errors were encountered: