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.