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.
API terms of use apply.
For example, the following are prohibited.
-
Business activities, for-profit use, or preparation for such activities.
-
Any action that adversely affects or interferes with the functions or performance of niconico.
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("千本桜の再生回数は?")