天才
天才阅读器 #
基类:EventBaseReader
用于与lyricsgenius进行各种操作的GeniusReader。
workflows/handler.py 中的源代码llama_index/readers/genius/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 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
load_artist_songs #
load_artist_songs(artist_name: str, max_songs: Optional[int] = None) -> List[文档]
加载某位艺术家的所有或指定数量的歌曲。
workflows/handler.py 中的源代码llama_index/readers/genius/base.py
22 23 24 25 26 27 | |
load_artist_songs_with_filters #
load_artist_songs_with_filters(artist_name: str, most_popular: bool = True, max_songs: Optional[int] = None, max_pages: int = 50) -> 文档
加载某位艺术家最受欢迎或最不受欢迎的歌曲。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
artist_name
|
str
|
艺术家的姓名。 |
required |
most_popular
|
bool
|
True 表示最受欢迎的歌曲,False 表示最不受欢迎的歌曲。 |
True
|
max_songs
|
Optional[int]
|
考虑流行度的最大歌曲数量。 |
None
|
max_pages
|
int
|
要抓取的最大页面数。 |
50
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
Document |
文档
|
一份包含最受欢迎/最不受欢迎歌曲歌词的文档。 |
workflows/handler.py 中的源代码llama_index/readers/genius/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 | |
load_song_by_url_or_id #
load_song_by_url_or_id(song_url: Optional[str] = None, song_id: Optional[int] = None) -> List[文档]
通过URL或ID加载歌曲。
workflows/handler.py 中的源代码llama_index/readers/genius/base.py
81 82 83 84 85 86 87 88 89 90 91 92 | |
search_songs_by_lyrics #
search_songs_by_lyrics(lyrics: str) -> List[文档]
通过歌词片段搜索歌曲。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
lyrics
|
str
|
您正在寻找的歌词片段。 |
required |
返回:
| 类型 | 描述 |
|---|---|
List[文档]
|
List[Document]: 包含具有这些歌词的歌曲的文档列表。 |
workflows/handler.py 中的源代码llama_index/readers/genius/base.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
load_songs_by_tag #
load_songs_by_tag(tag: str, max_songs: Optional[int] = None, max_pages: int = 50) -> List[文档]
按特定标签加载歌曲。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
tag
|
str
|
要加载歌曲的标签或类型。 |
required |
max_songs
|
Optional[int]
|
获取歌曲的最大数量。如果为 None,则无特定限制。 |
None
|
max_pages
|
int
|
要抓取的最大页面数。 |
50
|
返回:
| 类型 | 描述 |
|---|---|
List[文档]
|
List[Document]: 包含歌词的文档列表。 |
workflows/handler.py 中的源代码llama_index/readers/genius/base.py
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 | |
选项: 成员:- GeniusReader