Wordpress
WordpressReader #
基类: BaseReader
Wordpress 读取器。从 Wordpress 工作空间读取数据。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
url
|
str
|
WordPress 站点的基本 URL。 |
必需 |
username
|
可选[str]
|
用于认证的 WordPress 用户名。 |
无
|
password
|
可选[str]
|
用于认证的 WordPress 密码。 |
无
|
get_pages
|
bool
|
检索静态 WordPress“页面”。默认为 True。 |
True
|
get_posts
|
bool
|
检索 WordPress“文章”(博客条目)。默认为 True。 |
True
|
additional_post_types
|
可选[str]
|
要检索的其他文章类型的逗号分隔列表(例如,“my-custom-page,webinars”)。默认为 None。 |
无
|
源代码位于 llama-index-integrations/readers/llama-index-readers-wordpress/llama_index/readers/wordpress/base.py
9 10 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 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 |
|
load_data #
load_data() -> List[Document]
从指定的文章类型加载数据。
返回值
类型 | 描述 |
---|---|
列表[文档]
|
List[Document]: 文档列表。 |
源代码位于 llama-index-integrations/readers/llama-index-readers-wordpress/llama_index/readers/wordpress/base.py
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 |
|
get_all_posts #
get_all_posts(post_type: str) -> List[dict]
检索特定类型的所有文章,并处理分页。
源代码位于 llama-index-integrations/readers/llama-index-readers-wordpress/llama_index/readers/wordpress/base.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
get_posts_page #
get_posts_page(post_type: str, current_page: int = 1) -> dict
检索给定文章类型的单页文章。
源代码位于 llama-index-integrations/readers/llama-index-readers-wordpress/llama_index/readers/wordpress/base.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|