langchain palm2 rag_application
1.0.0
该简化应用程序实现了基于兰链的检索系统,用于处理PDF文档并使用Langchain的功能进行对话检索。


该应用程序允许用户上传PDF文件,提取文本,将其分成块,使用Google Palm嵌入式生成嵌入,并创建一个对话式检索链。然后,用户可以提出与处理后的PDF内容有关的问题,并根据设置的对话链接收回答。
Python环境:确保已安装Python 3.x。
环境变量:在项目root目录中创建一个.env文件,其中包括以下内容:google_api_key = your_google_api_key_key_here用实际的Google API键替换your_google_api_key_here 。
git clone https://github.com/Varunv003/langchain-palm2-rag_applicationpython -m venv venv
# On Windows: .venvScriptsactivate
# On macOS/Linux: source venv/bin/activatepip install -r requirements.txtpython template.py
# This command will create necessary directories and files based on your project needs.streamlit run app.py
# The application will start, and you can access it in your web browser at http://localhost:8501.