Skip to content

Use a Langchain Wikipedia Agent that uses the LLMChain function that for a given input, first writes a short summary and then gives information about the physiological effects.

march038/Langchain-LLMChain-Wikipedia-GPT-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GPT-Agent webapp for substances using Langchain

Hi!

This prototype Langchain substance GPT-agent webapp uses the LLMChain and WikipediaAPIWrapper functions from Langchain to query Wikipedia for multiple tasks in one run.

If the user enters a specific substance, the GPT-agent will first query Wikipedia for a short summary of the substance and then give information about the physiological effects the substance has on the human body. Using the ConversationBufferMemory function from Langchain, the app also displays the query history and the specific Wikipedia article.

The webapp is set up through Streamlit, a very good framework for prototype webapps.

The following libraries are needed for the project:

  • os (for setting the OpenAI API-key)

  • langchain

  • streamlit

As always, the code is thoroughly commented.

Have fun!

substance_agent_screenshot

About

Use a Langchain Wikipedia Agent that uses the LLMChain function that for a given input, first writes a short summary and then gives information about the physiological effects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages