building intelligent chatbots
1.0.0
該存儲庫演示瞭如何使用Langchain,Pinecone和簡化來構建具有不同級別的內存功能的聊天機器人。該項目顯示了從無狀態聊天機器人到具有永久內存存儲的一個演變。
在開始之前,請確保您有:
git clone https://github.com/spandan114/building-intelligent-chatbots.git
cd building-intelligent-chatbots在Windows上:
# Create virtual environment
python -m venv chatbotenv
# Activate virtual environment
chatbotenv S cripts a ctivate在MacOS/Linux上:
# Create virtual environment
python -m venv chatbotenv
# Activate virtual environment
source chatbotenv/bin/activatepip install -r requirements.txt在項目root中創建.env文件:
PINECONE_API_KEY = your_pinecone_api_key_here
OPENAI_API_KEY = your_openai_api_key_here
GROQ_API_KEY = your_groq_api_key_herestreamlit run app.py該應用程序將在http://localhost:8501上找到
deactivate building-intelligent-chatbots/
├── bot_with_pinecone_memory.py # Main application with Pinecone
├── bot_without_memory.py # Basic bot implementation
├── bot_with_temporary_memory.py # Bot with session state memory
├── requirements.txt # Project dependencies
├── .env # Environment variables (create this)
└── README.md # This file
基本bot ( bot_without_memory.py ):
streamlit run bot_without_memory.py臨時內存bot ( bot_with_temporary_memory.py ):
streamlit run bot_with_temporary_memory.py永久內存bot ( bot_with_pinecone_memory.py ):
streamlit run bot_with_pinecone_memory.py langchain
langchain-groq
langchain-pinecone
langchain-huggingface
langchain-postgres
langchain-community
langchain-core
streamlit
python-dotenv
pinecone-client
psycopg2-binary
sentence-transformers
openai
tiktoken
Modulenotfounderror :
pip install -r requirements.txtAPI密鑰錯誤:
.env文件是否存在並包含有效的API鍵松果錯誤:
如果您發現這個項目有幫助,請考慮給它星星!它可以幫助其他人發現該項目,並激勵我們創建更多內容。
有關問題和反饋,請在GitHub存儲庫中打開一個問題。
愉快的編碼!