TwitterTweetReader #
Twitter 推文阅读器。
读取用户 Twitter 账号的推文。
关于如何获取 Twitter API 访问权限,请查看“https://developer.twitter.com/en/docs/twitter-api/ getting-started/getting-access-to-the-twitter-api”。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
bearer_token
|
str
|
从 Twitter API 获取的 bearer_token。 |
必需 |
num_tweets
|
可选[整型]
|
每个用户 Twitter 账号的推文数量。默认是 100 条推文。 |
100
|
源代码位于 llama-index-integrations/readers/llama-index-readers-twitter/llama_index/readers/twitter/base.py
8 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 |
|
load_data #
load_data(twitterhandles: List[str], num_tweets: Optional[int] = None, **load_kwargs: Any) -> List[Document]
加载指定 Twitter 账号的推文。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
twitterhandles
|
列表[字符串]
|
要读取推文的用户 Twitter 账号列表。 |
必需 |
源代码位于 llama-index-integrations/readers/llama-index-readers-twitter/llama_index/readers/twitter/base.py
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 |
|