Load Documents and split into chunks.
validate_environment(values)
Validate that API key and URL exists in environment.
__init__(global_id: str, api_key: Optional[str] = None, url: Optional[str] = None)[source]¶
api_key: RSpace API key - can also be supplied as environment variable
‘RSPACE_API_KEY’
url: str
The URL of your RSpace instance - can also be supplied as environment
variable ‘RSPACE_URL’
global_id: str
The global ID of the resource to load,
e.g. ‘SD12344’ (a single document); ‘GL12345’(A PDF file in the gallery);
‘NB4567’ (a notebook); ‘FL12244’ (a folder)
lazy_load() → Iterator[Document][source]¶
A lazy loader for Documents.
load() → List[Document][source]¶
Load data into Document objects.
load_and_split(text_splitter: Optional[TextSplitter] = None) → List[Document]¶
Load Documents and split into chunks. Chunks are returned as Documents.
Parameters
text_splitter – TextSplitter instance to use for splitting documents.
Defaults to RecursiveCharacterTextSplitter.
Returns
List of Documents.
classmethod validate_environment(values: Dict) → Dict[source]¶
Validate that API key and URL exists in environment.