Index
Base reader class.
BaseReader #
Bases: ABC
Utilities for loading data from a directory.
Source code in llama_index/core/readers/base.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
lazy_load_data #
lazy_load_data(*args: Any, **load_kwargs: Any) -> Iterable[Document]
Load data from the input directory lazily.
Source code in llama_index/core/readers/base.py
22 23 24 25 26 | |
alazy_load_data
async
#
alazy_load_data(*args: Any, **load_kwargs: Any) -> Iterable[Document]
Load data from the input directory lazily.
Source code in llama_index/core/readers/base.py
28 29 30 31 32 33 | |
load_data #
load_data(*args: Any, **load_kwargs: Any) -> List[Document]
Load data from the input directory.
Source code in llama_index/core/readers/base.py
35 36 37 | |
aload_data
async
#
aload_data(*args: Any, **load_kwargs: Any) -> List[Document]
Load data from the input directory.
Source code in llama_index/core/readers/base.py
39 40 41 | |
load_langchain_documents #
load_langchain_documents(**load_kwargs: Any) -> List[Document]
Load data in LangChain document format.
Source code in llama_index/core/readers/base.py
43 44 45 46 | |
BasePydanticReader #
Bases: BaseReader, BaseComponent
Serialiable Data Loader with Pydantic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_remote
|
bool
|
Whether the data is loaded from a remote API or a local file. |
False
|
Source code in llama_index/core/readers/base.py
49 50 51 52 53 54 55 56 | |
ResourcesReaderMixin #
Bases: ABC
Mixin for readers that provide access to different types of resources.
Resources refer to specific data entities that can be accessed by the reader. Examples of resources include files for a filesystem reader, channel IDs for a Slack reader, or pages for a Notion reader.
Source code in llama_index/core/readers/base.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
list_resources
abstractmethod
#
list_resources(*args: Any, **kwargs: Any) -> List[str]
List of identifiers for the specific type of resources available in the reader.
Returns:
| Type | Description |
|---|---|
List[str]
|
List[str]: List of identifiers for the specific type of resources available in the reader. |
Source code in llama_index/core/readers/base.py
67 68 69 70 71 72 73 74 75 | |
alist_resources
async
#
alist_resources(*args: Any, **kwargs: Any) -> List[str]
List of identifiers for the specific type of resources available in the reader asynchronously.
Returns:
| Type | Description |
|---|---|
List[str]
|
List[str]: A list of resources based on the reader type, such as files for a filesystem reader, |
List[str]
|
channel IDs for a Slack reader, or pages for a Notion reader. |
Source code in llama_index/core/readers/base.py
77 78 79 80 81 82 83 84 85 86 | |
get_permission_info #
get_permission_info(resource_id: str, *args: Any, **kwargs: Any) -> Dict
Get a dictionary of information about the permissions of a specific resource.
Source code in llama_index/core/readers/base.py
88 89 90 91 92 93 94 | |
aget_permission_info
async
#
aget_permission_info(resource_id: str, *args: Any, **kwargs: Any) -> Dict
Get a dictionary of information about the permissions of a specific resource asynchronously.
Source code in llama_index/core/readers/base.py
96 97 98 99 100 101 102 103 104 | |
get_resource_info
abstractmethod
#
get_resource_info(resource_id: str, *args: Any, **kwargs: Any) -> Dict
Get a dictionary of information about a specific resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource
|
str
|
The resource identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Dict |
Dict
|
A dictionary of information about the resource. |
Source code in llama_index/core/readers/base.py
106 107 108 109 110 111 112 113 114 115 116 117 | |
aget_resource_info
async
#
aget_resource_info(resource_id: str, *args: Any, **kwargs: Any) -> Dict
Get a dictionary of information about a specific resource asynchronously.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource
|
str
|
The resource identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Dict |
Dict
|
A dictionary of information about the resource. |
Source code in llama_index/core/readers/base.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
list_resources_with_info #
list_resources_with_info(*args: Any, **kwargs: Any) -> Dict[str, Dict]
Get a dictionary of information about all resources.
Returns:
| Type | Description |
|---|---|
Dict[str, Dict]
|
Dict[str, Dict]: A dictionary of information about all resources. |
Source code in llama_index/core/readers/base.py
136 137 138 139 140 141 142 143 144 145 146 147 | |
alist_resources_with_info
async
#
alist_resources_with_info(*args: Any, **kwargs: Any) -> Dict[str, Dict]
Get a dictionary of information about all resources asynchronously.
Returns:
| Type | Description |
|---|---|
Dict[str, Dict]
|
Dict[str, Dict]: A dictionary of information about all resources. |
Source code in llama_index/core/readers/base.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
load_resource
abstractmethod
#
load_resource(resource_id: str, *args: Any, **kwargs: Any) -> List[Document]
Load data from a specific resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource
|
str
|
The resource identifier. |
required |
Returns:
| Type | Description |
|---|---|
List[Document]
|
List[Document]: A list of documents loaded from the resource. |
Source code in llama_index/core/readers/base.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
aload_resource
async
#
aload_resource(resource_id: str, *args: Any, **kwargs: Any) -> List[Document]
Read file from filesystem and return documents asynchronously.
Source code in llama_index/core/readers/base.py
179 180 181 182 183 | |
load_resources #
load_resources(resource_ids: List[str], *args: Any, **kwargs: Any) -> List[Document]
Similar to load_data, but only for specific resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_ids
|
List[str]
|
List of resource identifiers. |
required |
Returns:
| Type | Description |
|---|---|
List[Document]
|
List[Document]: A list of documents loaded from the resources. |
Source code in llama_index/core/readers/base.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | |
aload_resources
async
#
aload_resources(resource_ids: List[str], *args: Any, **kwargs: Any) -> Dict[str, List[Document]]
Similar ato load_data, but only for specific resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_ids
|
List[str]
|
List of resource identifiers. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, List[Document]]
|
Dict[str, List[Document]]: A dictionary of documents loaded from the resources. |
Source code in llama_index/core/readers/base.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
ReaderConfig #
Bases: BaseComponent
Represents a reader and it's input arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reader
|
BasePydanticReader
|
Reader to use. |
required |
reader_args
|
List[Any]
|
Reader args. |
<dynamic>
|
Source code in llama_index/core/readers/base.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
class_name
classmethod
#
class_name() -> str
Get the name identifier of the class.
Source code in llama_index/core/readers/base.py
233 234 235 236 | |
to_dict #
to_dict(**kwargs: Any) -> Dict[str, Any]
Convert the class to a dictionary.
Source code in llama_index/core/readers/base.py
238 239 240 241 242 243 244 245 | |
options: members: - BaseReader - BasePydanticReader