Documentation
¶
Overview ¶
Package youtubetranscript provides a tool to fetch transcript/captions from YouTube videos. It mimics how other systems (e.g. LangChain YoutubeLoader, youtube-transcript-api) do it: fetch the watch page, extract the caption track URL from the player response, then fetch the caption content. No YouTube API key or external transcript service is required.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTool ¶
func NewTool() tool.CallableTool
NewTool returns a callable tool that fetches YouTube video transcripts. Use this when the user asks to transcribe, scribe, or get captions from a YouTube video.
Types ¶
type Request ¶
type Request struct {
VideoURL string `` /* 145-byte string literal not displayed */
Language string `` /* 162-byte string literal not displayed */
WithTimes bool `` /* 138-byte string literal not displayed */
}
Request is the input for the youtube_transcript tool.
type ToolProvider ¶
type ToolProvider struct{}
ToolProvider satisfies the tools.ToolProviders interface for the YouTube transcript tool.
func NewToolProvider ¶
func NewToolProvider() *ToolProvider
NewToolProvider creates a ToolProvider for the youtube_transcript tool.
func (*ToolProvider) GetTools ¶
func (p *ToolProvider) GetTools() []tool.Tool
GetTools returns the YouTube transcript tool.