Spaces:
Runtime error
Runtime error
Add `YoutubeTranscriptReader` tool integration, update dependencies, and enhance agent functionality.
Browse files- README.md +1 -0
- pyproject.toml +1 -0
- src/gaia_solving_agent/tools.py +11 -3
- uv.lock +28 -0
README.md
CHANGED
|
@@ -34,6 +34,7 @@ Tools :
|
|
| 34 |
- [x] Wikipedia
|
| 35 |
- [x] Image queries
|
| 36 |
- [ ] Video queries
|
|
|
|
| 37 |
- [x] Website parser
|
| 38 |
- [x] Text chunker ==> via LoadAndSearchToolSpec
|
| 39 |
|
|
|
|
| 34 |
- [x] Wikipedia
|
| 35 |
- [x] Image queries
|
| 36 |
- [ ] Video queries
|
| 37 |
+
- [x] Video audio transcripts
|
| 38 |
- [x] Website parser
|
| 39 |
- [x] Text chunker ==> via LoadAndSearchToolSpec
|
| 40 |
|
pyproject.toml
CHANGED
|
@@ -14,6 +14,7 @@ dependencies = [
|
|
| 14 |
"llama-index-multi-modal-llms-mistralai>=0.4.0",
|
| 15 |
"llama-index-multi-modal-llms-nebius>=0.4.0",
|
| 16 |
"llama-index-readers-web>=0.4.2",
|
|
|
|
| 17 |
"llama-index-tools-duckduckgo>=0.3.0",
|
| 18 |
"llama-index-tools-requests>=0.4.0",
|
| 19 |
"llama-index-tools-wikipedia>=0.3.0",
|
|
|
|
| 14 |
"llama-index-multi-modal-llms-mistralai>=0.4.0",
|
| 15 |
"llama-index-multi-modal-llms-nebius>=0.4.0",
|
| 16 |
"llama-index-readers-web>=0.4.2",
|
| 17 |
+
"llama-index-readers-youtube-transcript>=0.3.0",
|
| 18 |
"llama-index-tools-duckduckgo>=0.3.0",
|
| 19 |
"llama-index-tools-requests>=0.4.0",
|
| 20 |
"llama-index-tools-wikipedia>=0.3.0",
|
src/gaia_solving_agent/tools.py
CHANGED
|
@@ -6,6 +6,7 @@ from llama_index.core.tools.tool_spec.load_and_search import LoadAndSearchToolSp
|
|
| 6 |
from llama_index.multi_modal_llms.mistralai import MistralAIMultiModal
|
| 7 |
from llama_index.multi_modal_llms.nebius import NebiusMultiModal
|
| 8 |
from llama_index.readers.web import SimpleWebPageReader
|
|
|
|
| 9 |
from tavily import AsyncTavilyClient
|
| 10 |
|
| 11 |
from gaia_solving_agent import TAVILY_API_KEY, NEBIUS_API_KEY, MISTRAL_API_KEY
|
|
@@ -62,7 +63,14 @@ async def vllm_ask_image(query: str, images: ImageDocument | list[ImageDocument]
|
|
| 62 |
|
| 63 |
simple_web_page_reader_tool = OnDemandLoaderTool.from_defaults(
|
| 64 |
SimpleWebPageReader(html_to_text=True),
|
| 65 |
-
name="
|
| 66 |
-
description="
|
| 67 |
)
|
| 68 |
-
simple_web_page_reader_toolspec = LoadAndSearchToolSpec.from_defaults(simple_web_page_reader_tool)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
from llama_index.multi_modal_llms.mistralai import MistralAIMultiModal
|
| 7 |
from llama_index.multi_modal_llms.nebius import NebiusMultiModal
|
| 8 |
from llama_index.readers.web import SimpleWebPageReader
|
| 9 |
+
from llama_index.readers.youtube_transcript import YoutubeTranscriptReader
|
| 10 |
from tavily import AsyncTavilyClient
|
| 11 |
|
| 12 |
from gaia_solving_agent import TAVILY_API_KEY, NEBIUS_API_KEY, MISTRAL_API_KEY
|
|
|
|
| 63 |
|
| 64 |
simple_web_page_reader_tool = OnDemandLoaderTool.from_defaults(
|
| 65 |
SimpleWebPageReader(html_to_text=True),
|
| 66 |
+
name="simple_web_page_reader_tool",
|
| 67 |
+
description="Tool for loading content from a web page and return it as text",
|
| 68 |
)
|
| 69 |
+
simple_web_page_reader_toolspec = LoadAndSearchToolSpec.from_defaults(simple_web_page_reader_tool)
|
| 70 |
+
|
| 71 |
+
youtube_transcript_reader_tool = OnDemandLoaderTool.from_defaults(
|
| 72 |
+
YoutubeTranscriptReader(),
|
| 73 |
+
name="youtube_transcript_reader_tool",
|
| 74 |
+
description="Tool for loading the audio transcript from a youtube video and return it as text",
|
| 75 |
+
)
|
| 76 |
+
youtube_transcript_reader_toolspec = LoadAndSearchToolSpec.from_defaults(youtube_transcript_reader_tool)
|
uv.lock
CHANGED
|
@@ -39,6 +39,7 @@ dependencies = [
|
|
| 39 |
{ name = "llama-index-multi-modal-llms-mistralai" },
|
| 40 |
{ name = "llama-index-multi-modal-llms-nebius" },
|
| 41 |
{ name = "llama-index-readers-web" },
|
|
|
|
| 42 |
{ name = "llama-index-tools-duckduckgo" },
|
| 43 |
{ name = "llama-index-tools-requests" },
|
| 44 |
{ name = "llama-index-tools-wikipedia" },
|
|
@@ -67,6 +68,7 @@ requires-dist = [
|
|
| 67 |
{ name = "llama-index-multi-modal-llms-mistralai", specifier = ">=0.4.0" },
|
| 68 |
{ name = "llama-index-multi-modal-llms-nebius", specifier = ">=0.4.0" },
|
| 69 |
{ name = "llama-index-readers-web", specifier = ">=0.4.2" },
|
|
|
|
| 70 |
{ name = "llama-index-tools-duckduckgo", specifier = ">=0.3.0" },
|
| 71 |
{ name = "llama-index-tools-requests", specifier = ">=0.4.0" },
|
| 72 |
{ name = "llama-index-tools-wikipedia", specifier = ">=0.3.0" },
|
|
@@ -1755,6 +1757,19 @@ wheels = [
|
|
| 1755 |
{ url = "https://files.pythonhosted.org/packages/03/a4/fabfdacbe252e6530f56500e95d4b092df399e2474333c13a1ae3b995f26/llama_index_readers_web-0.4.2-py3-none-any.whl", hash = "sha256:f277a5bf6f843ea095fbfbd13b1a1866cbc6ec5f998de16f3c6294a864b9f0ef", size = 101488, upload-time = "2025-06-03T17:36:15.215Z" },
|
| 1756 |
]
|
| 1757 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1758 |
[[package]]
|
| 1759 |
name = "llama-index-tools-duckduckgo"
|
| 1760 |
version = "0.3.0"
|
|
@@ -4083,6 +4098,19 @@ wheels = [
|
|
| 4083 |
{ url = "https://files.pythonhosted.org/packages/b4/2d/2345fce04cfd4bee161bf1e7d9cdc702e3e16109021035dbb24db654a622/yarl-1.20.1-py3-none-any.whl", hash = "sha256:83b8eb083fe4683c6115795d9fc1cfaf2cbbefb19b3a1cb68f6527460f483a77", size = 46542, upload-time = "2025-06-10T00:46:07.521Z" },
|
| 4084 |
]
|
| 4085 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4086 |
[[package]]
|
| 4087 |
name = "zipp"
|
| 4088 |
version = "3.23.0"
|
|
|
|
| 39 |
{ name = "llama-index-multi-modal-llms-mistralai" },
|
| 40 |
{ name = "llama-index-multi-modal-llms-nebius" },
|
| 41 |
{ name = "llama-index-readers-web" },
|
| 42 |
+
{ name = "llama-index-readers-youtube-transcript" },
|
| 43 |
{ name = "llama-index-tools-duckduckgo" },
|
| 44 |
{ name = "llama-index-tools-requests" },
|
| 45 |
{ name = "llama-index-tools-wikipedia" },
|
|
|
|
| 68 |
{ name = "llama-index-multi-modal-llms-mistralai", specifier = ">=0.4.0" },
|
| 69 |
{ name = "llama-index-multi-modal-llms-nebius", specifier = ">=0.4.0" },
|
| 70 |
{ name = "llama-index-readers-web", specifier = ">=0.4.2" },
|
| 71 |
+
{ name = "llama-index-readers-youtube-transcript", specifier = ">=0.3.0" },
|
| 72 |
{ name = "llama-index-tools-duckduckgo", specifier = ">=0.3.0" },
|
| 73 |
{ name = "llama-index-tools-requests", specifier = ">=0.4.0" },
|
| 74 |
{ name = "llama-index-tools-wikipedia", specifier = ">=0.3.0" },
|
|
|
|
| 1757 |
{ url = "https://files.pythonhosted.org/packages/03/a4/fabfdacbe252e6530f56500e95d4b092df399e2474333c13a1ae3b995f26/llama_index_readers_web-0.4.2-py3-none-any.whl", hash = "sha256:f277a5bf6f843ea095fbfbd13b1a1866cbc6ec5f998de16f3c6294a864b9f0ef", size = 101488, upload-time = "2025-06-03T17:36:15.215Z" },
|
| 1758 |
]
|
| 1759 |
|
| 1760 |
+
[[package]]
|
| 1761 |
+
name = "llama-index-readers-youtube-transcript"
|
| 1762 |
+
version = "0.3.0"
|
| 1763 |
+
source = { registry = "https://pypi.org/simple" }
|
| 1764 |
+
dependencies = [
|
| 1765 |
+
{ name = "llama-index-core" },
|
| 1766 |
+
{ name = "youtube-transcript-api" },
|
| 1767 |
+
]
|
| 1768 |
+
sdist = { url = "https://files.pythonhosted.org/packages/f8/f1/021d085dd5f72f0e8e2da459fe9942cf8338331691583dbc500f29416aa0/llama_index_readers_youtube_transcript-0.3.0.tar.gz", hash = "sha256:2259dc60253bef07d9a39f57665f71bc09011c9ca9774a6c5331185bd8fdff08", size = 2907, upload-time = "2024-11-18T00:00:36.334Z" }
|
| 1769 |
+
wheels = [
|
| 1770 |
+
{ url = "https://files.pythonhosted.org/packages/ae/a9/76ba4d311212950d8acad4fb0a490d6e98e91ff7622b720b54891420f013/llama_index_readers_youtube_transcript-0.3.0-py3-none-any.whl", hash = "sha256:08aa86ed287b1f7de60bbb9e7d6e6e4ed0873b85c9a32b2af00350b900bc40c3", size = 3629, upload-time = "2024-11-18T00:00:35.316Z" },
|
| 1771 |
+
]
|
| 1772 |
+
|
| 1773 |
[[package]]
|
| 1774 |
name = "llama-index-tools-duckduckgo"
|
| 1775 |
version = "0.3.0"
|
|
|
|
| 4098 |
{ url = "https://files.pythonhosted.org/packages/b4/2d/2345fce04cfd4bee161bf1e7d9cdc702e3e16109021035dbb24db654a622/yarl-1.20.1-py3-none-any.whl", hash = "sha256:83b8eb083fe4683c6115795d9fc1cfaf2cbbefb19b3a1cb68f6527460f483a77", size = 46542, upload-time = "2025-06-10T00:46:07.521Z" },
|
| 4099 |
]
|
| 4100 |
|
| 4101 |
+
[[package]]
|
| 4102 |
+
name = "youtube-transcript-api"
|
| 4103 |
+
version = "1.1.0"
|
| 4104 |
+
source = { registry = "https://pypi.org/simple" }
|
| 4105 |
+
dependencies = [
|
| 4106 |
+
{ name = "defusedxml" },
|
| 4107 |
+
{ name = "requests" },
|
| 4108 |
+
]
|
| 4109 |
+
sdist = { url = "https://files.pythonhosted.org/packages/36/dd/10d413b20a2d14fa483853d0f6d920a0a0a6887d7c60167e4641733f99fb/youtube_transcript_api-1.1.0.tar.gz", hash = "sha256:786d9e64bd7fffee0dbc1471a61a798cebdc379b9cf8f7661d3664e831fcc1a5", size = 470144, upload-time = "2025-06-11T22:30:44.048Z" }
|
| 4110 |
+
wheels = [
|
| 4111 |
+
{ url = "https://files.pythonhosted.org/packages/b3/69/63f1b9f96a9d3b6bd35288fe27f987c41bd157e47b3d07ca025549e3f8e6/youtube_transcript_api-1.1.0-py3-none-any.whl", hash = "sha256:876ac42b1e3f8cc99b81d8fd810bd74ed07511e51dff5db50e714e3156ad3595", size = 485739, upload-time = "2025-06-11T22:30:40.515Z" },
|
| 4112 |
+
]
|
| 4113 |
+
|
| 4114 |
[[package]]
|
| 4115 |
name = "zipp"
|
| 4116 |
version = "3.23.0"
|