谷歌
Google日历阅读器 #
基类:EventBaseReader
谷歌日历阅读器。
从谷歌日历读取事件
workflows/handler.py 中的源代码llama_index/readers/google/calendar/base.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 | |
load_data #
load_data(number_of_results: Optional[int] = 100, start_date: Optional[Union[str, date]] = None) -> List[文档]
从用户的日历中加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
number_of_results
|
Optional[int]
|
返回的事件数量。默认为100。 |
100
|
start_date
|
Optional[Union[str, date]]
|
返回事件的起始日期。默认为今天。 |
None
|
workflows/handler.py 中的源代码llama_index/readers/google/calendar/base.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 | |
Google聊天阅读器 #
基类:EventBasePydanticReader
Google Chat 阅读器。
从Google Chat读取消息
workflows/handler.py 中的源代码llama_index/readers/google/chat/base.py
17 18 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 47 48 49 50 51 52 53 54 55 56 57 58 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 221 222 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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
class_name
classmethod
#
class_name() -> str
获取类的名称标识符。
workflows/handler.py 中的源代码llama_index/readers/google/chat/base.py
26 27 28 29 | |
load_data #
load_data(space_names: List[str], num_messages: int = -1, after: datetime = None, before: datetime = None, order_asc: bool = True) -> List[文档]
从 Google Chat 加载文档。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
space_name
|
List[str]
|
在URL顶部找到的空间ID名称列表(不包含"space/"部分)。 |
required |
num_messages
|
int
|
要加载的消息数量(可能超过此数量)。如果为-1,则加载所有消息。默认为-1。 |
-1
|
after
|
datetime
|
仅搜索此日期时间(UTC)之后的消息。默认为空。 |
None
|
before
|
datetime
|
仅搜索此日期时间(UTC)之前的消息。默认为空。 |
None
|
order_asc
|
bool
|
如果消息应按升序时间顺序排列。默认为 True。 |
True
|
返回:
| 类型 | 描述 |
|---|---|
List[文档]
|
List[Document]: 文档对象列表 |
workflows/handler.py 中的源代码llama_index/readers/google/chat/base.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
Google文档阅读器 #
基类:EventBasePydanticReader
Google 文档阅读器。
从 Google 文档读取页面
workflows/handler.py 中的源代码llama_index/readers/google/docs/base.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 221 222 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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
load_data #
load_data(document_ids: List[str]) -> List[文档]
从输入目录加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
document_ids
|
List[str]
|
一个文档ID列表。 |
required |
workflows/handler.py 中的源代码llama_index/readers/google/docs/base.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
Google云端硬盘阅读器 #
Bases: BasePydanticReader, ResourcesReaderMixin, FileSystemReaderMixin
Google 云端硬盘阅读器。
从Google云端硬盘读取文件。直接传递给构造函数的凭据将优先于作为文件路径传递的凭据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
drive_id
|
Optional[str]
|
谷歌云端硬盘中共享云端硬盘的驱动器ID。 |
None
|
folder_id
|
Optional[str]
|
谷歌云端硬盘中文件夹的文件夹ID。 |
None
|
file_ids
|
Optional[str]
|
Google 云端硬盘中文件的文件标识符。 |
None
|
query_string
|
Optional[str]
|
一个更通用的查询字符串,用于筛选文档,例如“名称包含‘测试’”。 它提供了更大的灵活性来筛选文档。更多信息:https://developers.google.com/drive/api/v3/search-files |
None
|
is_cloud
|
Optional[bool]
|
该读取器是否在云环境中使用。如果是,则不会将凭据保存到磁盘。 默认为 False。 |
False
|
credentials_path
|
Optional[str]
|
客户端配置文件路径。 默认为 None。 |
'credentials.json'
|
token_path
|
Optional[str]
|
授权用户信息文件的路径。默认为空。 |
'token.json'
|
service_account_key_path
|
Optional[str]
|
服务账户密钥文件的路径。默认为 None。 |
'service_account_key.json'
|
client_config
|
Optional[dict]
|
包含客户端配置的字典。 默认为 None。 |
None
|
authorized_user_info
|
Optional[dict]
|
包含授权用户信息的字典。默认为 None。 |
None
|
service_account_key
|
Optional[dict]
|
包含服务账户密钥的字典。默认为 None。 |
None
|
file_extractor
|
Optional[Dict[str, BaseReader]]
|
文件扩展名到 BaseReader 类的映射,用于指定如何将该文件转换为文本。有关更多详细信息,请参阅 |
None
|
raise_errors
|
bool
|
(布尔值): 遇到错误时是否抛出异常。默认为 False。 |
False
|
workflows/handler.py 中的源代码llama_index/readers/google/drive/base.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 221 222 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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 | |
load_data #
load_data(drive_id: Optional[str] = None, folder_id: Optional[str] = None, file_ids: Optional[List[str]] = None, mime_types: Optional[List[str]] = None, query_string: Optional[str] = None) -> List[文档]
从文件夹ID或文件ID加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
drive_id
|
Optional[str]
|
谷歌云端硬盘中共享云端硬盘的驱动器ID。 |
None
|
folder_id
|
Optional[str]
|
谷歌云端硬盘中文件夹的文件夹ID。 |
None
|
file_ids
|
Optional[List[str]]
|
Google 云端硬盘中文件的文件标识符。 |
None
|
mime_types
|
Optional[List[str]]
|
您想要允许的mimeTypes类型,例如:"application/vnd.google-apps.document" |
None
|
query_string
|
Optional[str]
|
一个更通用的查询字符串,用于筛选文档,例如“名称包含‘测试’”。 它提供了更大的灵活性来筛选文档。更多信息:https://developers.google.com/drive/api/v3/search-files |
None
|
返回:
| 类型 | 描述 |
|---|---|
List[文档]
|
List[Document]: 文档列表。 |
workflows/handler.py 中的源代码llama_index/readers/google/drive/base.py
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | |
list_resources #
list_resources(**kwargs) -> List[str]
列出指定 Google Drive 文件夹或文件中的资源。
workflows/handler.py 中的源代码llama_index/readers/google/drive/base.py
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 | |
get_resource_info #
get_resource_info(resource_id: str, **kwargs) -> Dict
获取特定 Google Drive 资源的相关信息。
workflows/handler.py 中的源代码llama_index/readers/google/drive/base.py
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 | |
load_resource #
load_resource(resource_id: str, **kwargs) -> List[文档]
从 Google Drive 加载特定资源。
workflows/handler.py 中的源代码llama_index/readers/google/drive/base.py
715 716 717 718 719 | |
read_file_content #
read_file_content(file_path: Union[str, Path], **kwargs) -> bytes
从 Google Drive 读取特定文件的内容。
workflows/handler.py 中的源代码llama_index/readers/google/drive/base.py
721 722 723 724 725 726 727 728 729 | |
Gmail邮件阅读器 #
Bases: BaseReader, BaseModel
Gmail 阅读器。
读取邮件
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
max_results
|
int
|
默认为10。 |
required |
query
|
str
|
Gmail查询。默认为无。 |
required |
service
|
Any
|
Gmail 服务。默认为 None。 |
required |
results_per_page
|
Optional[int]
|
每页最大结果数。默认为10。 |
required |
use_iterative_parser
|
bool
|
使用迭代解析器。默认为 False。 |
required |
workflows/handler.py 中的源代码llama_index/readers/google/gmail/base.py
14 15 16 17 18 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 47 48 49 50 51 52 53 54 55 56 57 58 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 | |
load_data #
load_data() -> List[文档]
从用户的账户加载邮件。
workflows/handler.py 中的源代码llama_index/readers/google/gmail/base.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
GoogleKeep阅读器 #
基类:EventBaseReader
Google Keep 阅读器。
从 Google Keep 读取笔记
workflows/handler.py 中的源代码llama_index/readers/google/keep/base.py
11 12 13 14 15 16 17 18 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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
load_data #
load_data(document_ids: List[str]) -> List[文档]
从文档ID加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
document_ids
|
List[str]
|
一个笔记ID列表。 |
required |
workflows/handler.py 中的源代码llama_index/readers/google/keep/base.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
load_all_notes #
load_all_notes() -> List[文档]
从 Google Keep 加载所有笔记。
workflows/handler.py 中的源代码llama_index/readers/google/keep/base.py
41 42 43 44 45 46 47 48 49 50 | |
Google地图文本搜索读取器 #
基类:EventBaseReader
workflows/handler.py 中的源代码llama_index/readers/google/maps/base.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 | |
load_data #
load_data(text: str, number_of_results: Optional[int] = DEFAULT_NUMBER_OF_RESULTS) -> List[文档]
从谷歌地图加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
text
|
str
|
要搜索的文本。 |
required |
number_of_results
|
Optional[int]
|
返回结果的数量。默认为20。 |
DEFAULT_NUMBER_OF_RESULTS
|
workflows/handler.py 中的源代码llama_index/readers/google/maps/base.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 | |
lazy_load_data #
lazy_load_data(*args: Any, **load_kwargs: Any) -> Iterable[文档]
从谷歌地图延迟加载数据。
workflows/handler.py 中的源代码llama_index/readers/google/maps/base.py
113 114 115 | |
Google表格读取器 #
基类:EventBasePydanticReader
Google Sheets 阅读器。
从 Google Sheets 读取表格作为 TSV 格式
workflows/handler.py 中的源代码llama_index/readers/google/sheets/base.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 | |
load_data #
load_data(spreadsheet_ids: List[str]) -> List[文档]
从输入目录加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
spreadsheet_ids
|
List[str]
|
一个文档ID列表。 |
required |
workflows/handler.py 中的源代码llama_index/readers/google/sheets/base.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
load_data_in_pandas #
load_data_in_pandas(spreadsheet_ids: List[str]) -> List[DataFrame]
从输入目录加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
spreadsheet_ids
|
List[str]
|
一个文档ID列表。 |
required |
workflows/handler.py 中的源代码llama_index/readers/google/sheets/base.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
选项: 成员:- GmailReader - GoogleCalendarReader - GoogleChatReader - GoogleDocsReader - GoogleDriveReader - GoogleKeepReader - GoogleMapsTextSearchReader - GoogleSheetsReader