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存储库中打开一个问题。
愉快的编码!