mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-31 11:28:28 +08:00
11 lines
310 B
Python
11 lines
310 B
Python
from langchain_community.tools import YouTubeSearchTool
|
|
from chatchat.server.pydantic_v1 import BaseModel, Field
|
|
|
|
|
|
def search_youtube(query: str):
|
|
tool = YouTubeSearchTool()
|
|
return tool.run(tool_input=query)
|
|
|
|
class YoutubeInput(BaseModel):
|
|
query: str = Field(description="Query for Videos search")
|