Skip to content

Wrapper to make Nicovideo search API available from Langchain.

Notifications You must be signed in to change notification settings

Javakky/langchain-tools-nicovideo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

langchain-tools-nicovideo

What is Snapshot Search API ?

Plugin to enable nicovideo "Snapshot Search API v2" from hwchase17/langchain.
The Snapshot Search API is used to obtain statistical information about videos posted on nicovideo, such as titles, descriptions, and view counts.

Terms of Use

API terms of use apply.

For example, the following are prohibited.

  1. Business activities, for-profit use, or preparation for such activities.

  2. Any action that adversely affects or interferes with the functions or performance of niconico.

Way to use

llm = OpenAI(temperature=0)
tools = load_tools(["requests_all"], llm=llm)
tools.append(
    NicovideoQueryRun(
        api_wrapper=NicovideoSnapshotApiWrapper()
    )
)
agent = initialize_agent(
    tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True
)
agent.run("千本桜の再生回数は?")

About

Wrapper to make Nicovideo search API available from Langchain.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages